Primitive-Based Modeling System
Basic System
#include "lang.h"
#include "prim.h"
#include "sphere.h"
#include "hier.h"
main(int argc, char **argv)
{
lang_define("hier", hier_parse);
lang_define("group", group_parse);
lang_define("transform", xform_parse);
lang_define("sphere", sphere_parse);
if (lang_parse() == 0)
lang_eval();
exit(0);
}
Input-Output
hier {
transform { translate = { .5, .5, 0}},
group {
transform { zrotate = .4 },
obj = sphere{ },
transform { translate = {.2, 0, 1}},
group {
transform{ scale = {2, 0.4, 1}},
obj = sphere{ radius = .1} }
}
};
Extension Options
-
Include visualization as 3 orthogonal views (XYZ) and an auxiliary view.
-
Include different edit commands, such as: create, delete, rename, undo,
select, etc.
-
Include the Primitives: Box, Cone, Cylinder, Torus and Superquadrics.
The primitive instances should be identified by symbolic names and
have an arbitrary transformation associated with it.
The user should be able to change the all parameters of an object
after it is created.
-
Include groups. Groups are identified by a name. The group hierarchy
should be displayed as a graph in the auxiliary view.
-
Include Joints and support to construct articulated figures.
Copyright © 1998 Luiz Velho