catenoid cube45 ellipsoid rounded-cube45 sphere composition composition2 ring torus Klette-Ellipsoid

Volgen/Volcompose pages


Volgen

Volgen is a command line program that creates geometric figures in vol format and compute a signature file. For each figure, you must specify a few paremeters. The size of the volume generated depends of these parameters.

Output
Command
catenoid
volgen catenoid -c 20 -v catenoid.vol
Here, we tell volgen to draw a catenoid with with parameter c = 20, where c is as described in the page Catenoid from mathworld. The -v option tells volgen to write the result in the file catenoid.vol.
cube
volgen cube -len 15 -rx 45d -v cube45.vol
We draw a cube of len 15 and rotated of 45 degree around the X axis (-rx option).
ellipsoid
volgen ellipsoid -a 5 -b 10 -c 15 -v ellipsoid.vol
rounded cube
volgen rounded-cube -len 15 -rx 45d -v rounded-cube45.vol
sphere
volgen sphere -r 35 -v sphere.vol
ring torus
volgen torus -a 8 -c 15 -v torus.vol
Klette-Ellipsoid
volgen klette-ellipsoid -a 20 -b 15 -c 25 -v klette.vol

More figures will be available soon. To visualize these figures, we have converted the vol files to the geomview file format with vol2geom.

Volcompose

Volcompose is an other way to create synthetic objects. Instead of taking arguments in command line, it reads a description of the figures. It allows composition of figures.
Output
Description & command
catenoid
-- catenoid.src --
Catenoid c {
	rotation-Z = 0.5; /* This is a comment a là C */
params {
c = 20;
}
};
-- command line -- volcompose -v catenoid.vol < catenoid.src
composition
-- composition.src --
Cube c   { params { len = 15; } };
Cube cx1 { rotation-X = 45d; params { len = 15; } };
Cube cx2 { rotation-X = 90d; params { len = 15; } };
Cube cx3 { rotation-X = 135d; params { len = 15; } };
Cube cy1 { rotation-Y = 45d; params { len = 15; } };
Cube cy2 { rotation-Y = 90d; params { len = 15; } };
Cube cy3 { rotation-Y = 135d; params { len = 15; } };
Cube cz1 { rotation-Z = 45d; params { len = 15; } };
Cube cz2 { rotation-Z = 90d; params { len = 15; } };
Cube cz3 { rotation-Z = 135d; params { len = 15; } };
-- command line --
volcompose -v composition.vol < composition.src
The main difference between volcompose and volgen is that volcompose can draw many figures in the same volume file. In that case, the signature file has no meaning (it is just the concatenation of the signatures of the different figures).
composition2
-- composition2.src --
Catenoid c { params { c = 24; } }; 
Sphere s { params { r = 33; } }; 
Ellipsoid e { rotation-Z = 45d; params { a = 75; b = 10; c = 10; }}; 
Ellipsoid e { rotation-Z = -45d; params { a = 75; b =10; c = 10; }};
-- command line --
volcompose -v composition2.vol < composition2.src
This picture has colors, because we used the -a option (-a means "auto color") of vol2geom. This option is totally useless that's why it is absolutly essential. ;-)


Download


Check the simplevol project.

Volgen and volcompose have been successfully compiled on :

See also :

The Vol library, The Vol tools

Contact

David Coeurjolly

Valid HTML 4.0! Edited with vim