go to www.geomview.org home page
 
Home

Overview
FAQ
Documentation

Download

Mailing List

Geomview For Windows?

Support
Users
Development

Bug Reporting
Contributing
Contact Us

Sponsors

 

Site Search

 

Advanced
Search

 
About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Closed REQ 5731]: 2 questions about geomview


  • To: software@geom.umn.edu
  • Subject: Re: [Closed REQ 5731]: 2 questions about geomview
  • From: daemon
  • Date: Wed, 31 Jan 1996 12:29:05 -0600 (CST)

> 1) Is there any easy way to create a file that specifies points you want
>    geomview to display.  Right now, the file is simply a list of points,
>    and I would like to change it as little as possible.  I've found the
>    VEC file format, but I would prefer to not have to put in a few thousand
>    1's to specify that they are all points and then a few thouand 0's to
>    say I don't want any colors.

No, there's no simpler format.  (The SKEL format can also create points,
but you'd have to add additional stuff to your list of points with it, too.)
But, it's not all that hard to add the header that the VECT format needs.
Here's a shell/awk script that does it.  It expects a list of points,
with one X Y Z triple per line, and writes its result to standard output.
In fact, you can even invoke it directly from geomview, avoiding the need to
create a temporary file.  Suppose you've stored the following in a file "p2v",
and made it executable with "chmod +x p2v".  Suppose further that you
have a list of points in file "pts".  Then, you could type the following
into a geomview command panel:

  (| p2v -c stuff  pts)

This creates a VECT object named "stuff" in geomview's object browser.
Note that the "|" (pipe-sign) GCL command is a synonym for "emodule-run".
If invoked with no "-c objectname", it simply writes the VECT data
(as opposed to a GCL command containing that data) to standard output.

#! /bin/sh

if [ "x$1" = "x-c" ]; then
   objname="$2"
   echo "(geometry '$objname' {"
   shift 2
fi

awk '
  BEGIN { n = 0; }

  NF == 3 {
	v[n++] = $0;
  }
  END {
	print "VECT";
	print n, n, 0;
	for(i = 0; i < n; i++) print "1";
	for(i = 0; i < n; i++) print "0";
	for(i = 0; i < n; i++) print v[i];
  }' "$@"

if [ -n "$objname" ]; then
    echo "})"
fi



> 2) I've noticed that if you place several objects in the camara view, 
>    Geomview doesn't use the same coordinate space and they all end up
>    centered and as large as possible.  Is there anyway to change this?

Yes -- turn off normalization.  In the SGI version, the control is on the
"Obscure" panel.  Alternatively you could enter the GCL command
(possibly by putting it in ~/.geomview):

    (normalization world none)

Then, if the objects you're interested in aren't compact and close to the
origin, you can use the Look At button to get a good view of them.


 
Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
 
site hosted by
SourceForge Logo