I really suck at math for the most part but I'm trying to implement a CAD like library of intersection functions.

The user Bike from #Lisp (irc.freenode.net) said I should probably not return lists but use structures, classes and multiple return values. I'll probably get around to that later.

Right now I just have a series of computations. More to come if there is interest.Kind of pointless without a solid common GUI library but maybe it could be used in a back end...

I'd very much like to eventually have an AutoCAD like program that is true free software.AutoCAD lets one load Lisp functions into the software meaning you can do whatever you want (very much like Emacs in the extensibility idea).

So...yeah just putting this out there. I still need to find out how atan2 works in Lisp to finishing finding my direction calculations.

The Common Lisp ATAN function has an optional second argument. If you give two numbers as arguments to ATAN then it will work like atan2 in other programming languages. Note that the second argument must be a REAL number (integer, ratio, float), i.e. not a COMPLEX number.

I would encourage you to create a CL binding to an existing library rather than attempting to create a new one from scratch.These things require a large number of functions, and the math can be quite hard to get right.

nuntius wrote:I would encourage you to create a CL binding to an existing library rather than attempting to create a new one from scratch.These things require a large number of functions, and the math can be quite hard to get right.

I've considered the loss of precision and realize that computers are really bad tools to model shapes thanks to truncation error...Do you have a library in mind to wrap? I really hate to use something written in C/C++ etc as those don't really further the language itself...