GEOMVIEW(5gv)
๐ NAME ๐
Geomview โ the Geomview command language. That's it, that's the whole vibe, bestie. (Geomview(5gv) if you're being formal about it ๐
)
๐ NOTE ๐
The material in this manual page also appears in the Geomview manual. Twins fr fr. ๐ซถ
๐ฆ DESCRIPTION ๐ฆ
gcl: the Geomview Command Language โจ
Okay so gcl? It's got the syntax of lisp โ meaning an expression of the form (f a b ...) means pass the values of a, b, ... to the function f. Cute, right?
But listen closely, because this part matters: gcl is very limited and is by no means an implementation of lisp. It is simply a language for expressing commands to be executed in the order given, rather than a programming language. It does not support variable or function definition. Periodt. Don't go expecting more, she's doing her best. ๐ญ
gcl is the language that Geomview understands for files that it loads as well as for communication with other programs.
To execute a gcl command interactively, you can bring up the Commands panel which lets you type in a command; Geomview executes the command when you hit the return key. Output from such commands is printed to standard output. Alternately, you can invoke Geomview as geomview -c - which causes it to read gcl commands from standard input. โจ
gcl functions return a value, and you can nest function calls in ways which use this returned value. For example
(f (g a b))
evaluates (g a b) and then evaluates (f x) where x is the result returned by (g a b). Geomview maintains these return values internally but does not normally print them out. To print out a return value pass it to the echo function. For example the geomview-version function returns a string representing the version of Geomview that is running, and
(echo (geomview-version))
prints out this string. Look at her go ๐
Many functions simply return t for success or nil for failure; this is the case if the documentation for the function does not indicate otherwise. These are the lisp symbols for true and false, respectively. (They correspond to the C variables Lt and Lnil which you are likely to see if you look at the source code for Geomview or some of the external modules.) ๐
In the descriptions of the commands below several references are made to "OOGL" formats. OOGL is the data description language that Geomview uses for describing geometry, cameras, appearances, and other basic objects. For details of the OOGL formats, *Note OOGL File Formats::. (Or equivalently, see the oogl(5) manual page, distributed with Geomview in the file man/cat5/oogl.5.)
The gcl commands and argument types are listed below. Most of the documentation in this section of the manual is available within Geomview via the ? and ?? commands. The command (? COMMAND) causes Geomview to print out a one-line summary of the syntax of COMMAND, and (?? COMMAND) prints out an explanation of what COMMAND does. You can include the wild-card character * in COMMAND to print information for a group of commands matching a pattern. For example, (?? *emodule*) will print all information about all commands containing the string emodule. (? *) will print a short list of all commands. ๐
Conventions Used In Describing Argument Types ๐
The following symbols are used to describe argument types in the documentation for gcl functions. Iconic lineup, honestly:
APPEARANCEโ is an OOGL appearance specification.CAM-IDโ is an ID that refers to a camera.CAMERAโ is an OOGL camera specification.GEOM-IDโ is an ID that refers to a geometry.GEOMETRYโ is an OOGL geometry specification.IDโ is a string which names a geometry or camera. Besides those you create, valid ones are:World, world, worldgeom, g0โ the collection of all geom'stargetโ selected target object (cam or geom)centerโ selected center-of-motion objecttargetcamโ last selected target cameratargetgeomโ last selected target geomfocusโ camera where cursor is (or most recently was)allgeomsโ all geom objectsallcamsโ all camerasdefault, defaultcam, prototypeโ future cameras inherit default's settings
The following IDs are used to name coordinate systems, e.g. in pick and write commands:
World, world, worldgeom, g0โ the world, within which all other geoms live.universeโ the universe, in which the World, lights and cameras live. Cameras' world2cam transforms might better be called universe2cam, etc.selfโ "this Geomview object". Transform from an object toselfis the identity; writing its geometry gives the object itself with no enclosing transform; picked points appear in the object's coordinates.primitiveโ (forpickonly) Picked points appear in the coordinate system of the lowest-level OOGL primitive.
A name is also an acceptable id. Given names are made unique by appending numbers if necessary (i.e. foo<2>). Every geom is also named g[n] and every camera is also named c[n] (g0 is always the worldgeom): this name is used as a prefix to keyboard commands and can also be used as a gcl id. Numbers are reused after an object is deleted. Both names are shown in the Object browser. ๐ฆ
STATEMENTโ represents a function call. Function calls have the form(func arg1 arg2 ... ), wherefuncis the name of the function andarg1,arg2, ... are the arguments.TRANSFORMโ is an OOGL 4x4 transformation matrix.WINDOWโ is an OOGL winddow specification.
Gcl Reference Guide ๐
!โ is a synonym forshell(< EXPR1 EXPR2)โ Returnstif EXPR1 is less than EXPR2. EXPR1 and EXPR2 should be either both integers or floats, or both strings.(= EXPR1 EXPR2)โ Returnstif EXPR1 is equal to EXPR2. EXPR1 and EXPR2 should be either both integers or floats, or both strings.(> EXPR1 EXPR2)โ Returnstif EXPR1 is greater than EXPR2. EXPR1 and EXPR2 should be either both integers or floats, or both strings.(? [command])โ Gives one-line usage summary forcommand. Command may include*s as wildcards; see also??One-line command help; lists names only if multiple commands match.?is a synonym forhelp(?? command)โcommandmay include*wildcards. Prints more info than(? command).??is a synonym formorehelp.|โ is a synonym foremodule-run.(all geometry)โ returns a list of names of all geometry objects. Use e.g.(echo (all geometry))to print such a list.(all camera)โ returns a list of names of all cameras.(all emodule defined)โ returns a list of all defined external modules.(all emodule running)โ returns a list of all running external modules.(ap-override [on|off])โ Selects whether appearance controls should override objects' own settings. On by default. With no arguments, returns current setting.(backcolor CAM-ID R G B)โ Set the background color of CAM-ID; R G B are numbers between 0 and 1.(background-image CAM-ID [FILENAME])โ Use the given image as the background of camera CAM-ID (which must be a real camera, notdefaultorallcams). Centers the image on the window area. Works only with GL and OpenGL graphics. Use "" for filename to remove background. With no filename argument, returns name of that window's current background image, or "". Any file type acceptable as a texture is allowed, e.g. .ppm.gz, .sgi, etc.(bbox-color GEOM-ID R G B)โ Set the bounding-box color of GEOM-ID; R G B are numbers between 0 and 1.(bbox-draw GEOM-ID [yes|no])โ Say whether GEOM-ID's bounding-box should be drawn;yesif omitted.(camera CAM-ID [CAMERA])โ Specify data for CAM-ID; CAMERA is a string giving an OOGL camera specification. If no camera CAM-ID exists, it is created; in this case, the second argument is optional, and if omitted, a default camera is used. See also: new-camera.(camera-draw CAM-ID [yes|no])โ Say whether or not cameras should be drawn in CAM-ID;yesif omitted.(camera-prop { geometry object } [projective])โ Specify the object to be shown when drawing other cameras. By default, this object is drawn with its origin at the camera, and with the camera looking toward the object's -Z axis. With theprojectivekeyword, the camera's viewing projection is also applied to the object; this places the object's Z=-1 and Z=+1 at near and far clipping planes, with the viewing area -1<={X,Y}<=+1. Example:(camera-prop { < cube } projective)(camera-reset CAM-ID)โ Reset CAM-ID to its default value.(car LIST)โ returns the first element of LIST.(cdr LIST)โ returns the list obtained by removing the first element of LIST.(clock)โ Returns the current time, in seconds, as shown by this stream's clock. See also setclock and sleep-until.(command INFILE [OUTFILE])โ Read commands from INFILE; send corresponding responses (e.g. anything written to filename-) to OUTFILE, stdout
โฆby default. ๐ซ
(copy [ID] [name])โ ok so this is the dupe button ๐๐ it copies an object or a camera. If ID isn't specified, it's assumed to betargetgeom. And if name isn't specified, it's assumed to be the same as the name of ID โ same name, no extra thoughts, head empty, love that for us ๐ซถ(cursor-still [INT])โ sets the number of microseconds the cursor must not move in order to register as holding still ๐ฑ๏ธโ. No INT given? Then the value gets reset to the default. back to factory settings, we stan a reset ๐ธ(cursor-twitch [INT])โ sets the distance the cursor must not move (in x or y) to register as holding still ๐. Same deal: no INT and it resets to the default โจ(delete ID)โ deletes object or camera ID. bye bestie ๐๐
(dice GEOM-ID N)โ dices any Bezier patches inside GEOM-ID into NxN meshes ๐ฒ, and the default is10. See also the appearance attributedice, which makes this command obsolete. (she's a legacy queen ๐)(dimension [N])โ sets or reads the space dimension for N-dimensional viewing ๐. (Since calculations are done using homogeneous coordinates, this means matrices are (N+1)x(N+1) โ yes really, that's the shape ๐งฎ.) With no arguments, it returns the current dimension, or0if N-dimensional viewing has not been enabled.(dither CAM-ID {on|off|toggle})โ turns dithering on or off in that camera.toggledoes the flip โจ(draw CAM-ID)โ draws the view in CAM-ID, if it needs redrawing. See alsoredraw๐จ(echo ...)โ writes the given data to the special file-๐. Strings are written literally; lisp expressions are evaluated and their values written. If it was received from an external program,echosends it to that program's input. Otherwise it writes to geomview's own standard output (typically the terminal) ๐ฅ๏ธ(emodule-clear)โ clears the geomview application (external module) browser ๐งนโจ(emodule-define NAME SHELL-COMMAND ...)โ defines an external module called NAME, which then appears in the external-module browser ๐ง. The SHELL-COMMAND string is a UNIX shell command which invokes the module. Seeemodule-runfor discussion of external modules.(emodule-defined 'modulename')โ if the given external-module name is known, it returns the name of the program invoked when it's run, as a quoted string; otherwise it returnsnil๐ณ๏ธ. And(echo (emodule-defined 'name'))prints the string for you ๐จ๏ธ(emodule-isrunning NAME)โ returnsLtif the emodule NAME is running, orLnilif it is not running ๐. NAME is searched for in the names as they appear in the browser and in the shell commands used to execute the external modules (not including arguments).(emodule-path)โ returns the current search path for external modules ๐บ๏ธ. Note: to actually see the value returned by this function you should wrap it in a call to echo:(echo (emodule-path)). See alsoset-emodule-path.(emodule-run SHELL-COMMAND ARGS...)โ runs the given SHELL-COMMAND (a string containing a UNIX shell command) as an external module ๐. The module's standard output is taken as geomview commands; responses (written to filename-) are sent to the module's standard input. The shell command is interpreted by/bin/sh, so e.g. I/O redirection may be used; a program which prompts the user for input from the terminal could be run with:
(emodule-run yourprogram <&2)
If not already set, the environment variable $MACHTYPE is set to the name of the machine type ๐ท๏ธ. Input and output connections to geomview are dropped when the shell command terminates. Clicking on a running program's module-browser entry sends the signal SIGHUP to the program โก. For this to work, programs should avoid running in the background; those using FORMS or GL should call foreground() before the first FORMS or winopen() call. See also emodule-define, emodule-start.
(emodule-sort)โ sorts the modules in the application browser alphabetically ๐คโจ(emodule-start NAME)โ starts the external module NAME, defined byemodule-define. Equivalent to clicking on the corresponding module-browser entry ๐(emodule-transmit NAME LIST)โ places LIST into external module NAME's standard input ๐จ. NAME is searched for in the names of the modules as they appear in the External Modules browser and then in the shell commands used to execute the external modules. Does nothing ifmodnameis not running.(escale GEOM-ID FACTOR)โ same asscalebut multiplies byexp(scale). Obsolete. ๐ต(event-keys {on|off})โ turns keyboard events on or off to enable/disable keyboard shortcuts โจ๏ธ(event-mode MODESTRING)โ sets the mouse event (motion) mode ๐ฑ๏ธ; MODESTRING should be one of the following strings:"[r] Rotate""[t] Translate""[z] Cam Zoom""[s] Geom Scale""[f] Cam Fly""[o] Cam Orbit""[le] Edit Lights"
(event-pick {on|off})โ turns picking on or off ๐ฏ(evert GEOM-ID [yes|no])โ sets the normal eversion state of GEOM-ID ๐. If the second argument is omitted, it toggles the eversion state.(exit)โ terminates geomview. she's done, she's leaving ๐๐(ezoom GEOM-ID FACTOR)โ same aszoombut multiplies byexp(zoom). Obsolete. ๐ต(freeze CAM-ID)โ freezes CAM-ID ๐ง; drawing in this camera's window is turned off until it is explicitly redrawn with(redraw CAM-ID), after which time drawing resumes as normal โ๏ธ(geometry GEOM-ID [GEOMETRY])โ specifies the geometry for GEOM-ID ๐. GEOMETRY is a string giving an OOGL geometry specification. If no object called GEOM-ID exists, it is created; in this case the GEOMETRY argument is optional, and if omitted, the new object GEOM-ID is given an empty geometry (empty geometry, empty vibes ๐ซฅ).(geomview-version)โ returns a string representing the version of geomview that is running ๐ท๏ธ(hdefine 'geometry'|'camera'|'transform'|'window' name value)โ sets the value of a handle of a given type ๐ชข.(hdefine <type> <name> <value>)is generally equivalent to(read <type> { define <name> <value> })except that the assignment is done whenhdefineis executed (possibly not at all if inside a conditional statement), while theread ... defineperforms assignment as soon as the text is read โฑ๏ธ(help [command])โ command may include*s as wildcards; see also??. One-line command help; lists names only if multiple commands match ๐โจ(hmodel CAMID {virtual|projective|conformal})โ sets the model used to display geometry in this camera ๐; see alsospace.(hsphere-draw CAMID [yes|no])โ says whether to draw a unit sphere: the sphere at infinity in hyperbolic space, and a reference sphere in Euclidean and spherical spaces ๐ซง. If the second argument is omitted,yesis assumed.(if TEST EXPR1 [EXPR2])โ evaluates TEST; if TEST returns a non-nil value, it returns the value of EXPR1 ๐. If TEST returnsnil, it returns the value of EXPR2 if EXPR2 is present, otherwise it returnsnil.(inhibit-warning STRING)โ inhibits geomview from displaying a particular warning message determined by STRING ๐. At present there are no warning messages that this applies to, so this command is rather useless ๐(input-translator "#prefix_string" "Bourne-shell-command")โ defines an external translation program for special input types ๐. When asked to read a file which begins with the specified string, geomview invokes that program with standard input coming from the given file. The program is expected to emit OOGL geometric data to its standard output. In this implementation, only prefixes beginning with#are recognized. Useful as in:
(input-translator "#VRML" "vrml2oogl")
(interest (COMMAND [args]))โ lets you express interest in a command ๐. When geomview executes that command in the future it will echo it to the communication pool from which the interest command came. COMMAND can be any command. Args specify restrictions on the values of the arguments; if args are present in the interest command, geomview will only echo calls to the command in which the arguments match those given in the interest command. Two special argument values may appear in the argument list.*matches any value.nilmatches any value but suppresses the reporting of that value; its value is reported asnil.
The purpose of the interest command is to allow external modules to find out about things happening inside geomview ๐ต๏ธ. For example, a module interested in knowing when a geom called foo is deleted could say (interest (delete foo)) and would receive the string (delete foo) when foo is deleted.
Picking is a special case of this ๐ฏ. For most modules interested in pick events the command (interest (pick world)) is sufficient. This causes geomview to send a string of the form (pick world ...) every time a pick event (right mouse double click). See
โ peep the pick command for the details. ๐
(lines-closer CAM-ID DIST)โ Draws lines (edges included, bestie) closer to the camera than polygons byDIST/10^5of the Z-buffer range.DIST=3.0by default. Now listen closely: ifDISTis too small, a line lying on a surface may show up dotted or literally invisible, depending on the viewpoint. IfDISTis too large, lines may appear in front of surfaces that they actually lie behind. ๐ญ Good values forDISTvary with the scene, the viewpoint, and the distance between the near and far clipping planes. This feature is a kludge, but it can be helpful. (a kludge that eats, honestly ๐)(load filename [command|geometry|camera])โ Loads the given file into geomview. The optional second argument says what type of data it holds, and it may becommand(geomview commands),geometry(OOGL geometric data), orcamera(OOGL camera definition). If you leave it out, it attempts to guess what's in the file. Loading geometric data creates a new visible object; loading a camera opens a new window; loading a command file executes those commands. โจ(load-path)โ Returns the current search path for command, geometry, etc. files. Note: to actually see the value this function returns, you should wrap it in a call toecho:(echo (load-path)). See alsoset-load-path.(look [objectID] [cameraID])โ Rotates the named camera to point toward the center of the bounding box of the named object (or the origin in hyperbolic or spherical space). In Euclidean space, it moves the camera forward or backward until the object appears as large as possible while still being entirely visible. Equivalent to:
progn (
(look-toward [objectID] [cameraID] {center | origin})
[(look-encompass [objectID] [cameraID])]
)
If objectID is not specified, it is assumed to be World. If cameraID is not specified, it is assumed to be targetcam. ๐
(look-encompass [objectID] [cameraID])โ MovescameraIDbackwards or forwards until its field of view surroundsobjectID. Heads up though: this routine works only in Euclidean space. IfobjectIDis not specified, it is assumed to be the world. IfcameraIDis not specified, it is assumed to be thetargetcam. See also(look-encompass-size).(look-encompass-size [view-fraction clip-ratio near-margin far-margin])โ Sets/returns the parameters used by(look-encompass).view-fractionis the portion of the camera window filled by the object, andclip-ratiois the max allowed ratio of near-to-far clipping planes. The near clipping plane is1/near-margintimes closer than the near edge of the object, and the far clipping plane isfar-margintimes further away. Returns the list of current values. Defaults:.75 100 0.1 4.0๐(look-recenter [objectID] [cameraID])โ Translates and rotates the camera so that it is looking in the-zdirection (inobjectID's coordinate system) at the center ofobjectID's bounding box (or the origin of the coordinate system in non-Euclidean space). In Euclidean space, the camera is also moved as close as possible to the object while allowing the entire object to be visible. Also makes sure that the y-axes ofobjectIDandcameraIDare parallel.(look-toward [objectID] [cameraID] [origin | center])โ Rotates the named camera to point toward the origin of the object's coordinate system, or the center of the object's bounding box (in non-Euclidean space, the origin will be used automatically). DefaultobjectIDis the world, default camera istargetcam, and the default location to point towards is the center of the bounding box.(merge {window|camera} CAM-ID { WINDOW or CAMERA ... } )โ Modifies the given window or camera, changing just those properties specified in the last argument. E.g.
(merge camera 'Camera' { far 20 })
sets Camera's far clipping plane to 20 while leaving other attributes untouched. Not me touching one thing and nothing else โ icon behavior fr. ๐
(merge-ap GEOM-ID APPEARANCE)โ Merges in some appearance characteristics toGEOM-ID. Appearance parameters include surface and line color, shading style, line width, and lighting.merge-base-apis a synonym formerge-baseap. (yes bestie they're the same thing, do not fight it ๐ธ)(merge-baseap APPEARANCE)โ Merges in some appearance characteristics to the base default appearance (applied to every geom before its own appearance). Lighting is typically included in the base appearance.(morehelp command)โcommandmay include*wildcards. Prints more info than(help command). ๐ฆ(name-object ID NAME)โ Assigns a newNAME(a string) toID. A number is appended if that name is in use (for example,foo->foo<2>). The new name, possibly with the number appended, may be used as the object's id thereafter.(ND-axes CAMID [CLUSTERNAME [Xindex Yindex Zindex]])โ In our model for N-D viewing (enabled by(dimension)), objects in N-space are viewed by N-dimensional camera clusters. Each real camera window belongs to some cluster, and shows & manipulates a 3-D axis-aligned projected subspace of the N-space seen by its cluster. Moving one camera in a cluster affects its siblings. ๐ฏ
The ND-axes command configures all this. It specifies a camera's cluster membership, and the set of N-space axes which become the 3-D camera's X, Y, and Z axes. Axes are specified by their indices, from 0 to N-1 for an N-dimensional space. Cluster CLUSTERNAME is implicitly created if not previously known. To read a camera's configuration, use (echo (ND-axes CAMID)).
(ND-color CAMID [ (( [ID] (x0 x1 x2 ... xn) v r g b a v r g b a ... ) ((x0 ... xn) v r g b a v r g b a ...) ...)] )โ Specifies a function, applied to each N-D vertex, which determines the colors of N-dimensional objects as shown in cameraCAMID. Each coloring function is defined by a vector (inID's coordinate system)[x0 x1 ... xn]and by a sequence of value (v)/color(r g b a) tuples, ordered by increasingv. The inner productv=P.[x]is linearly interpolated in this table to give a color.
If ID is omitted, the (xi) vector is assumed in universe coordinates. The ND-color command specifies a list of such functions; each vertex is colored by their sum (so e.g. green intensity could indicate projection along one axis while red indicated another). An empty list, as in (ND-color CAMID ()), suppresses coloring. With no second argument, (ND-color CAMID) returns that camera's color-function list. Even when coloring is enabled, objects tagged with the keepcolor appearance attribute are shown in their natural colors. ๐
(ND-xform OBJID [ntransform { idim odim ... }])โ Sets or returns the N-D transform of the given object. In dimension N, this is an (N+1)x(N+1) matrix. Note that all cameras in a camera-cluster have the same N-D transform.(ND-xform-get ID [from-ID])โ Returns the N-D transform of the given object in the coordinate system offrom-ID(defaultuniverse), in the sense
<point-in-ID-coords> * Transform = <point-in-from-ID-coords>
(new-alien name [GEOMETRY])โ Creates a new alien (a geom not in the world) with the given name (a string).GEOMETRYis a string giving an OOGL geometry specification. IfGEOMETRYis omitted, the new alien is given an empty geometry. If an object with that name already exists, the new alien is given a unique name. The light beams that are used to move around the lights are an example of aliens. They're drawn but are not controllable the way ordinary objects are: they don't appear in the object browser and the user can't move them with the normal motion modes. ๐ฝโจ(new-camera name [CAMERA])โ Creates a new camera with the given name (a string). If a camera with that name already exists, the new object is given a unique name. IfCAMERAis omitted a default camera is used.(new-center [id])โ Stopsid, then setsid's transform to the identity. Defaultidistarget. Also, if theidis a camera, calls(look-recenter World id). The main function of the call to(look-recenter)is to place the camera so that it is pointing parallel to the z axis toward the center of the world.(new-geometry name [GEOMETRY])โ Creates a new geom with the given name (a string).GEOMETRYis a string giving an OOGL geometry specification. IfGEOMETRYis omitted, the new object is given an empty geometry. If an object with that name already exists, the new object is given a unique name.(new-reset)โ Equivalent to
(progn (new-center ALLGEOMS)(new-center ALLCAMS))
(NeXT)โ Returnstif running on a NeXT,nilif not. (iykyk ๐)(normalization GEOM-ID {each|none|all|keep})โ Sets the normalization status ofGEOM-ID. Here's the breakdown:noneโ suppresses all normalization.eachโ normalizes the object's bounding box to fit into the unit sphere, with the center of its bounding box translated to the origin. The box is scaled such that its long diagonal,sqrt((xmax-xmin)^2 + (ymax-ymin)^2 + (zmax-zmin)^2), is 2.allโ resembleseach, except when an object is changing (e.g. when its geometry is being changed by an external program). Then,
each tightly fits the bounding box around the object whenever it changes and normalizes accordingly, while all normalizes the union of all variants of the object and normalizes accordingly. keep leaves the current normalization transform unchanged when the object changes. Pro tip bestie: it may be useful to apply each or all normalization to the first version of a changing object to bring it in view, then switch to keep. ๐
(pick COORDSYS GEOMID G V E F P VI EI FI)โ bestie, this one runs internally in response to pick events (right mouse double click). Hereโs the breakdown:COORDSYS= coordinate system in which coordinates of the following arguments are specified. Can be:world: world coord sysself: coord sys of the picked geom (GEOMID)primitive: coord sys of the actual primitive within the picked geom where the pick occurred.
GEOMID= id of picked geomG= picked point (actual intersection of pick ray with object)V= picked vertex, if anyE= picked edge, if anyF= picked faceP= path to picked primitive [0 or more]VI= index of picked vertex in primitiveEI= list of indices of endpoints of picked edge, if anyFI= index of picked face- External modules can find out about pick events by registering interest in calls to
pickvia theinterestcommand. ๐
(pick-invisible [yes|no])โ selects whether picks should be sensitive to objects whose appearance makes them invisible; defaultyes. With no arguments, returns current status. โจ(pickable GEOM-ID {yes|no})โ says whether or notGEOM-IDis included in the pool of objects that could be returned from the pick command. ๐(position objectID otherID)โ sets the transform ofobjectIDto that ofotherID. slay.(position-at objectID otherID [center | origin])โ translatesobjectIDto the center of the bounding box or the origin of the coordinate system ofotherID(parallel translation). Default iscenter. ๐ซ(position-toward objectID otherID [center | origin])โ rotatesobjectIDso that the center of the bounding box or the origin of the coordinate system of theotherIDlies on the positive z-axis of the first object. Default is the center of the bounding box. ๐(progn STATEMENT [ ... ])โ evaluates eachSTATEMENTin order and returns the value of the last one. Useprognto group a collection of commands together, forcing them to be treated as a single command. iykyk.quitis a synonym forexit. periodt.(quote EXPR)โ returns the symbolic lisp expressionEXPRwithout evaluating it. ๐ง(rawevent dev val x y t)โ enters the specified raw event into the event queue. The arguments directly specify the members of the event structure used internally by geomview. This is the lowest level event handler and is not intended for general use. ๐(rawpick CAMID X Y)โ processes a pick event in cameraCAMIDat location (X,Y) given in integer pixel coordinates. This is a low-level procedure not intended for external use. ๐(read {geometry|camera|transform|command} {GEOMETRY or CAMERA or ...})โ reads and interprets the text in...as containing the given type of data. Useful for defining objects using OOGL reference syntax, e.g.
(geometry thing { INST transform : T geom : fred })
(read geometry { define fred QUAD 1 0 0 0 1 0 0 0 1 1 0 0 })
(read transform { define T <myfile})
(real-id ID)โ returns a string canonically identifying the givenID, ornilif the object does not exist. Examples:
(if (real-id fred) (delete fred))
deletes fred if it exists but reports no error if it doesnโt, and
(if (= (real-id targetgeom) (real-id World)) () (delete targetgeom))
deletes targetgeom if it is different from the World. ๐
(redraw CAM-ID)โ states that the view inCAM-IDshould be redrawn on the next pass through the main loop or the next invocation ofdraw. โจ(regtable)โ shows the registry table. (yes thatโs it bestie) ๐(rehash-emodule-path)โ rebuilds the application (external module) browser by reading all.geomview-*files in all directories on theemodule-path. Primarily intended for internal use; any applications defined by(emodule-define ...)commands outside of the.geomview-*files on theemodule-pathwill be lost. Does not sort the entries in the brower; see(emodule-sort)for that. ๐ญ(replace-geometry GEOM-ID PART-SPECIFICATION GEOMETRY)โ replaces a part of the geometry forGEOM-ID. ๐ฆ(rib-display [frame|tiff] FILEPREFIX)โ sets Renderman display to framebuffer (popup screen window) or a TIFF format disk file.FILEPREFIXis used to construct names of the formprefixNNNN.suffix(i.e.foo0000.rib). The number is incremented on every call torib-snapshotand reset to0000whenrib-displayis called. TIFF files are given the same prefix and number as the RIB file (i.e.foo0004.ribgeneratesfoo0004.tiff). The defaultFILEPREFIXisgeomand the default format is TIFF. (Note that geomview just generates a RIB file, which must then be rendered.) ๐(rib-snapshot CAM-ID [filename])โ writes a Renderman snapshot (in RIB format) ofCAM-IDto<filename>. If no filename specified, seerib-displayfor explanation of the filename used. ๐ธ(scale GEOM-ID FACTOR [FACTORY FACTORZ])โ scalesGEOM-ID, multiplying its size byFACTOR. The factors should be positive numbers. IfFACTORYandFACTORZare present and non-zero, the object is scaled byFACTORin x, byFACTORYin y, and byFACTORZin z. If onlyFACTORis present, the object is scaled byFACTORin x, y, and z. Scaling only really makes sense in Euclidean space.
Mouse-driven scaling in other spaces is not allowed; the scale command may be issued in other spaces but should be used with caution because it may cause the data to extend beyond the limits of the space. โ ๏ธ
(scene CAM-ID [GEOMETRY])โ makesCAM-IDlook atGEOMETRYinstead of at the universe. ๐(set-clock TIME)โ adjusts the clock for this command stream to readTIME(in seconds) as of the moment the command is received. See alsosleep-until,clock. โฐ(set-conformal-refine CMX [N [SHOWEDGES]])โ sets the parameters for the refinement algorithm used in drawing in the conformal model.CMXis the cosine of the maximum angle an edge can bend before it is refined. Its value should be between-1and1; the default is0.95; decreasing its value will cause less refinement.Nis the maximum number of iterations of refining; the default is6.SHOWEDGES, which should benooryes, determines whether interior edges in the refinement are drawn. ๐(set-emodule-path (PATH1 ... PATHN))โ sets the search path for external modules. ThePATHishould be pathnames of directories containing, for each module, the moduleโs executable file and a.geomview-<modulename>file which contains an(emodule-define ...)command for that module. This command implicitly calls(rehash-emodule-path)to rebuild the application brower from the new path setting. The special directory name+is replaced by the existing path, so e.g.(set-emodule-path (mydir +))prependsmydirto the path. โจ(set-load-path (PATH1 ... PATHN))โ sets search path for command, geometry, etc. files. ThePATHiare strings giving the pathnames of directories to be searched. The special directory name+is replaced by the existing path, so e.g.(set-load-path (mydir +))prependsmydirto the path. ๐(set-motionscale X)โ sets the motion scale factor toX(default value0.5). These commands scale their motion by an amount which depends on the distance from the frame to the center and on the size of the frame. Specifically, they scale by
dist + scaleof(frame) * motionscale
where dist is the distance from the center to the frame and motionscale is the motion scale factor set by this function. Scaleof(frame) measures the size of the frame object. ๐
(setenv name string)โ sets the environment variablenameto the valueSTRING; the name is visible to geomview (as in pathnames containing$name) and to processes it creates, e.g. external modules. ๐(sgi)โ returnstif running on an sgi machine,nilif not. ๐ป(shell SHELL-COMMAND)โ executes the given UNIXSHELL-COMMANDusing/bin/sh. Geomview waits for it to complete and will be unresponsive until it does. A synonym is!. ๐(sleep-for TIME)โ suspends reading commands from this stream forTIMEseconds. Commands already read will still be executed;sleep-forinsideprognwonโt delay execution of the rest of the prognโs contents. ๐ด(sleep-until TIME)โ suspends reading commands from this stream untilTIME(in seconds). Commands already read will still be executed;sleep-untilinsideprognwonโt delay execution of the rest of the prognโs contents. โณ
Time is measured according to this stream's clock, as set by set-clock; if it's never been set, the very first sleep-until sets it to 0 (so at the start, (sleep-until TIME) is literally the same as (sleep-for TIME)). Returns the number of seconds until TIME. โฐ
(snapshot CAM-ID FILENAME [FORMAT [XSIZE [YSIZE]]])โ Save a snapshot of CAM-ID in the FILENAME (a string). ๐ธ The FORMAT argument is optional; it may beppmscreen,sgi,ps, orppm. Appmscreensnapshot is created by reading the image directly from the given window โ the window gets popped above other windows and redrawn first, then its contents are written as a PPM format image. Withps, dumps a Postscript picture representing the view from that window; hidden-surface removal might be incorrect ๐. Withppm, dumps a PPM-format image produced by geomview's internal software renderer; this may be of arbitrary size. If the FILENAME argument begins with the vertical bar|, it's interpreted as a/bin/shcommand to which the PPM or PS data should be piped. Optional XSIZE and YSIZE values are relevant only forppmformat, and render to a window of that size (or scaled to that size, with aspect fixed, if only XSIZE is given).(soft-shader CAM-ID {on|off|toggle})โ Select whether to use software or hardware shading in that camera. โจ(space {euclidean|hyperbolic|spherical})โ Set the space associated with the world. ๐ช(stereowin CAM-ID [no|horizontal|vertical|colored] [gapsize])โ Configure CAM-ID as a stereo window. ๐no: entire window is a single pane, stereo disabledhorizontal: split left/right: left is stereo eye#0, right is #1.vertical: split top/bottom: bottom is eye#0, top is #1.colored: panes overlap, red is stereo eye#0, cyan is #1.
A gap of gapsize pixels is left between subwindows; if omitted, subwindows are adjacent. If both layout and gapsize are omitted, e.g. (stereowin CAM-ID), returns current settings as a (stereowin ...) command list. This command doesn't set stereo projection; use merge camera or camera to set the stereyes transforms, and merge window or window to set the pixel aspect ratio & window position if needed. ๐
(time-interests deltatime initial prefix [suffix])โ Indicates that all interest-related messages, when separated by at leastdeltatimeseconds of real time, should be preceded by the stringprefixand followed bysuffix; the first message is preceded byinitial. All three are printf format strings, whose argument is the current clock time (in seconds) on that stream. Adeltatimeof zero timestamps every message. Typical usage:
(time-interests .1 โ(set-clock %g)โ โ(sleep-until %g)โ) or
(time-interests .1 โ(set-clock %g)โ "(sleep-until %g) (progn (set-clock %g)" ")") or
(time-interests .1 "(set-clock %g)" "(if (> 0 (sleep-until %g)) (" "))".
(transform objectID centerID frameID [rotate|translate|translate-scaled|scale] x y z [dt] ['smooth'])โ Apply a motion (rotation, translation, scaling) to objectobjectID; that is, construct and concatenate a transformation matrix with objectID's transform. ๐ฅ The 3 IDs involved are the object that moves, the center of motion, and the frame of reference in which to apply the motion. The center is easiest understood for rotations: if centerID is the same as objectID then it will spin around its own axes; otherwise the moving object will orbit the center object. Normally frameID, in whose coordinate system the (mouse) motions are interpreted, isfocus, the current camera. Translations can be scaled proportional to the distance between the target and the center. Support for spherical and hyperbolic as well as Euclidean space is built-in: use thespacecommand to change spaces. With typerotatex, y, and z are floats specifying angles in RADIANS. For typestranslateandtranslate-scaledx, y, and z are floats specifying distances in the coordinate system of the center object. The optionaldtfield allows a simple form of animation; if present, the object moves by just that amount during approximatelydtseconds, then stops. If present and followed by thesmoothkeyword, the motion is animated with a3tห2-2tห3function, so as to start and stop smoothly. If absent, the motion is applied immediately. ๐ซ(transform-incr objectID centerID frameID [rotate|translate|translate-scaled|scale] x y z [dt])โ Apply continuing motion: construct a transformation matrix and concatenate it with the current transform of objectID every refresh (sets objectID's incremental transform). Same syntax as transform. If the optionaldtargument is present, the object is moved at each time step such that its average motion equals one instance of the motion perdtseconds. E.g.(transform-incr World World World rotate 6.28318 0 0 10.0)rotates the World about its X axis at 1 turn (2pi radians) per 10 seconds. ๐(transform-set objectID centerID frameID [rotate|translate|translate-scaled|scale] x y z)โ Set objectID's transform to the constructed transform. Same syntax as transform.(ui-center ID)โ Set the center for user interface (i.e. mouse) controlled motions to object ID. ๐ฑ๏ธui-emotion-program is an obsolete command.โ Use its new eqivalentemodule-defineinstead. (yes bestie, "eqivalent", we're keeping it exactly as written ๐)ui-emotion-run is an obsolete command.โ Use its new eqivalentemodule_startinstead.(ui-freeze [on|off])โ Toggle updating user interface panels. Off by default. โ๏ธ(ui-panel PANELNAME {on|off} [ WINDOW ] )โ Do or don't display the given user-interface panel. Case is ignored in panel names. Current PANELNAMEs are:geomviewโ main paneltoolsโ motion controlsappearanceโ appearance controlscamerasโ camera controlslightingโ lighting controlsobscureโ obscure controlsmaterialsโ material properties controlscommandโ command entry boxcreditsโ geomview credits
By default, the geomview and tools panels appear when geomview starts. If the optional Window is supplied, a position clause (e.g. (ui-panel obscure on { position xmin xmax ymin ymax }) sets the panel's default position. (Only xmin and ymin values are actually used.) A present but empty Window, e.g. (ui-panel obscure on {}) causes interactive positioning. ๐๏ธ
(ui-target ID [yes|no])โ Set the target of user actions (the selected line of the target object browser) to ID. The second argument specifies whether to make ID the current object regardless of its type. Ifno, then ID becomes the current object of its type (geom or camera). The default isyes. This command may result in a change of motion modes based on target choice. ๐ฏ(uninterest (COMMAND [args]))โ Undoes the effect of aninterestcommand.(COMMAND [args])must be identical to those used in theinterestcommand. No cap, it has to match exactly or it just won't undo. ๐ซ(update [timestep_in_seconds])โ Apply each incremental motion once. Uses timestep if it's present and nonzero; otherwise motions are proportional to elapsed real time. โฑ๏ธ(update-draw CAM-ID [timestep_in_seconds])โ Apply each incremental motion once and then draw CAM-ID. Appliestimestepseconds' worth of motion, or uses elapsed real time iftimestepis absent or zero.(window CAM-ID WINDOW)โ Specify attributes for the window of CAM-ID, e.g. its size or initial position, in the OOGL Window syntax. The special CAM-IDdefaultspecifies properties of future windows (created bycameraornew-camera). ๐ช(winenter CAM-ID)โ Tell geomview that the mouse cursor is in the window of CAM-ID. This function is for development purposes and is not intended for general use. ๐(write {command,geometry,camera,transform,window} FILENAME [ID|(ID ...)] [self|world|universe|otherID])โ write description of ID in given format to FILENAME. Last parameter chooses coordinate system for geometry & transform:- self: just the object, no transformation or appearance (geometry only)
- world: the object as positioned within the World.
- universe: object's position in universal coordinates; includes Worldtransform
- other ID: the object transformed to otherID's coordinate system.
A filename of - is a special case: data are written to the stream from which the 'write' command was read. For external modules, the data are sent to the module's standard input. For commands not read from an external program, - means geomview's standard output. (See also the command command.)
The ID can either be a single id or a parenthesized list of ids, like g0 or (g2 g1 dodec.off). ๐พ
(write-comments FILENAME GEOMID PICKPATH)โ and this one's description is coming right up in the next chunk, bestie, hold that thought ๐โจwriteโ okay so this one writes OOGL COMMENT objects that live in the GEOMID hierarchy at the level of the pick path out to FILENAME. That's the whole vibe. โจ
So here's the tea on how the matching works, bestie: COMMENTS sitting at level (a b c ... f g) will match pick paths of the form
(a b c ... f *)
where that * includes any value of g, and also any values of possible further indices h, i, j, etc. Basically it's giving "and everything under here, no cap."
And what even is a pick path? The pick path (the one that gets returned in the pick command) is a list of integer counters specifying a subpart of a hierarchical OOGL object. Descent into a complex object (LIST or INST) adds a new integer to the path. Traversal of simple objects increments the counter at the current level. Individual COMMENTS are enclosed by curly braces, and the entire string of zero, one, or more COMMENTS (written in the order in which they are encountered during hierarchy traversal) is enclosed by parentheses. ๐
Heads up though ๐ โ arbitrary data can only be passed through the OOGL libraries as full-fledged OOGLCOMMENTobjects, which can be attached to other OOGL objects via theLISTtype as described above. Ordinary comments in OOGL files (i.e. everything after'#'on a line) are ignored at when the file is loaded and cannot be returned. So if you were counting on those, nope, they're gone, not me crying about it. ๐ญ
(write-sexpr FILENAME LISPOBJECT)โ Writes the given LISPOBJECT to FILENAME. This function is intended for internal debugging use only. That's it, that's the whole thing โ strictly a devs-only backstage pass. ๐(xform ID TRANSFORM)โ Concatenate TRANSFORM with the current transform of the object (apply TRANSFORM to object ID). Stack it on top, slay. ๐(xform-incr ID TRANSFORM)โ Apply continual motion: concatenate TRANSFORM with the current transform of the object every refresh (set object ID's incremental transform to TRANSFORM). It's giving main character energy that never stops moving. ๐ฅ(xform-set ID TRANSFORM)โ Overwrite the current object transform with TRANSFORM (set object ID's transform to TRANSFORM). No stacking here bestie, we're replacing the whole thing, periodt. โจ(zoom CAM-ID FACTOR)โ Zoom CAM-ID, multiplying its field of view by FACTOR. FACTOR should be a positive number. ๐ธ
Oh and before we go, this page was literally produced from the info file โ here's the receipt:
Info file: geomview, -*-Text-*-
produced by texinfo-format-buffer
from file: geomview.tex
And that's a wrap on the whole Geomview(5) situation, bestie! ๐ซถ This gorgeous thing came to you from the Geometry Center, dated Thu Dec 12 02:41:23 CST 1996 โ yes, the date is older than some of us, iconic behavior โ and it's the tail end of Geomview(5), pages 20 and 21 if you're keeping score. Go forth and write your comments, you absolute legend. ๐๐
๐ฆ where this page comes from
- debian bookworm: geomview 1.9.5-4+b1
- debian trixie: geomview 1.9.5-5
- fedora 43: geomview 1.9.5-33.20190630git1d6759e.fc43 ยท LGPL-2.0-or-later AND GPL-2.0-or-later
- fedora 44: geomview 1.9.5-35.20190630git1d6759e.fc44 ยท LGPL-2.0-or-later AND GPL-2.0-or-later
- ubuntu jammy: geomview 1.9.5-3build1
- ubuntu noble: geomview 1.9.5-4.1build2
- ubuntu questing: geomview 1.9.5-6
- ubuntu resolute: geomview 1.9.5-6build1
- ubuntu stonking: geomview 1.9.5-6build1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms