functional language for computing with geometry
DEF cubo1 = cuboid:<1,1>;
DEF cubo2 = T:<1,2>:<0.5,0.5>:cubo1;
DEF obj1 = cubo1 + cubo2;
DEF obj2 = R:<1,2>:(0.3):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>;
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%>;