functional language for computing with geometry
DEF out = Assembly
WHERE
p = MKPOL:<<<0,0>>,<<1>>,<<1>>>,
B = Minkowski : <<-1/2,SQRT:3/-2>,<-1/2,SQRT:3/2>,<1,0>> : p,
vertices = <<0,0>,<1,0>,<1,0.5>,<0.5,0.5>,<0.5,1>,<0,1>>,
pol1D = MKPOL:< vertices,
<<1,2>,<2,3>,<3,4>,<4,5>,<5,6>,<6,1, AA:LIST:(1..6) >,
pol2D = MKPOL:< vertices,
<<1,2,3,4>,<4,5,6,1>>,
<<1,2>>>,
Min0 = STRUCT:
(((CONS~AA:(T:<1,2>)):vertices):(S:<1,2>:<0.1,0.1>:B)),
Min1 = Minkowski:
(AA:(C:ScalarVectProd:0.1):<<-1/2,SQRT:3/-2>,<-1/2,SQRT:3/2>,<1,0>>):pol1D,
Min2 = Minkowski:
(AA:(C:ScalarVectProd:0.1):<<-1/2,SQRT:3/-2>,<-1/2,SQRT:3/2>,<1,0>>):pol2D,
Assembly = (Min2 * Q:0.05) TOP (Min0 * Q:0.7) TOP (Min1 * Q:0.05)
END;