| Description: |
A command-line program that calculates a quaternion Julia set and then writes the corresponding isosurface to a binary Stereo Lithography file.
Supports custom-defined iterative equations, such as:
Z = Z^4 + C
Z = sin(Z) + C * sin(Z)
Z = inverse(sinh(Z)) + C * inverse(sinh(Z))
etc.
See quaternion_math.h for a full list of supported quaternion functions.
Compiles using g++ and MSVC++ -- don't forget to link in the OpenGL/GLUT/GLU/GLEW libraries (ie. g++ *.cpp -lGL -lglut -lGLU -GLEW).
--------------------------------
Notes about GPU acceleration:
Note 1: There is a problem with the GPU acceleration when it's used on an AMD 6310 GPU -- the lowest order bits of some of the calculation solutions produced by the GPU are being corrupted, which leads to meshes with many unnecessary problem edges (cracks). While the meshes look OK upon visual inspection, they would not pass the 'water-tightness' tests required by most 3D printers / fabricators. If you are using an AMD GPU and the meshes being produced have a lot of problem edges, try reducing the grid resolution and vertex refinement step count parameters (to say, 100 and 8, respectively, just as a test). If that does not solve the problem, then you likely have a faulty GPU -- see Note 2.
Note 2: If you wish to disable GPU acceleration in the source code, then comment out the #define USE_GPU in quaternion_julia_set.h line 12.
--------------------------------
Changes to v3:
- Altered the shaders to be truly compliant with GLSL 1.1 (in all sincerity, it's a good thing that the Intel GLSL compiler is so strict).
- Program now saves a copy of the two fragment shaders to "main_shader.txt" and "vertex_interp_shader.txt" -- this is not absolutely necessary, but is helpful for interpreting/debugging any GLSL compiler errors that may occur on your hardware.
- Main shader now uses an RGB texture for output -- alpha-only textures aren't cross-platform compatible.
- Added the capability to hollow out the mesh (including air holes) -- useful for Shapeways.
- Added the capability to add support pillars and slabs to the mesh -- useful for Shapeways.
- Changed vertex interpolation method from linear interpolation to adaptive interpolation -- makes for more accurate isosurfaces. |