Reputation: 44748
I want to play around with some graphics stuff. Simple animations and things. I want to fool around with raytracing too. I need help finding a library that will help me do these things. I have a few requirements:
Does anyone know of a good library i can use to fool around with?
Upvotes: 4
Views: 2583
Reputation: 2275
First thing that come to my mind is the popular open source P.O.V Raytracer (www.povray.org). POV scenes are defined entirely with script files, and some people made Python code to generate them easily.
http://code.activestate.com/recipes/205451/
http://jabas-unblog.blogspot.com/2007/04/easy-procedural-graphics-python-and-pov.html
Upvotes: 5
Reputation: 1940
The well developed raytracers that are open source are
For realtime 3D (it will be language dependant of course) there is JMonkeyEngine (Java) not sure whether that meets your "high level language" requirement.
You could consider a 3D game scripting language too, like GameCore or BlitzBasic
Upvotes: 2
Reputation: 26976
I believe there are few people putting together ray-tracers using XNA Game Studio.
One example of this with code can be seen over at:
Upvotes: 2
Reputation: 340055
I'm not aware of any libraries that satisfy your request (at least not unless I decide to publish the code for my own tracer...).
Writing a tracer isn't actually that hard anyway. I'd strongly recommend getting hold of a copy of "An Introduction to Ray Tracing" by Glassner. It goes through the actual math in relatively easy to understand terms, and also has a whole section on "how to write a ray tracer".
In any event, a "library" isn't all that much use on its own - pretty much every ray tracer has its own internal libraries but they're specific to the tracer. They typically include:
For my own tracer I actually used the javax.vecmath
packages for #3 above, but had to write my own code for #1 and #2 based on the Glassner book. The whole thing is well under 2k lines of code, and most of the individual classes are about 40 lines long.
Upvotes: 4
Reputation: 5958
Have a look at blender.org - it's an open-source 3d project with python scripting capabilities.
Upvotes: 6