-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathsamplerulefile.cga
76 lines (56 loc) · 1.48 KB
/
samplerulefile.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
72
73
74
75
76
/**
* File: ruleheights.cga
* Created: 10 Jun 2013 13:42:55 GMT
* Author: Flora Roumpani
This is a sample cga rule file used to simply extrude the volumes and
control colors. In this case we are using the Twitter palette.
The user can modify this rule to create diffrent building shapes
instead of simple extrutions.
*/
version "2011.1"
attr HGT = 0
attr opacitytwit=1
attr opacityshape=0.6
##to use for a colorramp
#attr maxHGT= 1000
#attr min = 0
#@Range(0,1)
#attr colorValue = 1
#attr x_norm =1 / (maxHGT - min) * (maxHGT - min)
Lot -->
##use colorRamp
#extrude (HGT)
#color (colorRamp("brownToBlue",x_norm))
#set (material.opacity, opacity)
#Volume.
case HGT < 5 :
extrude (30)color ("#CACACA")
set (material.opacity, opacityshape)
Volume.
case HGT < 100 :
extrude (HGT)color ("#A3E0FF")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
case HGT < 200 :
extrude (HGT)color ("#66CCFF")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
case HGT < 400 :
extrude (HGT)color ("#52A3CC")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
case HGT < 600 :
extrude (HGT)color ("#478FB2")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
case HGT < 800 :
extrude (HGT)color ("#3D7A99")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
case HGT > 1000 :
extrude (HGT)color ("#295266")#twitterpalete
set (material.opacity, opacitytwit)
Volume.
else:
set (material.opacity, opacityshape)
Volume.