package GExamples;
import java.util.Random;
import processing.core.*;
import GShape.Core.Objects.*;
import GShape.Core.Objects.PDisplay.PVRect;
import GShape.Core.Objects.Primitives.rect;
import GShape.Core.Objects.Primitives.vrect;
import GShape.Language.*;
public class Ex008_EmbeddChild extends PApplet{
public void setup () {
// Initialize
GShape.begin(this, "Ground", new rect (10, 10, 34, 50, 0) ); // Must be called, otherwise it will not work
GShape.showCoordinates();
// Attributes
Random rand = new Random();
int num = rand.nextInt(30) + 30;
GShape.setAttribute ("height", num);
// Envirement
GShape.SplitX ("Ground", "5m:Wiese ; Xm:tmpPerimeter ; 5m:Wiese");
GShape.SplitY ("tmpPerimeter", "5m:Wiese ; Xm:Perimeter ; 5m:Wiese");
// Building
GShape.Extrude ("Perimeter", "height:Volume");
GShape.Surfacesplit ("Volume", "Front ; Side1 ; Side2 ; Side3 ; Top");
// Facade
GShape.Alias ("Front ; Side1 ; Side2 ; Side3", "AllSides");
GShape.VerticalSplit("AllSides", "4m:EG ; ~2.2m:OG ; 4m:OG"); //
GShape.Alias ("EG ; OG", "AllFloors");
GShape.HorizontalSplit("AllFloors", "4.5m:Wall");
}
}