4 % INPUT PARAMETERS. Fix
this for direct kinematics
7 theta1_max:= theta1_min
10 theta2_max:= theta2_min
13 theta3_max:= theta3_min
15 % PARAMETERS OF THE PLATFORM
17 % radius of the circunference inscribing the base triangle
20 % angles from the center of the base to the legs anchor points
22 beta2_b:=beta1_b+(2*pi/3)
23 beta3_b:=beta2_b+(2*pi/3)
25 % radius of the circunference inscribing the platform triangle
28 % angles from the center of the platform to the legs anchor points
30 beta2_p:=beta1_p+(2*pi/3)
31 beta3_p:=beta2_p+(2*pi/3)
33 % Length of the bottom part of each leg
36 % Length of the upper part of each leg (i.e., the
long bar of the 4 bar)
39 % Length of the
short bar forming the 4 bars in the upper part of each leg
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43 % nothing to be modified behond
this point
45 % Anchor points of the legs in the base
46 x1_b:=r_b*cos(beta1_b)
47 y1_b:=r_b*sin(beta1_b)
49 x2_b:=r_b*cos(beta2_b)
50 y2_b:=r_b*sin(beta2_b)
52 x3_b:=r_b*cos(beta3_b)
53 y3_b:=r_b*sin(beta3_b)
55 % Tangent vectors to the sphere inscribing the base triangle at the
57 alpha1_b:=beta1_b+pi/2
58 alpha2_b:=beta2_b+pi/2
59 alpha3_b:=beta3_b+pi/2
61 % Anchor points of the legs in the platform
62 x1_p:=r_p*cos(beta1_p)
63 y1_p:=r_p*sin(beta1_p)
65 x2_p:=r_p*cos(beta2_p)
66 y2_p:=r_p*sin(beta2_p)
68 x3_p:=r_p*cos(beta3_p)
69 y3_p:=r_p*sin(beta3_p)
71 % Tangent vectors to the sphere inscribing the plotform triangle at the
73 alpha1_p:=beta1_p+pi/2
74 alpha2_p:=beta2_p+pi/2
75 alpha3_p:=beta3_p+pi/2
77 % radius of the bars used in the representation. The bars for the
78 % base/platform are 1.5 times this radius
85 % One sphere at each vertex of the triangle
86 sphere rb*1.5 (x1_b,y1_b,0)
87 sphere rb*1.5 (x2_b,y2_b,0)
88 sphere rb*1.5 (x3_b,y3_b,0)
90 % Three bars forming the triangle
91 cylinder rb*1.5 (x1_b,y1_b,0)(x2_b,y2_b,0)
92 cylinder rb*1.5 (x1_b,y1_b,0)(x3_b,y3_b,0)
93 cylinder rb*1.5 (x2_b,y2_b,0)(x3_b,y3_b,0)
95 % Part of the revolute joint with the first leg fixed at the base
96 cylinder rb (x1_b-length_B1*cos(alpha1_b),y1_b-length_B1*sin(alpha1_b),0)
97 (x1_b-0.5*length_B1*cos(alpha1_b),y1_b-0.5*length_B1*sin(alpha1_b),0)
98 sphere rb (x1_b-length_B1*cos(alpha1_b),y1_b-length_B1*sin(alpha1_b),0)
99 cylinder rb (x1_b+0.5*length_B1*cos(alpha1_b),y1_b+0.5*length_B1*sin(alpha1_b),0)
100 (x1_b+ length_B1*cos(alpha1_b),y1_b+ length_B1*sin(alpha1_b),0)
101 sphere rb (x1_b+ length_B1*cos(alpha1_b),y1_b+ length_B1*sin(alpha1_b),0)
103 % Part of the revolute joint with the second leg fixed at the base
104 cylinder rb (x2_b-length_B1*cos(alpha2_b),y2_b-length_B1*sin(alpha2_b),0)
105 (x2_b-0.5*length_B1*cos(alpha2_b),y2_b-0.5*length_B1*sin(alpha2_b),0)
106 sphere rb (x2_b-length_B1*cos(alpha2_b),y2_b-length_B1*sin(alpha2_b),0)
107 cylinder rb (x2_b+0.5*length_B1*cos(alpha2_b),y2_b+0.5*length_B1*sin(alpha2_b),0)
108 (x2_b+ length_B1*cos(alpha2_b),y2_b+ length_B1*sin(alpha2_b),0)
109 sphere rb (x2_b+ length_B1*cos(alpha2_b),y2_b+ length_B1*sin(alpha2_b),0)
111 % Part of the revolute joint with the third leg fixed at the base
112 cylinder rb (x3_b-length_B1*cos(alpha3_b),y3_b-length_B1*sin(alpha3_b),0)
113 (x3_b-0.5*length_B1*cos(alpha3_b),y3_b-0.5*length_B1*sin(alpha3_b),0)
114 sphere rb (x3_b-length_B1*cos(alpha3_b),y3_b-length_B1*sin(alpha3_b),0)
115 cylinder rb (x3_b+0.5*length_B1*cos(alpha3_b),y3_b+0.5*length_B1*sin(alpha3_b),0)
116 (x3_b+ length_B1*cos(alpha3_b),y3_b+ length_B1*sin(alpha3_b),0)
117 sphere rb (x3_b+ length_B1*cos(alpha3_b),y3_b+ length_B1*sin(alpha3_b),0)
121 sphere rb*1.5 (x1_p,y1_p,0)
122 sphere rb*1.5 (x2_p,y2_p,0)
123 sphere rb*1.5 (x3_p,y3_p,0)
124 cylinder rb*1.5 (x1_p,y1_p,0)(x2_p,y2_p,0)
125 cylinder rb*1.5 (x1_p,y1_p,0)(x3_p,y3_p,0)
126 cylinder rb*1.5 (x2_p,y2_p,0)(x3_p,y3_p,0)
128 cylinder rb (x1_p-length_B1*cos(alpha1_p),y1_p-length_B1*sin(alpha1_p),0)
129 (x1_p+length_B1*cos(alpha1_p),y1_p+length_B1*sin(alpha1_p),0)
131 cylinder rb (x2_p-length_B1*cos(alpha2_p),y2_p-length_B1*sin(alpha2_p),0)
132 (x2_p+length_B1*cos(alpha2_p),y2_p+length_B1*sin(alpha2_p),0)
134 cylinder rb (x3_p-length_B1*cos(alpha3_p),y3_p-length_B1*sin(alpha3_p),0)
135 (x3_p+length_B1*cos(alpha3_p),y3_p+length_B1*sin(alpha3_p),0)
137 leg1_a: cylinder rb (0,0,0) (0,0,lenght_A)
138 cylinder rb (-0.5*length_B1,0,0)
140 cylinder rb (-length_B1,0,lenght_A)
141 (+length_B1,0,lenght_A)
143 leg2_a: cylinder rb (0,0,0) (0,0,lenght_A)
144 cylinder rb (-0.5*length_B1,0,0)
146 cylinder rb (-length_B1,0,lenght_A)
147 (+length_B1,0,lenght_A)
149 leg3_a: cylinder rb (0,0,0) (0,0,lenght_A)
150 cylinder rb (-0.5*length_B1,0,0)
152 cylinder rb (-length_B1,0,lenght_A)
153 (+length_B1,0,lenght_A)
157 %---------------------------------------------------------
159 revolute: base (x1_b,y1_b,0)+(cos(alpha1_b),sin(alpha1_b),0)
160 leg1_a (0,0,0)+(1,0,0)
161 range [theta1_min,theta1_max] +(cos(beta1_b),sin(beta1_b),0) +(0,-1,0)
163 sph_sph: leg1_a (-length_B1,0,lenght_A)
164 platform (x1_p-length_B1*cos(alpha1_p),y1_p-length_B1*sin(alpha1_p),0)
169 sph_sph: leg1_a (+length_B1,0,lenght_A)
170 platform (x1_p+length_B1*cos(alpha1_p),y1_p+length_B1*sin(alpha1_p),0)
175 %---------------------------------------------------------
177 revolute: base (x2_b,y2_b,0)+(cos(alpha2_b),sin(alpha2_b),0)
178 leg2_a (0,0,0)+(1,0,0)
179 range [theta2_min,theta2_max] +(cos(beta2_b),sin(beta2_b),0) +(0,-1,0)
181 sph_sph: leg2_a (-length_B1,0,lenght_A)
182 platform (x2_p-length_B1*cos(alpha2_p),y2_p-length_B1*sin(alpha2_p),0)
187 sph_sph: leg2_a (+length_B1,0,lenght_A)
188 platform (x2_p+length_B1*cos(alpha2_p),y2_p+length_B1*sin(alpha2_p),0)
193 %---------------------------------------------------------
195 revolute: base (x3_b,y3_b,0)+(cos(alpha3_b),sin(alpha3_b),0)
196 leg3_a (0,0,0)+(1,0,0)
197 range [theta3_min,theta3_max] +(cos(beta3_b),sin(beta3_b),0) +(0,-1,0)
199 sph_sph: leg3_a (-length_B1,0,lenght_A)
200 platform (x3_p-length_B1*cos(alpha3_p),y3_p-length_B1*sin(alpha3_p),0)
205 sph_sph: leg3_a (+length_B1,0,lenght_A)
206 platform (x3_p+length_B1*cos(alpha3_p),y3_p+length_B1*sin(alpha3_p),0)
211 %---------------------------------------------------------
212 % fix: base platform Tz(1)
Follow us!