CSG Modeling System
Basic System
#include "csg.h"
main(int argc, char **argv)
{
CsgNode *t;
if((t = csg_parse()) == NULL)
exit(-1);
else
csg_write(t, stdout);
exit(0);
}
Input-Output
Input
(s{1.1 -.3 .5 0} & (s{.1 -3.01 0 5} | s{1 0 0 5}))
Output
scene { csgobj = csg_inter {
csg_prim{sphere{radius = 0.1, center = {0, 0, 5}}},
csg_union { csg_prim{sphere{radius = 0.1, center = {0, 0, 5}}},
csg_prim{sphere{radius = 0.1, center = {0, 0, 5}}}
}
}
};
Extension Options
- Include visualization as 3 orthogonal views (XYZ) and an
auxiliary view.
-
Include transformations (operator "csg_transform").
The user should be able to group primitives and transform them.
-
Include interactive capabilities. The user should be able to select
and move individual primitives or groups of primitives.
-
Include csg-tree display and manipulation. The user should be able to
create and edit the csg-tree graphically.
-
Include capabilities to compute object properties, such as volume, etc.
-
Include support for a command language integrated with the
interactive operations.
Copyright © 1998 Luiz Velho