Geomview(1gv)

πŸ’– Geomview(1gv) πŸ’–

okay bestie, sit DOWN, because we're about to talk about Geomview β€” that's the 1gv manual, section 1, local games/geometry viewer energy, and she is iconic. ✨


πŸŽ€ NAME πŸŽ€

Geomview β€” interactive geometry viewer. that's it, that's the whole name section, she's brief and she's confident πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

geomview [-b r g b] [-c commandfile] [-wins #windows] [-noinit]
     [-nopanels] [-noopengl] [-wpos xmin ymin xsize ysize]
     [-wpos xsize,ysize[@xmin,ymin]] [-e external-module-name]
     [-M[cg][sp] pipename] [-start external-module-name [arg ...] --]
     [-run external-module-path [arg ...] --] [file ...]

like… look at her. a whole runway of flags. πŸ‘‘


🌸 DESCRIPTION 🌸

so Geomview is an interactive geometry viewer, written at the Geometry Center. she displays the objects in the files you hand her on the command line, and then she lets you view and manipulate them interactively. that's the vibe. that's the whole point. 🫢

the present version β€” that's 1.7 β€” runs on Silicon Graphics Irises and on X Window System workstations. and listen, they genuinely want to hear about any problems you have using it; see below for how to contact them. they're not being fake about it. πŸ₯Ί

now here's the part that lowkey changes your life: besides giving you interactive control over a whole world of objects via mouse and keyboard, Geomview has an interpreted language of commands for controlling almost every aspect of its display. she can execute files containing statements in that language, and she can communicate with other programs using it too. for more deets on the language, check geomview(5) β€” like, for example, the file man/cat5/geomview.5 in the geomview distribution. πŸ“œ


🌈 TUTORIAL 🌈

okay so real talk: this manual page is only a (very) terse reference manual for geomview. it is not the cozy explanation. for a gentler intro to the program and to the format of the data files she can read, go look at "overview" and "oogltour" in the "doc" directory of the geomview distribution β€” or better yet, the full manual: "geomview.tex" or "geomview.ps", also in the "doc" directory. πŸ“š

and for the girlies who want to build: the source distribution also includes a tutorial for how to write external modules, in the "src/bin/example" directory. go off. 🧚


✨ OPTIONS ✨

one bullet per flag, bestie, no skipping, we're doing all of them:

  • -b β€” set the window background color to the given r g b values. aesthetic first, always. 🎨
  • -c β€” interpret the commands in commandfile, which may be - for standard input. the command language is described in geomview(5). commands may also be supplied literally, like -c "(ui-panel main off)"; since they include parentheses, they must be quoted. (parens are shy, they need the quotes πŸ₯Ί)
  • -wins β€” causes geomview to initially display #windows camera windows. windows on windows. very main character.
  • -wpos β€” specifies the initial location and size of the first camera window. with -, you get prompted for window placement. interactive placement, we love to see it. πŸͺŸ
  • -M objname β€” display (possibly dynamically changing) geometry (or commands) sent via togeomview -g objname [geomview-shell-command] or geomstuff objname file .... the data shows up as a geomview object named objname.

so what's actually happening under the hood? she listens to the named pipe /tmp/geomview/objname. you can get the same effect with these shell commands:

mkdir /tmp/geomview;
mknod /tmp/geomview/objname p

(assuming the directory and named pipe don't already exist, bestie β€” that part matters), and then executing the geomview command:

(geometry objname  < /tmp/geomview/objname)
  • -M[cg][ps[un|in|in6]] PIPENAME|TCPPORT β€” okay this one's the long one, stay with me. πŸ’€

the -M option accepts modifiers:

  • a 'g' suffix expects geometry data (that's the default),
  • a 'c' suffix expects GCL commands,
  • a 'p' implies the connection should use a named pipe (the default on everything except on the NeXT),
  • while 's' implies using a UNIX-domain socket (the default on the NeXT).

since version 1.9 of Geomview, internet domain sockets are also supported:

  • use 'sin' to make Geomview listen on the IPv4 port given by TCPPORT,
  • or use 'sin6' to make Geomview listen on an IPv6 port (also as specified by TCPPORT).
  • 'sun' is a synonym for 's', i.e. use the Unix domain socket with the name PIPENAME.

and if PIPENAME starts with a slash (/), then it's assumed to be an absolute pathname β€” otherwise the named pipe or socket is created below ${TMPDIR}/geomview/. πŸ—‚οΈ

so like, to make it concrete: -Mcs fred selects reading commands from the UNIX-domain socket named /tmp/geomview/fred, and -Mcsin 40000 selects reading commands from the IPv4 port '40000'. slay. πŸ”₯

  • -noopengl β€” disable the use of OpenGL for (possibly) hardware accelerated rendering, even if the Geomview binary has support for OpenGL compiled in. this also disables the support for transparency and and textures. (yes, the double "and and" is in the original, we keep the lore exactly as written 🫑)
  • -nopanels β€” start up displaying no panels, only graphics windows. panels may be invoked later as usual with the "Px" keyboard shortcuts or the "(ui-panel ...)" command. minimalism era. 🧘
  • -noinit β€” read no initialization files. by default, geomview reads the system-wide .geomview file, followed by those in $HOME/.geomview and ./.geomview. (so if your setup is acting weird, it's probably one of those three. iykyk πŸ‘€)
  • -e modulename β€” start an external module. modulename is the name associated with the module, appearing in the main panel's Applications browser, as defined by the emodule-define command (see geomview(5) for details).
  • -start modulename arguments ... -- β€” like -e but it lets you pass arguments to the external module. the -- signals the end of the argument list; the -- may be omitted if it would be the last argument on the geomview command line.
  • -run shell-command arguments ... β€” like -start but takes the pathname of the executable of the external module instead of the module's name. πŸƒβ™€οΈ

πŸ’œ GEOMETRY FILE FORMATS πŸ’œ

the format of the files read by geomview is described in oogl(5). type man 5 oogl, or see the file man/cat5/oogl.5 in the geomview distribution, for details. πŸ“–

note to users of MinneView (the precursor to geomview): geomview can read MinneView files, but MinneView cannot read all geomview files. it's giving one-way street, bestie. πŸ’€

🌟 STARTUP FILES 🌟

immediately upon starting up, geomview reads and executes the commands in the system-wide .geomview file in the "data" subdirectory of the geomview directory. πŸ“‚

then, if there is a file named .geomview in the current directory, she executes the commands in that file. then she checks for one in the user's home directory, and executes it if found.

the startup file of an individual user overrides the systemwide defaults, since later commands take precedence over earlier ones. so your personal config ate, and the system defaults didn't. πŸ‘‘


πŸ¦„ EXTERNAL MODULES πŸ¦„

Geomview has the ability to interact via her command language with other programs, called "external modules". many such modules have been written and they appear in the "Application" browser in the main geomview panel.

to invoke a module, you click the mouse on the module's entry in this browser. this starts the module and adds an additional entry to the browser, beginning with a number in square brackets β€” like [1] Crayola β€” which represents the running instance of that module. πŸ–οΈ

you can terminate the module by clicking on the numbered entry. modules are documented separately from geomview, so see the manual page for each module for details. periodt. πŸ’…


πŸŽ€ INSTALLING AN EXTERNAL MODULE πŸŽ€

Geomview looks for external modules in a special directory for modules. in the geomview distribution tree, that's the "bin/$MACHTYPE" subdirectory. πŸ—ƒοΈ

a module consists of two files:

  1. the executable program, and
  2. a "module init file", whose name is .geomview- followed by the module name.

the module init file tells geomview how to run that program.

be sure to always keep these two files together; geomview needs both of them in order to run the module. πŸ‘―β™€οΈ

to install a new module, simply put the module's executable file and its init file in your geomview's module directory. the next time you run geomview, she'll know about that module. no cap. ✨

geomview can actually look for modules in a list of directories; by default only the "bin/$MACHTYPE" directory is on this list. see the set-emodule-path command in geomview(5) for details.

and again for the builders: there is a tutorial for how to write external modules in the "src/bin/example" directory. 🧚


πŸ“ EXTERNAL MODULE INIT FILES πŸ“

an external module init file is the file that tells geomview how to run that module. its name must be .geomview- followed by the name of the module, e.g. .geomview-foo. 🏷️

it should contain geomview commands; typically it will contain a single emodule-define command which enters the module into geomview's application browser:

(emodule-define "Foo" "foo")

the first string is the name that appears in the browser. the second string is the command to invoke the module. it may contain arguments; in fact, it can be an arbitrary shell command. go feral. 🌈

⌨️ KEYBOARD SHORTCUTS ⌨️

okay bestie this is the part where geomview becomes a whole vibe πŸ’… β€” so many operations are available straight from the keyboard, no clicking required. Hit the "?" button on the main panel, or just type "?" with the cursor in any window, and geomview will print a message on standard output listing all the keyboard shortcuts. iconic behavior tbh.

Keyboard commands apply while the cursor is in any graphics window and most control panels. Most commands allow one of the following selection prefixes (and if you don't provide one, the command applies to the current object, which is very "default settings" of it):

g  world geom  g#  #'th geom  g*  All geoms
c  current camera   c#  #'th camera     c*  All cameras

Many allow a numeric prefix: if you don't give one, they toggle or reset the current value. πŸŽ€


🎨 Appearance:

 Draw:               Shading:       Other:
  af  Faces      0as Constant    av  eVert normals: always face viewer
  ae  Edges      1as Flat  #aw  Line Width (pixels)
  an  Normals         2as Smooth     #ac  edges Closer than faces(try 5-100)
  ab  Bounding Boxes  3as Smooth, non-lighted  al  Shade lines
  aV  Vectors         aT  allow transparency   at  Texture-mapping
 Color:              aC  allow concave polygons
  Cf Ce Cn Cb CB   face/edge/normal/bbox/backgnd

πŸŒ€ Motions: / πŸ‘€ Viewing:

 Motions:                       Viewing:
  r rotate     [ Leftmouse=X-Y plane,     0vp Orthographic view
  t translate         Middle=Z axis,      1vp Perspective view
  z zoom FOV          Shift=slow motion,        vd Draw other views' cameras
  f fly               in r/t modes.      ]     #vv field of View
  o orbit           [Left=steer, Middle=speed ]     #vn near clip distance
  s scale                       #vf far clip distance
  w/W recenter/all                    v+ add new camera
  h/H halt/halt all                   vx cursor on/off
  @  select center of motion (e.g. g3@)         vb backfacing poly cull on/off
                                     #vl focal length
  L  Look At object                   v~ Software shading on/off

πŸͺŸ show Panel:

Pm Pa Pl Po    main/appearance/lighting/obscure
Pt Pc PC Pf    tools/cameras/Commands/file-browser
Ps P-          saving/read commands from tty

πŸ’‘ Lights:

ls le      Show lights / Edit Lights

πŸ“ Metric:

me mh ms   Euclidean Hyperbolic Spherical

🧊 Model:

mv mp mc   Virtual Projective Conformal

✨ Other:

N normalization < Pf  load geom/command file
 0N none     > Ps  save something to file     ui  motion has inertia
 1N each     TV NTSC mode toggle    uc  constrained (X/Y) motion
 2N all                        uo  motion in Own coord system
Rightmouse-doubleclick  pick as current target object
Shift-Rightmouse        pick interest (center) point

🎬 Renderman:

RR send RIB output to <fileprefix>NNN.rib (default fileprefix == "geom")
RC Emulate lines using cylinders (default)
RP Emulate lines using polygons
Ra choose ASCII RIB format (default)
Rb choose BINARY RIB format
Rt choose Display token to specify .tiff file (default)
Rf choose Display token to specify framebuffer
Rs Simulate background color with Polygon (default)
Rx No background simulation - fully transparent (alpha) background

πŸ“ NOTES πŸ“

The "geomview" command is actually a shell script 🫢 β€” it sets various environment variables that tell geomview about your local setup, and then it invokes the geomview executable program "gvx" (or "gvx.OGL").

🚨 bestie DO NOT run "gvx" by itself. always, always invoke geomview with the "geomview" shell script. that's the whole point. periodt.

πŸ‘€ SEE ALSO πŸ‘€

  • oogl(5) β€” OOGL geometric file formats and conventions
  • geomview(5) β€” geomview command language reference

πŸ“‚ FILES πŸ“‚

  • data/.geomview β€” default initialization file in geomview command language
  • data/geom β€” sample data files

🌍 ENVIRONMENT 🌍

The ``geomview'' shell script sets these internally by default β€” but if you set them before invoking geomview, the values you set will be used instead of the built-in defaults. you're the main character, you get to decide πŸ’…

  • GEOMVIEW_GVX β€” geomview executable
  • GEOMVIEW_DATA_DIR β€” default directory for data files
  • GEOMVIEW_LOAD_PATH β€” colon-separated search path for data files
  • GEOMVIEW_EMODULE_DIR β€” default directory for external emodules
  • GEOMVIEW_EMODULE_PATH β€” colon-separated search path for external modules
  • GEOMVIEW_SYSTEM_INITFILE β€” system-wide GCL initialization script
  • GEOMDATA β€” top directory of the default data tree, used by some modules
  • GEOMVIEW_DOC_DIR β€” path to the user manual
  • WEBBROWSER β€” executable for viewing the HTML version of the manual when invoking the ``Manual (HTML)'' menu item
  • PDFVIEWER β€” executable for viewing the PDF version of the manual when invoking the ``Manual (PDF)'' menu item

πŸ‘‘ AUTHORS πŸ‘‘

look at this lineup, absolute legends the whole way down:

      Stuart Levy              Tamara Munzner         Mark Phillips
                Celeste Fowler              Nathaniel Thurston
                 Daniel Krech                   Scott Wisdom
                 Daeron Meyer                  Timothy Rowley

          The National Science and Technology Research Center for
           Computation and Visualization of Geometric Structures
                           (The Geometry Center)
                          University of Minnesota

                     www.geomview.org

πŸ› BUGS πŸ›

  • Sometimes core dumps on bad input files. 😭 not the crash, anything but the crash
  • Zoom and scale have no inertia. fr fr, they just don't
  • Virtual spherical mode doesn't work on VGXes. πŸ’€

and that's a wrap on the geomview(1gv) page bestie!! πŸ¦‹ this was the Geometry Center's work, dated December 10, 1996, and the manpage source/version line is just that Geometry Center / Geomview(1gv) footer with that date on it. slay, go make some shapes ✨