Geometry Library For NewLISP

Started by Sunburned Surveyor, June 01, 2005, 12:03:50 PM

Previous topic - Next topic

Sunburned Surveyor

NewLISPers,



I've been brainstorming ideas for a geometry library for NewLISP. (When I can't sleep at night...)



I've jotted some things down on paper, and I'm getting ready to start writing code.



The geometry library will work with 3D entities, and will include the following geometry objects:



Points

MultiPoints

Lines

MultiLines

Polygons

MultiPolygons

3D Faces

3D Solids

3D Composite Solids

TIN Surfaces

LinearNetworks



The library will allow you to do basic geometry operations like:



[1] Scaling

[2] Rotation

[3] Translation

[4] Copying/Duplication

[5] Arraying



And lots of other things like:



- Calculate the slope and vertical difference of a 3D line.

- Determine the percentage of overlapping polygons in a MulitPolygon.

- Calculate the volume of a composite solid.



All of these functions will be available via NewLisp functions.



If you are interested in the development of this library, please let me know. I could use some advice and comments before I invest a lot of time in the design.



Thanks,



The Sunburned Surveyor

HJH

#1
Great idea! But why not consider hooking up one of those great 2D / 3D libraries out there?



--HJH

pjot

#2
You could start with the OpenGL demo and integrating GLUT. It is convenient to create a separate context with predefined functions for the 3D objects.



Peter

Sunburned Surveyor

#3
pjot and HJH,



Thanks for the suggestions. I may indeed incorporate ideas from other geometry libraries.



However, I am modeling most of my library on concepts in JTS, or the Java Topolgy Suite.



My library will be built primarily for GIS and Surveying applications, although it could be used for other pruposes. This will give the library a unique slant I think.



I would also like to implement some functionality not common to many geometry libraries. My geometry will also include a unique spatial indexing system and persistent XML storage of geometries.



The Sunburned Surveyor

nigelbrown

#4
I've used lisp (CL) to do a little povray ( http://www.povray.org/">http://www.povray.org/ the raytracer) programming by manipulating objects (CLOS) corresponding to solids then emiting their details as text into a povray scene file which is then rendered. Being able to export a state as a file for rendering lets you shift

the 3D rendering into a specialised app.



Nigel