Dear all,
I am drawing a storage area.
and at the moment i am struggling with the containers.
Those are an imported shapefile. The containers have always the same height = 2.6.
The goal is to randomize several heights (multiples of 2.6 to a maximum of 10.4 = 4 containers over each other).
and colors.
This is my failed attempt. I'am sure is simpler than this. I just probably went in the wrong direction.
@StartRule
attr A= 2.6
attr B= 5.2
attr C= 7.6
attr D= 10.4
Containers-->
extrude (rand(2.6, 2.6), rand (5.2,5.2), rand(7.6,7.6), rand(10.4,10.4)) HGT
HGT-->
case HGT == A: ContainerColor
else:
case HGT== B:
split(y) {'0.5 : ContainerColor | ~0.5: ContainerColor}
case HGT==C:
split(y) {'0.33 : ContainerColor | '0.33 : ContainerColor | ~0.33: ContainerColor}
else:
split(y) {'0.25 : ContainerColor | '0.25 : ContainerColor | '0.25 : ContainerColor | ~0.25: ContainerColor}
ContainerColor-->
color(rand(0,1), rand(0,1))