1 : #VRML V2.0 utf8
2 :
3 : WorldInfo {
4 : info "Author: Tomash Kazmar"
5 : title "Fence"
6 : }
7 :
8 : PROTO FenceWood []
9 : {
10 : Appearance {
11 : material Material {
12 : # diffuseColor .31 .2 .157
13 : # specularColor .2 .098 .11
14 : # emissiveColor .259 .216 .122
15 : # ambientIntensity .063
16 : # shininess .1
17 : diffuseColor .5 .3 .19
18 : specularColor .08 .08 .05
19 : emissiveColor .12 .13 .08
20 : ambientIntensity .0833
21 : shininess .17
22 : }
23 : }
24 : }
25 :
26 : PROTO FencePlank [ field SFVec3f Size 0.04 1.6 0.015,
27 : field SFVec3f Pos 0 0 0
28 : ]
29 : {
30 : Transform {
31 : translation IS Pos
32 : scale IS Size
33 : children Shape {
34 : geometry Extrusion {
35 : scale [0.5 0.5, 0.5 0.5, 0.05 0.5]
36 : spine [0 0 0, 0 1.0 0, 0 1.03 0]
37 : crossSection [1 1, 1 -1, -1 -1, -1 1, 1 1]
38 : }
39 : appearance FenceWood {}
40 : }
41 : }
42 : }
43 :
44 : PROTO FenceField [field SFVec3f Pos 0 0 0]
45 : {
46 : Transform {
47 : translation IS Pos
48 : children [
49 : FencePlank { Size 0.191830 1.6 0.02 Pos 0.202815 0 0 }
50 : FencePlank { Size 0.187569 1.6 0.02 Pos 0.507568 0 0 }
51 : FencePlank { Size 0.184148 1.6 0.02 Pos 0.788974 0 0 }
52 : FencePlank { Size 0.186803 1.6 0.02 Pos 1.087027 0 0 }
53 : FencePlank { Size 0.181376 1.6 0.02 Pos 1.357378 0 0 }
54 : FencePlank { Size 0.197600 1.6 0.02 Pos 1.635305 0 0 }
55 : FencePlank { Size 0.199611 1.6 0.02 Pos 1.918009 0 0 }
56 : FencePlank { Size 0.198153 1.6 0.02 Pos 2.200086 0 0 }
57 : FencePlank { Size 0.198440 1.6 0.02 Pos 2.479232 0 0 }
58 : FencePlank { Size 0.197446 1.6 0.02 Pos 2.758200 0 0 }
59 : FencePlank { Size 0.193848 1.6 0.02 Pos 3.038922 0 0 }
60 : FencePlank { Size 0.187238 1.6 0.02 Pos 3.312798 0 0 }
61 : FencePlank { Size 0.197170 1.6 0.02 Pos 3.590572 0 0 }
62 : FencePlank { Size 0.197541 1.6 0.02 Pos 3.868248 0 0 }
63 : FencePlank { Size 0.188644 1.6 0.02 Pos 4.152330 0 0 }
64 : FencePlank { Size 0.198557 1.6 0.02 Pos 4.470423 0 0 }
65 : FencePlank { Size 0.187907 1.6 0.02 Pos 4.769718 0 0 }
66 :
67 : Transform {
68 : translation 2.5 0.4 -0.06
69 : rotation 0 0 1 1.57
70 : children DEF LowerBound Shape {
71 : geometry Cylinder {
72 : height 5.05
73 : radius 0.05
74 : }
75 : appearance FenceWood {}
76 : }
77 : }
78 : Transform {
79 : translation 2.5 1.1 -0.06
80 : rotation 0 0 1 1.57
81 : children USE LowerBound
82 : }
83 : ]
84 : }
85 : }
86 :
87 : PROTO FenceColumn [field SFVec3f Pos 0 0 0]
88 : {
89 : Transform {
90 : translation IS Pos
91 : children [
92 : Transform {
93 : translation 0 0.85 0
94 : children Shape {
95 : geometry Cylinder {
96 : bottom FALSE
97 : top FALSE
98 : height 1.7
99 : radius 0.03
100 : }
101 : appearance DEF ColumnColor Appearance {
102 : material Material {
103 : diffuseColor .49 .24 .13
104 : specularColor .28 .06 .02
105 : emissiveColor .1 .05 .03
106 : ambientIntensity .07
107 : shininess .03
108 : }
109 : }
110 : }
111 : }
112 : Transform {
113 : translation 0 1.7 0
114 : children Shape {
115 : geometry Cylinder {
116 : height 0.02
117 : radius 0.04
118 : }
119 : appearance USE ColumnColor
120 : }
121 : }
122 : ]
123 : }
124 : }
125 :
126 : PROTO Fence50 []
127 : {
128 : Group {
129 : children [
130 : FenceColumn { Pos 0 0 0}
131 : FenceField { Pos 0 0 0}
132 : FenceColumn { Pos 5 0 0}
133 : FenceField { Pos 5 0 0}
134 : FenceColumn { Pos 10 0 0}
135 : FenceField { Pos 10 0 0}
136 : FenceColumn { Pos 15 0 0}
137 : FenceField { Pos 15 0 0}
138 : FenceColumn { Pos 20 0 0}
139 : FenceField { Pos 20 0 0}
140 : FenceColumn { Pos 25 0 0}
141 : FenceField { Pos 25 0 0}
142 : FenceColumn { Pos 30 0 0}
143 : FenceField { Pos 30 0 0}
144 : FenceColumn { Pos 35 0 0}
145 : FenceField { Pos 35 0 0}
146 : FenceColumn { Pos 40 0 0}
147 : FenceField { Pos 40 0 0}
148 : FenceColumn { Pos 45 0 0}
149 : FenceField { Pos 45 0 0}
150 : FenceColumn { Pos 50 0 0}
151 : ]
152 : }
153 : }