gray

gray

About Gray

Gray (Greiners Raytracer) is a hobby/research project of mine. It is a program that simulates light to produce computer generated images. The technique used is called ray tracing, where a large number of rays are cast against mathematical 3D models to simulate the interaction between light and materials. The result is beautiful computer generated images, like the ones we are used to see in special effects in movies.

Parametric Surface Tool

ProgrammingPosted by Søren Greiner Wed, February 03, 2010 14:15:56
For producing parametric surfaces for Gray, I developed a small command line tool that generates a 3D model from a parametric function.

To use the tool download it and run it using 3 functions of the parameters u and v for each x,y and z coordinate. Here is the complete input arguments for the tool:

Parametric.exe x y z umin umax vmin vmax un vn outfile.xml format

x function of u and v
y function of u and v
z function of u and v
umin minimum value of u
umax maximum value of u
vmin minimum value of v
vmax maximum value of v
u division along u parameter
v division along v parameter
outfile.xml output model filename
format output model fileformat (GRAY or K3D)

example:

Parametric.exe u sin(u/pi) v -2*pi 2*pi -2 4 100 100 test.xml GRAY

The tools is for Windows, but the C++ source code can be requested if you need to compile for your own platform.

Download: Parametric.zip

I added some .bat files as examples. Below is the "Twisted Torus"