functional language for computing with geometry
DEF obj1 = T:<1,2,3>:<-0.5,-0.5,-0.5>: (cuboid:<1,1,1>);
DEF obj2 = R:<1,2>:(PI/4):obj1;
DEF seq = <obj1, obj2>;
DEF base = STRUCT:seq;
DEF bsp_union = +:seq;
DEF bsp_difference = -:seq;
DEF bsp_intersection = &:seq;
DEF bsp_xor = ^:seq;
DEF bsp_xor2 = ^:<bsp_xor,obj2>;
DEF out = STRUCT:<
base, T:1:2,
bsp_union, T:1:2,
bsp_difference, T:1:2,
bsp_intersection, T:1:2,
bsp_xor, T:1:2, bsp_xor2
>;