[comp.lang.lisp.x] Public domain extension to graphics for xlisp

jain@enuxha.eas.asu.edu (Shalabh Jain ) (10/29/90)

Does anyone know of the public domain xlisp with graphics extension running
on a PC?  If not, has anyone any one done adding of graphics functions to xlisp?
I would be interested in the corresponding with you if you have done it?

please e_mail at: atl1s@acvax.inre.asu.edu

jsp@glia.u.washington.edu (Jeff Prothero) (11/10/90)

   From: atl1s@acvax.inre.asu.edu (Shalabh Jain )

   Does anyone know of the public domain xlisp with graphics extension running
   on a PC?  If not, has anyone any one done adding of graphics functions to xlisp?
   I would be interested in the corresponding with you if you have done it?

I'm contemplating writing something along these lines.  Our lab does
video animations of 300,000-triangle reconstructions of
serially-sectioned biological specimens on SGI workstations.  The last
package I did to support this was in pure C.  It's become clear that
the efficiency issues are all down in the mesh primitives, and that
the rest of the code would benefit greatly from garbage collection and
quick-prototyping capabilities, since the issues there are complexity,
flexibility and one-time hacks.

I'm thinking of doing something like extending xlisp with hardwired
classes

 Set-Of-Triangles
 Set-Of-Line-Segments
 Window
 Graphics-State

and adding C code to implement

 (send set-of-triangles     :draw-on window :with graphics-state)
 (send set-of-line-segments :draw-on window :witn graphics-state)

(plus some read-the-mouse stuff) and then building everything else in
xlisp as subclasses of Set-Of-Triangles and Set-Of-Line-Segments.

Making the graphics primitives be sets of triangles and lines, rather
than individual triangles and lines, lets individual implementations
tune the internal representation for rendering efficiency without
affecting the xlisp code built on top.  

Building things like splines and text on top of the Set-Of-Triangles
and Set-Of-Line-Segments classes keeps a nice, narrow interface to the
machine-dependent graphics library.

This stuff could probably be made portable to PCs without too much
effort, if somebody wanted to do it.  (I've got code to do fast
pseudocolor Z-buffered Gouraud shading in software sitting around here
somewhere.)

So far, I haven't got further than reading through the xlisp 2.1
source from winterp.

If anyone is/has done such a project already, I'm all ears.  Ditto
if anyone has comments or suggestions for a good standard file
format for 3-D polygons.  Right now I'm thinking of using some simple
binary format for the polygon meshes, with separate lisp files to
record the properties and interrelationships.

 Jeff Prothero
 jsp@milton.u.washington.edu
--

- Jeff   (S)