[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Needed: 3D Graphics Library for MCL
- To: info-mcl
- Subject: Re: Needed: 3D Graphics Library for MCL
- From: firstname.lastname@example.org (Daniel LaLiberte)
- Date: 29 Oct 92 18:27:41 GMT
- In-reply-to: email@example.com's message of 28 Oct 92 22:30:38 GMT
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Illinois, Urbana-Champaign, Dept CS
- References: <firstname.lastname@example.org>
- Sender: email@example.com (News Database (admin-Mike Schwager))
I never properly announced it, but on cambridge.apple.com in mcl2/contrib
is LGL.lisp. From the header:
LGL is a Lisp implementation of an IRIS-like Graphics Library.
For more complete documentation on how to use LGL, consult the GL
manuals. I only describe some differences here.
LGL supports only the bare minimum of functionality that I required,
but also modifies and enhances the library so that it is more convenient
to use from Lisp. Some functions like "clear" conflict with Lisp
symbols, so I preceed them with "GL".
Since Lisp is interactive and MCL multi-threaded, it
is important to recover from errors that normally would crash a C program.
Therefore, instead of using the pair pushmatrix followed by popmatrix, I
provide a macro pushing-matrix that does pops in an unwind-protect.
Similarly, making-object should be used instead of makeobj and closeobj.
I need to learn more about interrupts to avoid problems with them.
Points are vectors, either 3 or 4 long depending on which is required.
In addition to functions like draw that take three arguments for x, y,
and z values of the coordinate, I provide vector versions of some functions,
e.g. drawv, that take one point vector.
LGL tries to assume that only floating point values are used, so some
day it could be optimized. If you don't always provide floating point
values, LGL may give you an error, but currently it won't crash.
I need to learn more about declarations.
Not all of the functions in the export list are implemented, but those
that are not implemented are highest in the priority list.
If you want to extend LGL, please send your changes back to me so
I may include them.
Actually, I'd rather be using a C library for speed and in fact we are
working on interfacing with VOGL. But LGL performs pretty well as is.
This is my first Common Lisp package, so I probably did several things
"wrong". Please let me know so I can correct it; I need to learn more
Also somewhat related is 3DGeometry.lisp:
Defines classes and methods for Line, Plane, Implicit-Plane, Explicit-Plane,
and Sphere. Also defines functions for common vector operations.
Most of the geometry calculations come from Graphic Gems, edited by
Andrew S. Glassner, but the errors are probably mine.
National Center for Supercomputing Applications
152 Computing Appliations Building
605 East Springfield Avenue
Champaign, IL 61820