4 % We re-use the parametrization of the TwoPrism and we replace
5 % the vertical cables by springs
7 % Parametrization of a two-prism tower taken from
8 % C. Sultan, M. Corles and R. E. Skelton
9 % The pre-estressability rpoblem of tensegrity structures: some
10 % analytical results, International journal of solids and structures
13 % We model a SVDB struture (section 4) which essentially has the same
14 % solutions as a SVD structure (section 3)
15 % We compute the constants that give a stable configuration and then
16 % leave some ranges around the equilibrium point to allow form motion.
17 % In this way we are sure to have valid ranges for the variables.
19 % The two driving parameters
23 % Structural parameters (taken from the matlab file)
24 b := 0.27 % Size of base/platform
25 l := 0.4 % Length of struts
26 P := PARAMETER(PRETENSION) % Pretension (taken from parameter file)
27 rs := 0.0025 % Radius to represent struts
28 rc := 0.00075 % Radius to represent cables
29 rp := 0.0025 % Radius to represent springs
30 ra := rs*6 % Radius of the anchor elements
32 % small value (used to compare alpha with pi/3 = 60 deg)
35 % h is a zero-centered parametrization of the structure height
36 u := sin(delta)*cos(alpha+pi/6) % auxiliary
37 h := (abs(alpha-pi/3)<zero ? l*cos(delta)/2 :
38 cos(delta)*(l*u+sqrt(b^2/3-3*l^2*u^2)-b/sqrt(3))/(2*u))
40 % Length of the different strings
41 D := sqrt(h^2+b^2/3+l^2-2*l*b*sin(delta)*sin(alpha)/sqrt(3)-2*l*h*cos(delta))
42 V := sqrt(b^2+l^2-2*l*b*sin(delta)*sin(alpha+pi/6))
43 S := sqrt(h^2+b^2/3+l^2*sin(delta)^2-2*l*b*sin(delta)*cos(alpha-pi/6)/sqrt(3))
47 % Tension of the different strings
50 T_v_0 := (abs(alpha-pi/3)<zero ? T_d_0*V*(3*l*sin(delta)/(2*b)-1)/D :
51 T_d_0*V*((l*cos(delta)/h-1)*sin(alpha-pi/6)-cos(alpha))/(D*sqrt(3)*cos(alpha+pi/6)))
52 T_s_0 := (abs(alpha-pi/3)<zero ? T_d_0 :
53 T_d_0*S*(l*cos(delta)/h-1)/D)
55 T_b_0 := (abs(alpha-pi/3)<zero ? T_d_0*(2*b^2-9*l*b*sin(delta)+9*l^2*sin(delta)^2)/(6*D*b) :
56 T_d_0*(3*l^2*sin(delta)*cos(delta)
57 +6*b*h*cos(alpha-pi/3)
59 -2*sqrt(3)*b*l*cos(delta)*sin(alpha))/(6*D*sqrt(3)*h*cos(alpha+pi/6)))
61 % Compression of the struts (fixed an error from the paper!)
62 C_0 := (abs(alpha-pi/3)<zero ? T_d_0*(3*l^2*sin(delta)/(2*b)-l/2)/D :
63 T_d_0*(2*sqrt(3)*h*b*sin(delta)
64 -sqrt(3)*l*b*sin(2*delta)/2
65 +6*h^2*cos(delta)*sin(alpha-pi/3)
66 -6*l*h*(cos(delta)^2*sin(alpha-pi/3)+sin(alpha+pi/6)/sqrt(3))
67 +2*sqrt(3)*l^2*cos(delta)*cos(alpha)
68 +6*l^2*cos(delta)^3*sin(alpha-pi/3))/(6*D*h*sin(pi/3-alpha)))
70 %
Normalize the tension/compression (to remove the pre-tension)
71 n := sqrt(6*(T_d_0^2+T_v_0^2+T_s_0^2++T_b_0^2+C_0^2))
84 % Physical quantities used to define the stiffness of the strings
85 E := 14e10 % N/m^2 Young's modulus
86 s := 2.5e9 % N/m^2 maximum tendon stress
87 g := 4 % safety margin
89 % The stiffness as defined
int the paper
90 K_d_0 := (E*P*g/s)*T_d
91 K_v_0 := (E*P*g/s)*T_v
92 K_s_0 := (E*P*g/s)*T_s
94 % The rest lengths for the different cables
95 R_d := K_d_0*D/(T_d+K_d_0)
96 R_v := K_v_0*V/(T_v+K_v_0)
97 R_s := K_s_0*S/(T_s+K_s_0)
103 % The stiffness as in appears in our models
112 % range of compression forces supported by the struts
113 % For struts the rest lengt is set to 0 and the stiffnes
114 % is set to vary so that with a constant length, we can
115 % have different forces.
116 % If both the rest length and the stiffness are free we
117 % have an extra (useless) degree of freedom.
118 min_fs := -2*C % compression is negative!
121 % data for the cables on the base/platform: range of supported tensions
122 % These cables have constant length. We additionally fix the stiffness
123 % so that varying the rest length we can have different forces.
124 % If both the rest length and the stiffness are free we
125 % have an extra (useless) degree of freedom.
129 % data for diagonal cables
135 % data for vertical springs
138 % Adjust the rest length and the stiffnes to convert from
139 % cables to springs (lower stiffness and rest length)
140 % Moreover, spring rest length is constant
146 % data for saddle cables
157 force [min_fs,max_fs]
162 force [min_fs,max_fs]
167 force [min_fs,max_fs]
172 force [min_fs,max_fs]
177 force [min_fs,max_fs]
182 force [min_fs,max_fs]
186 % Cables in the same order as in the matlab file
188 cable c1 : n1 n11 % diagonal
189 length [min_lc_d,max_lc_d]
191 rest [min_r_d,max_r_d]
194 spring c2 : n1 n6 % vertical
195 length [min_lc_v,max_lc_v]
200 cable c3 : n3 n7 % diagonal
201 length [min_lc_d,max_lc_d]
203 rest [min_r_d,max_r_d]
206 spring c4 : n3 n2 % vertical
207 length [min_lc_v,max_lc_v]
212 cable c5 : n5 n9 % diagonal
213 length [min_lc_d,max_lc_d]
215 rest [min_r_d,max_r_d]
218 spring c6 : n5 n4 % vertical
219 length [min_lc_v,max_lc_v]
224 cable c7 : n7 n4 % saddle
225 length [min_lc_s,max_lc_s]
227 rest [min_r_s,max_r_s]
230 cable c8 : n7 n2 % saddle
231 length [min_lc_s,max_lc_s]
233 rest [min_r_s,max_r_s]
236 cable c9 : n9 n6 % saddle
237 length [min_lc_s,max_lc_s]
239 rest [min_r_s,max_r_s]
242 cable c10 : n9 n4 % saddle
243 length [min_lc_s,max_lc_s]
245 rest [min_r_s,max_r_s]
248 cable c11 : n11 n2 % saddle
249 length [min_lc_s,max_lc_s]
251 rest [min_r_s,max_r_s]
254 cable c12 : n11 n6 % saddle
255 length [min_lc_s,max_lc_s]
257 rest [min_r_s,max_r_s]
260 spring c13: n11 n8 % vertical
261 length [min_lc_v,max_lc_v]
266 cable c14 : n2 n8 % diagonal
267 length [min_lc_d,max_lc_d]
269 rest [min_r_d,max_r_d]
272 spring c15: n7 n10 % vertical
273 length [min_lc_v,max_lc_v]
278 cable c16 : n4 n10 % diagonal
279 length [min_lc_d,max_lc_d]
281 rest [min_r_d,max_r_d]
284 spring c17: n9 n12 % vertical
285 length [min_lc_v,max_lc_v]
290 cable c18 : n6 n12 % diagonal
291 length [min_lc_d,max_lc_d]
293 rest [min_r_d,max_r_d]
296 cable c19 : n1 n3 % base/platform
298 force [min_f_b,max_f_b]
302 cable c20 : n1 n5 % base/platform
304 force [min_f_b,max_f_b]
308 cable c21 : n3 n5 % base/platform
310 force [min_f_b,max_f_b]
314 cable c22 : n8 n10 % base/platform
316 force [min_f_b,max_f_b]
320 cable c23 : n8 n12 % base/platform
322 force [min_f_b,max_f_b]
326 cable c24 : n10 n12 % base/platform
328 force [min_f_b,max_f_b]
334 platform : prism (-2*ra,ra,2*ra) (b*cos(pi/3),-b*sin(pi/3)-2*ra,2*ra) (b+2*ra,ra,2*ra) 0.005 red decoration
336 % The anchor points between the tensegrity and the platform
337 cylinder ra (0,0,ra) (0,0,2*ra) blue decoration
338 sphere ra (0,0,ra) blue decoration
340 cylinder ra (b*cos(pi/3),-b*sin(pi/3),ra) (b*cos(pi/3),-b*sin(pi/3),2*ra) blue decoration
341 sphere ra (b*cos(pi/3),-b*sin(pi/3),ra) blue decoration
343 cylinder ra (b,0,2*ra) (b,0,ra) blue decoration
344 sphere ra (b,0,ra) blue decoration
346 % The stick on the top of the platform
347 cylinder 2*rs (b/2,-b*sin(pi/3)/3,2*ra) (b/2,-b*sin(pi/3)/3,2*ra+0.25) red
348 sphere 2*rs (b/2,-b*sin(pi/3)/3,2*ra+0.25) red
352 (b*cos(pi/3),-b*sin(pi/3),0) n12
356 % couple base/platform
357 force : c19,c20,c21,c22,c23,c24
361 % n1 is implicitly fixed
370 plane: box (-0.2,-0.2,-2*ra-0.01)+(b+0.4,b*sin(pi/3)+0.4,0.005) green
372 base: prism (-2*ra,-ra,-2*ra-0.005)
373 (b+2*ra,-ra,-2*ra-0.005)
374 (b*cos(pi/3),b*sin(pi/3)+2*ra,-2*ra-0.005)
377 anchor1: cylinder ra (0,0,-2*ra) (0,0,-ra) blue decoration
378 anchor1ball: sphere ra (0,0,-ra) blue decoration
380 anchor2: cylinder ra (b,0,-2*ra) (b,0,-ra) blue decoration
381 anchor2ball: sphere ra (b,0,-ra) blue decoration
383 anchor3: cylinder ra (b*cos(pi/3),b*sin(pi/3),-2*ra) (b*cos(pi/3),b*sin(pi/3),-ra) blue decoration
384 anchor3ball: sphere ra (b*cos(pi/3),b*sin(pi/3),-ra) blue decoration
386 hole1: body "bodies/box_with_hole1.off" yellow % decoration
387 % hole2: body "bodies/box_with_hole2.off" black decoration
392 do not check: connected
CBLAS_INLINE void Normalize(unsigned int s, double *v)
Normalizes a vector.
Follow us!