forked from jbdong/CityEngine_cga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsesame_01.cga
71 lines (45 loc) · 1.34 KB
/
sesame_01.cga
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/**
* File: sesame_01.cga
* Created: 29 Oct 2008 18:40:43 GMT
* Author: andi
*/
version "2010.3"
attr type = "" // sourced via attribute layer
// assets
const tree = "trees/appletree.lod0.obj"
Lot -->
case type == "park" : Park
case type == "center" : CenterLot
else : ResidentialLot
ResidentialLot -->
color("#333333") Bg.
color("#ffffff") s('0.9,'1,'0.9) center(xz) extrude(rand(5,20)) Mass
CenterLot --> s('0.9,'1,'0.9) center(xz) extrude(rand(20,100))
Mass -->
Mass.
comp(f){top : roofHip(20) Roof.}
Park --> color("#006600") X.
comp(e){all : Edge}
Edge --> s('1,1,1) i("builtin:cube") split(x){5 : Tree}*
Tree --> s(0,rand(4,6),0) center(x) r(90,0,rand(0,360)) i(tree)
LotInner --> Grass ProbTree
LotCorner --> X.
ProbTree -->
30% : s(0,5,0) center(xz) i(tree)
else : NIL
@StartRule
Street --> split(z){~1 : Black | 0.2 : White | ~1 : Black}
Crossing --> Black
Sidewalk --> color("#777777")
CrossingSidewalk --> color("#777777")
Junction --> Crossing
JunctionEntry --> Street
Joint --> Street
Freeway --> Street
FreewayEntry --> Street
Roundabout --> Street
RoundaboutIsland --> Sidewalk
RoundaboutEntry --> Street
Black --> color("#333333")
White --> color("#ffffff")
Grass --> color("#006600") Bg.