-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpresets.js
218 lines (178 loc) · 7.07 KB
/
presets.js
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/**
* @page Presets
*/
/* Model 1: Ring, Border growth */
var RingBorder=new Object({
preset:"Ring Border",
// geometry
geometry:"ring", // geometry, either "ring" or "sphere"
Ri:2, // inner radius in mm
Ro:6, // outter radius in mm
th:0.5, // ring thickness in mm
d:0.5, // typical length of a volume elements
// mechanics
gamma:0.1, // dumping factor
rho:0.0001, // mass density
mu:50, // shear modulus
K:50, // bulk modulus
// growth
growth:"ring border instantaneous", // growth function
G:2.0, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"normal", // normal, deformation, etc.
wireframe:true,
perspective:false // set to false for orthographic perspective
});
/* Model 2: Ring, Tangential growth */
var RingTangential=new Object({
preset:"Ring Tangential",
// geometry
geometry:"ring",
Ri:2, // inner radius in mm
Ro:6, // outter radius in mm
th:0.5, // ring thickness in mm
d:0.5, // typical length of a volume elements
// mechanics
gamma:0.1,
rho:0.0001, // mass density
mu:5, // shear modulus
K:50, // bulk modulus
// growth
growth:"ring tangential instantaneous",
G:2, // growth factor
T:0.0, // duration of growth (in sec)
// display
colormap:"deformation",
wireframe:false,
perspective:true // set to false for orthographic perspective
});
/* Model 3: Sphere, Surface growth */
var SphereSurface=new Object({
preset:"Sphere Surface",
// geometry
geometry:"surface",
url:"data/sphere-1115.json", // surface mesh URL
th:0.3, // surface thickness in mm
fibres:true,
collision: true,
Kfc: 10000, // Collision response string stiffness
// mechanics
gamma:0.1, // dumping
rho:0.0001, // mass density
mu:65, // shear modulus of tetrahedra
K:100, // bulk modulus of tetrahedra
Kf:1, // elastic constant for fibres
// growth
growth:"surface homogeneous instantaneous", // growth function
G:1.6, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"normal",
wireframe:false,
perspective:false,
showVertexNumbers: false,
showTriangleNumbers: false,
surfaceOnly: true
});
/* Model 4: Sphere, Surface growth, finer mesh */
var SphereSurfaceFine=new Object({
preset:"Sphere Surface Fine",
// geometry
geometry:"surface",
url:"data/sphere-2500.json", // surface mesh URL
th:0.2, // surface thickness in mm
fibres:true,
// mechanics
gamma:0.1, // dumping
rho:0.0001, // mass density
mu:65, // shear modulus of tetrahedra
K:100, // bulk modulus of tetrahedra
Kf:1, // elastic constant for fibres
// growth
growth:"surface homogeneous instantaneous", // growth function
G:1.6, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"normal",
wireframe:false,
perspective:false,
surfaceOnly: true
});
/* Model 5: Ellipsoid, Surface growth */
var EllipsoidSurface=new Object({
preset:"Ellipsoid Surface",
// geometry
geometry:"surface",
url:"data/ellipsoid-2502.json", // surface mesh URL
th:0.2, // surface thickness in mm
fibres:true,
// mechanics
gamma:0.1, // dumping
rho:0.0001, // mass density
mu:65, // shear modulus of tetrahedra
K:100, // bulk modulus of tetrahedra
Kf:1, // elastic constant for fibres
collision: true, // enable collision detection
Kfc: 10000, // Collision response string stiffness
// growth
growth:"surface homogeneous instantaneous", // growth function
G:1.6, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"normal",
wireframe:false,
perspective:false,
surfaceOnly: true
});
/* Model 6: Block, Border growth */
var BlockBorder=new Object({
preset:"Block Border",
// geometry
geometry:"block", // geometry, "block", "ring" or "sphere"
Width:8, // width in mm
Height:3, // height in mm
Depth:0.5, // depth in mm
d:0.5, // typical length of a volume elements
// mechanics
gamma:0.1, // dumping factor
rho:0.0001, // mass density
mu:50, // shear modulus
K:5, // bulk modulus
// growth
growth:"block border instantaneous", // growth function
G:3.0, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"deformation", // normal, deformation, etc.
wireframe:false,
perspective:false // set to false for orthographic perspective
});
/* Model 7: U Block, No growth, linear spring forces collision */
var UBlockCollision=new Object({
preset:"U Block Collision",
// geometry
geometry:"ublock", // geometry, "block", "ring" or "sphere"
Width:10, // width in mm
Height:1, // height in mm
Depth:1, // depth in mm
d:1, // typical length of a volume elements
// mechanics
gamma:0.1, // dumping factor
rho:0.0001, // mass density
mu:50, // shear modulus
K:5, // bulk modulus
collision: true, // enable collision detection
Kfc: 10000, // Collision response string stiffness
// growth
growth:"homogeneous", // growth function
G:3.0, // growth
T:0.0, // duration of growth (in sec). T=0 means instantaneous growth
// display
colormap:"normal", // normal, deformation, etc.
wireframe:true,
perspective:true, // set to false for orthographic perspective
showVertexNumbers: true,
showTriangleNumbers: false,
surfaceOnly: true
});