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


Copyright © 1998 Luiz Velho