1 | #############################################
|
---|
2 | ## ##
|
---|
3 | ## Welcome to Genotype Manipulation Demo! ##
|
---|
4 | ## ##
|
---|
5 | #############################################
|
---|
6 | Found converter accepting f1: "Recursive encoding"
|
---|
7 | Found 6 converter(s) producing f0
|
---|
8 |
|
---|
9 | Source genotype: '1.1,0,0.4:C[Gpart]{x=0.806,y=0.806,z=2.295}(C[N;M:p=0.899]{x=0.806,z=0.806}(E{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1},bIE[N,1]{rx=-1.277,ry=-1.087,rz=-0.9208,tx=1.189,ty=1.1182,tz=-0.1494,x=1,y=1,z=1}E{rx=0.4085,ry=1.0807,rz=0.5977,tx=0.4698,ty=0.3333,tz=1.4408,x=1,y=1,z=1}E{rx=-0.9279,ry=-0.2806,rz=-0.7292,tx=1.1498,ty=-0.6195,tz=0.0121,x=1,y=1,z=1}),biR[N]{ry=0.271,x=1.0144,y=0.903,z=0.903}(R{rx=0.3229,ry=-0.3828,rz=1.5117,tx=0.7618,ty=1.3803,tz=1.354,x=0.8736,y=0.8736,z=0.8736},E{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1}),iC{rx=-0.9744,ry=-1.5695,rz=1.1659,tx=-0.9065,ty=-1.2759,tz=-0.0857,x=1.273,y=0.133,z=1.509},R{rx=0.3229,ry=-0.3828,rz=1.5117,tx=0.7618,ty=1.3803,tz=1.354,x=0.8736,y=0.8736,z=0.8736},iE{rx=1.3416,ry=-1.3967,rz=1.1368,tx=-0.7694,ty=1.0496,tz=-0.1275,x=1,y=1,z=1})'
|
---|
10 | ( format S )
|
---|
11 | Converted to f0:
|
---|
12 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
13 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
14 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
15 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
16 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
17 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
18 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271
|
---|
19 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
20 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
21 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
22 | p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
23 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
24 | j:0, 1, sh=1
|
---|
25 | j:1, 2, sh=1
|
---|
26 | j:1, 3, sh=2
|
---|
27 | j:3, 4, sh=1
|
---|
28 | j:4, 5, sh=1
|
---|
29 | j:0, 6, sh=2
|
---|
30 | j:6, 7, sh=1
|
---|
31 | j:6, 8, sh=1
|
---|
32 | j:0, 9, sh=1
|
---|
33 | j:0, 10, sh=1
|
---|
34 | j:0, 11, sh=1
|
---|
35 | n:p=0, d=Gpart
|
---|
36 | n:p=1
|
---|
37 | n:j=0, d=M:p=0.899
|
---|
38 | n:p=3
|
---|
39 | n:p=6
|
---|
40 | c:3, 1
|
---|
41 |
|
---|
42 | Model contains: 12 part(s)
|
---|
43 | 11 joint(s)
|
---|
44 | 5 neuron(s)
|
---|
45 |
|
---|
46 | Investigating details...
|
---|
47 | #############################################
|
---|
48 | ## ##
|
---|
49 | ## P A R T O B J E C T ##
|
---|
50 | ## ##
|
---|
51 | #############################################
|
---|
52 | (part # 6)
|
---|
53 | Here is the full listing of properties as they are printed in f0
|
---|
54 | (please compare with f0 genotype).
|
---|
55 | Some properties have special meaning (eg. geometry and connections groups)
|
---|
56 | and should be handled with care, because they influence other elements of the model.
|
---|
57 |
|
---|
58 | [this data is provided by Part::properties() ]
|
---|
59 | # id type name group (22 properties)
|
---|
60 | 0. x = 2.044122892122303 f position.x Geometry
|
---|
61 | 1. y = 0.0 f position.y Geometry
|
---|
62 | 2. z = 0.0 f position.z Geometry
|
---|
63 | 3. sh = 3 d 0 3 0 shape Geometry
|
---|
64 | 4. s = 1.0 f 0.1 10.0 1.0 size Geometry
|
---|
65 | 5. sx = 1.0144 f 0.05 5.0 1.0 scale.x Geometry
|
---|
66 | 6. sy = 0.903 f 0.05 5.0 1.0 scale.y Geometry
|
---|
67 | 7. sz = 0.903 f 0.05 5.0 1.0 scale.z Geometry
|
---|
68 | 8. h = 0.0 f 0 1 0 hollow Other properties
|
---|
69 | 9. dn = 1.0 f 0.2 5.0 1.0 density Other properties
|
---|
70 | 10. fr = 0.4 f 0.0 4.0 0.4 friction Other properties
|
---|
71 | 11. ing = 0.22727272727272727 f 0.0 1.0 0.25 ingestion Other properties
|
---|
72 | 12. as = 0.25 f 0.0 1.0 0.25 assimilation Other properties
|
---|
73 | 13. rx = 0.0 f rot.x Geometry
|
---|
74 | 14. ry = 0.271 f rot.y Geometry
|
---|
75 | 15. rz = 0.0 f rot.z Geometry
|
---|
76 | 16. i = s info Other properties
|
---|
77 | 17. Vstyle = part s 0 0 part vis_style Visual
|
---|
78 | 18. vs = 0.2 f 0.05 0.7 0.2 visual thickness Visual
|
---|
79 | 19. vr = 1.0 f 0.0 1.0 1.0 red component Visual
|
---|
80 | 20. vg = 1.0 f 0.0 1.0 1.0 green component Visual
|
---|
81 | 21. vb = 1.0 f 0.0 1.0 1.0 blue component Visual
|
---|
82 |
|
---|
83 | However, there is a subset of properties which may be modified more freely.
|
---|
84 | Properties on this list are related only to this part and can be changed
|
---|
85 | without much consideration. They are guaranteed to be always valid; any inconsistencies
|
---|
86 | will be silently repaired.
|
---|
87 |
|
---|
88 | [this data is provided by Part::extraProperties() ]
|
---|
89 | # id type name group (9 properties)
|
---|
90 | 0. h = 0.0 f 0 1 0 hollow Extra properties
|
---|
91 | 1. dn = 1.0 f 0.2 5.0 1.0 density Extra properties
|
---|
92 | 2. fr = 0.4 f 0.0 4.0 0.4 friction Extra properties
|
---|
93 | 3. ing = 0.22727272727272727 f 0.0 1.0 0.25 ingestion Extra properties
|
---|
94 | 4. as = 0.25 f 0.0 1.0 0.25 assimilation Extra properties
|
---|
95 | 5. vs = 0.2 f 0.05 0.7 0.2 visual thickness Extra properties
|
---|
96 | 6. vr = 1.0 f 0.0 1.0 1.0 red component Extra properties
|
---|
97 | 7. vg = 1.0 f 0.0 1.0 1.0 green component Extra properties
|
---|
98 | 8. vb = 1.0 f 0.0 1.0 1.0 blue component Extra properties
|
---|
99 |
|
---|
100 | This set of properties can vary from release to release,
|
---|
101 | but can be safely accessed by using extraProperties() call.
|
---|
102 | This method accesses the full set of properies (even those
|
---|
103 | which appear in future releases).
|
---|
104 | Now we will try to change some of properties:
|
---|
105 |
|
---|
106 | Change property #5 to random value from range [0.05..0.7]
|
---|
107 | Current value of 'vs' (visual thickness) is '0.2'
|
---|
108 | Setting new value... [ using ParamInterface::set() ]
|
---|
109 | The value is now '0.514873'
|
---|
110 |
|
---|
111 | Let's see f0... (check out part #6 !)
|
---|
112 |
|
---|
113 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
114 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
115 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
116 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
117 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
118 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
119 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
120 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
121 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
122 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
123 | p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
124 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
125 | j:0, 1, sh=1
|
---|
126 | j:1, 2, sh=1
|
---|
127 | j:1, 3, sh=2
|
---|
128 | j:3, 4, sh=1
|
---|
129 | j:4, 5, sh=1
|
---|
130 | j:0, 6, sh=2
|
---|
131 | j:6, 7, sh=1
|
---|
132 | j:6, 8, sh=1
|
---|
133 | j:0, 9, sh=1
|
---|
134 | j:0, 10, sh=1
|
---|
135 | j:0, 11, sh=1
|
---|
136 | n:p=0, d=Gpart
|
---|
137 | n:p=1
|
---|
138 | n:j=0, d=M:p=0.899
|
---|
139 | n:p=3
|
---|
140 | n:p=6
|
---|
141 | c:3, 1
|
---|
142 |
|
---|
143 | #############################################
|
---|
144 | ## ##
|
---|
145 | ## J O I N T O B J E C T ##
|
---|
146 | ## ##
|
---|
147 | #############################################
|
---|
148 | (joint # 9)
|
---|
149 | Similarly as with Part, the full list of properties comes first:
|
---|
150 |
|
---|
151 | # id type name group (21 properties)
|
---|
152 | 0. p1 = 0 d -1 999999 -1 part1 ref# Connections
|
---|
153 | 1. p2 = 10 d -1 999999 -1 part2 ref# Connections
|
---|
154 | 2. sh = 1 d 0 3 0 shape Geometry
|
---|
155 | 3. hx = 0.0 f hinge position.x Geometry
|
---|
156 | 4. hy = 0.0 f hinge position.y Geometry
|
---|
157 | 5. hz = 0.0 f hinge position.z Geometry
|
---|
158 | 6. hrx = 0.0 f hinge rotation.x Geometry
|
---|
159 | 7. hry = 0.0 f hinge rotation.y Geometry
|
---|
160 | 8. hrz = 0.0 f hinge rotation.z Geometry
|
---|
161 | 9. hxn = -1.5708 f -6.2832 0 -1.5708 hinge x negative limit Geometry
|
---|
162 | 10. hxp = 1.5708 f 0 6.2832 1.5708 hinge x positive limit Geometry
|
---|
163 | 11. hyn = -1.5708 f -6.2832 0 -1.5708 hinge y negative limit Geometry
|
---|
164 | 12. hyp = 1.5708 f 0 6.2832 1.5708 hinge y positive limit Geometry
|
---|
165 | 13. stif = 1.0 f 0.0 1.0 1.0 stiffness Other properties
|
---|
166 | 14. rotstif = 1.0 f 0.0 1.0 1.0 rotation stiffness Other properties
|
---|
167 | 15. stam = 0.25 f 0.0 1.0 0.25 stamina Other properties
|
---|
168 | 16. i = s info Other properties
|
---|
169 | 17. Vstyle = joint s 0 0 joint vis_style Visual
|
---|
170 | 18. vr = 1.0 f 0.0 1.0 1.0 red component Visual
|
---|
171 | 19. vg = 1.0 f 0.0 1.0 1.0 green component Visual
|
---|
172 | 20. vb = 1.0 f 0.0 1.0 1.0 blue component Visual
|
---|
173 |
|
---|
174 | Actually, there are two kinds of Joints: delta and absolute.
|
---|
175 | For this object, Joint::isDelta() returns 0, so this is the absolute Joint.
|
---|
176 |
|
---|
177 | Absolute Joints adapt to its Parts' positions.
|
---|
178 | We can move a Part, and it does not influence the second part, nor the Joint.
|
---|
179 | Let's move the first Part along y axis by -0.1...
|
---|
180 | The Part's position is changed, but everything else stays intact:
|
---|
181 |
|
---|
182 | p:y=-0.1, sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
183 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
184 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
185 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
186 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
187 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
188 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
189 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
190 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
191 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
192 | p:0.1364642552368182, 0.619565647570761, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
193 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
194 | j:0, 1, sh=1
|
---|
195 | j:1, 2, sh=1
|
---|
196 | j:1, 3, sh=2
|
---|
197 | j:3, 4, sh=1
|
---|
198 | j:4, 5, sh=1
|
---|
199 | j:0, 6, sh=2
|
---|
200 | j:6, 7, sh=1
|
---|
201 | j:6, 8, sh=1
|
---|
202 | j:0, 9, sh=1
|
---|
203 | j:0, 10, sh=1
|
---|
204 | j:0, 11, sh=1
|
---|
205 | n:p=0, d=Gpart
|
---|
206 | n:p=1
|
---|
207 | n:j=0, d=M:p=0.899
|
---|
208 | n:p=3
|
---|
209 | n:p=6
|
---|
210 | c:3, 1
|
---|
211 |
|
---|
212 | How would this joint look like with delta option enabled?
|
---|
213 | [ by calling Joint::useDelta(1) ]
|
---|
214 | f0 is now:
|
---|
215 |
|
---|
216 | p:y=-0.1, sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
217 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
218 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
219 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
220 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
221 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
222 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
223 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
224 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
225 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
226 | p:0.13646425523681838, 0.6195656475707613, 3.289951226640109, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
227 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
228 | j:0, 1, sh=1
|
---|
229 | j:1, 2, sh=1
|
---|
230 | j:1, 3, sh=2
|
---|
231 | j:3, 4, sh=1
|
---|
232 | j:4, 5, sh=1
|
---|
233 | j:0, 6, sh=2
|
---|
234 | j:6, 7, sh=1
|
---|
235 | j:6, 8, sh=1
|
---|
236 | j:0, 9, sh=1
|
---|
237 | j:0, 10, rx=0.3229000000000001, -0.3828, 1.5117, dx=-0.5550636879509978, 0.9656107299102641, 3.181143899353255, sh=1
|
---|
238 | j:0, 11, sh=1
|
---|
239 | n:p=0, d=Gpart
|
---|
240 | n:p=1
|
---|
241 | n:j=0, d=M:p=0.899
|
---|
242 | n:p=3
|
---|
243 | n:p=6
|
---|
244 | c:3, 1
|
---|
245 |
|
---|
246 | ...so this is a delta joint.
|
---|
247 |
|
---|
248 | Delta fields (dx,dy,dz) describe relative location of the second part.
|
---|
249 | This joint will change the second Part's positions to preserve delta distance.
|
---|
250 | Let's move the first Part (#0) along y axis (+0.1) and change delta.z (dz) by 0.1.
|
---|
251 | Position of the second Part referenced by this joint (part #10) is now changed:
|
---|
252 |
|
---|
253 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
254 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
255 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
256 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
257 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
258 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
259 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
260 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
261 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
262 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
263 | p:0.17023272858450833, 0.753051220526163, 3.3779194402835317, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
264 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
265 | j:0, 1, sh=1
|
---|
266 | j:1, 2, sh=1
|
---|
267 | j:1, 3, sh=2
|
---|
268 | j:3, 4, sh=1
|
---|
269 | j:4, 5, sh=1
|
---|
270 | j:0, 6, sh=2
|
---|
271 | j:6, 7, sh=1
|
---|
272 | j:6, 8, sh=1
|
---|
273 | j:0, 9, sh=1
|
---|
274 | j:0, 10, rx=0.3229000000000001, -0.3828, 1.5117, dx=-0.5550636879509978, 0.9656107299102641, 3.281143899353255, sh=1
|
---|
275 | j:0, 11, sh=1
|
---|
276 | n:p=0, d=Gpart
|
---|
277 | n:p=1
|
---|
278 | n:j=0, d=M:p=0.899
|
---|
279 | n:p=3
|
---|
280 | n:p=6
|
---|
281 | c:3, 1
|
---|
282 |
|
---|
283 | If no delta fields are defined, they will be computed automatically.
|
---|
284 | You can always delete existing delta values by using Joint::resetDelta().
|
---|
285 | Now we will change the second Part's z position by -0.2 and call resetDelta()...
|
---|
286 | As you can see, Joint's delta fields have altered:
|
---|
287 |
|
---|
288 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
289 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
290 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
291 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
292 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
293 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
294 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
295 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
296 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
297 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
298 | p:0.17023272858450833, 0.753051220526163, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
299 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
300 | j:0, 1, sh=1
|
---|
301 | j:1, 2, sh=1
|
---|
302 | j:1, 3, sh=2
|
---|
303 | j:3, 4, sh=1
|
---|
304 | j:4, 5, sh=1
|
---|
305 | j:0, 6, sh=2
|
---|
306 | j:6, 7, sh=1
|
---|
307 | j:6, 8, sh=1
|
---|
308 | j:0, 9, sh=1
|
---|
309 | j:0, 10, rx=0.32290000000000013, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1
|
---|
310 | j:0, 11, sh=1
|
---|
311 | n:p=0, d=Gpart
|
---|
312 | n:p=1
|
---|
313 | n:j=0, d=M:p=0.899
|
---|
314 | n:p=3
|
---|
315 | n:p=6
|
---|
316 | c:3, 1
|
---|
317 |
|
---|
318 | Part references and delta fields are the 'core' properties of the Joint.
|
---|
319 | The other properties are available from Joint::extraProperties()
|
---|
320 | and at the moment are defined as follows:
|
---|
321 |
|
---|
322 | # id type name group (5 properties)
|
---|
323 | 0. stif = 1.0 f 0.0 1.0 1.0 stiffness Extra properties
|
---|
324 | 1. rotstif = 1.0 f 0.0 1.0 1.0 rotation stiffness Extra properties
|
---|
325 | 2. vr = 1.0 f 0.0 1.0 1.0 red component Extra properties
|
---|
326 | 3. vg = 1.0 f 0.0 1.0 1.0 green component Extra properties
|
---|
327 | 4. vb = 1.0 f 0.0 1.0 1.0 blue component Extra properties
|
---|
328 |
|
---|
329 | They can be changed just like Part's extra properties:
|
---|
330 | Change property #3 to random value from range [0..1]
|
---|
331 | Current value of 'vg' (green component) is '1.0'
|
---|
332 | Setting new value... [ using ParamInterface::set() ]
|
---|
333 | The value is now '0.857946'
|
---|
334 | And after that we have this genotype:
|
---|
335 |
|
---|
336 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
337 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
338 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
339 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
340 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
341 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
342 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
343 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
344 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
345 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
346 | p:0.17023272858450844, 0.7530512205261631, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
347 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
348 | j:0, 1, sh=1
|
---|
349 | j:1, 2, sh=1
|
---|
350 | j:1, 3, sh=2
|
---|
351 | j:3, 4, sh=1
|
---|
352 | j:4, 5, sh=1
|
---|
353 | j:0, 6, sh=2
|
---|
354 | j:6, 7, sh=1
|
---|
355 | j:6, 8, sh=1
|
---|
356 | j:0, 9, sh=1
|
---|
357 | j:0, 10, rx=0.32290000000000013, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1, vg=0.857946
|
---|
358 | j:0, 11, sh=1
|
---|
359 | n:p=0, d=Gpart
|
---|
360 | n:p=1
|
---|
361 | n:j=0, d=M:p=0.899
|
---|
362 | n:p=3
|
---|
363 | n:p=6
|
---|
364 | c:3, 1
|
---|
365 |
|
---|
366 | #############################################
|
---|
367 | ## ##
|
---|
368 | ## N E U R O O B J E C T ##
|
---|
369 | ## ##
|
---|
370 | #############################################
|
---|
371 | (neuro # 2)
|
---|
372 | Basic features of Neuro object are similar to those of Part and Joint.
|
---|
373 | We can request a property list:
|
---|
374 |
|
---|
375 | # id type name group (10 properties)
|
---|
376 | 0. p = -1 d -1 999999 -1 part ref# Connections
|
---|
377 | 1. j = 0 d -1 999999 -1 joint ref# Connections
|
---|
378 | 2. d = M:p=0.899 s details Other
|
---|
379 | 3. i = s info Other
|
---|
380 | 4. Vstyle = neuro s 0 0 neuro vis_style Visual
|
---|
381 | 5. getInputCount = 0 d input count Connections
|
---|
382 | 9. classObject = null oNeuroClass neuron class Connections
|
---|
383 |
|
---|
384 | ...and extra properties (which are designed to be always valid and easy to change):
|
---|
385 |
|
---|
386 | # id type name group (0 properties)
|
---|
387 |
|
---|
388 | As usual, we will change something:
|
---|
389 | Each neuron can have any number of inputs = weighted connections
|
---|
390 | with other neurons.
|
---|
391 | According to Neuro::getInputCount(), this one has 0 inputs.
|
---|
392 | Standard API is provided for accessing those inputs (getInput(int)),
|
---|
393 | adding inputs (addInput(Neuro*)) and removing them (removeInput(int)).
|
---|
394 |
|
---|
395 |
|
---|
396 | The most unusual thing is 'details' field (d).
|
---|
397 | It is something like separate object with its own set of properties.
|
---|
398 | Currently the value of 'd' is 'M:p=0.899'.
|
---|
399 | 'M' is the class name (Neuro::getClassName() == 'M') and means 'Muscle for solids'.
|
---|
400 | Neuro::getClass() gives you information about basic characteristic
|
---|
401 | of the class, that can be analyzed automatically.
|
---|
402 | For the current object we can learn that it supports 1 inputs (getPreferredInputs()) and doesn't provide useful output signal (getPreferredOutput()==0).
|
---|
403 | Instances of 'M' can be used in models having shape types: 'solid shapes'.
|
---|
404 | Instances of 'M' can be attached to Joints having shapes: 'hinge x' 'hinge xy'.
|
---|
405 | The class defines its own properties:
|
---|
406 |
|
---|
407 | [ data provided by Neuro::classProperties() ]
|
---|
408 | # id type name group (2 properties)
|
---|
409 | 0. p = 0.899 f 0.01 1.0 1.0 power Muscle for solids
|
---|
410 | 1. a = 0 d 0 1 0 axis Muscle for solids
|
---|
411 | and they can be changed:
|
---|
412 | Change property #1 to random value from range [0..1]
|
---|
413 | Current value of 'a' (axis) is '0'
|
---|
414 | Setting new value... [ using ParamInterface::set() ]
|
---|
415 | The value is now '0'
|
---|
416 | After that, 'details' contains the new object: 'M:p=0.899'.
|
---|
417 | The class of this object can be changed using Neuro::setClassName()
|
---|
418 | The following classes are available:
|
---|
419 | [ data provided by Neuro::getClassInfo()->getProperties() ]
|
---|
420 |
|
---|
421 | # class description properties
|
---|
422 | 0. N Neuron 4
|
---|
423 | 1. Nu Unipolar neuron [EXPERIMENTAL!] 4
|
---|
424 | 2. G Gyroscope 0
|
---|
425 | 3. Gpart Part Gyroscope 2
|
---|
426 | 4. T Touch 3
|
---|
427 | 5.Tcontact Touch contact 0
|
---|
428 | 6.Tproximity Touch proximity 3
|
---|
429 | 7. S Smell 0
|
---|
430 | 8. * Constant 0
|
---|
431 | 9. | Bend muscle 2
|
---|
432 | 10. @ Rotation muscle 1
|
---|
433 | 11. M Muscle for solids 2
|
---|
434 | 12. D Differentiate 0
|
---|
435 | 13. Fuzzy Fuzzy system [EXPERIMENTAL!] 4
|
---|
436 | 14. Sti Sticky [EXPERIMENTAL!] 0
|
---|
437 | 15. LMu Linear muscle [EXPERIMENTAL!] 1
|
---|
438 | 16. Water Water detector 0
|
---|
439 | 17.Energy Energy level 0
|
---|
440 | 18. Ch Channelize 0
|
---|
441 | 19. ChMux Channel multiplexer 0
|
---|
442 | 20. ChSel Channel selector 1
|
---|
443 | 21. Rnd Random noise 0
|
---|
444 | 22. Sin Sinus generator 2
|
---|
445 |
|
---|
446 | Let's change the Neuro's class to 'Sti'...
|
---|
447 | [WARN] Param.loadSingleLine: Unknown property 'Sti.p' (ignored)
|
---|
448 | The final object description will be then: 'Sti'
|
---|
449 | And the full f0 genotype:
|
---|
450 |
|
---|
451 | p:sh=2, sx=0.806, sy=0.806, sz=2.295
|
---|
452 | p:1.6610658177212956, sh=2, sx=0.806, sz=0.806
|
---|
453 | p:2.669522581015868, -0.12927953115999094, 1.770803754024758, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
454 | p:2.5149067817465802, -0.12852148117052686, 1.7757109168238943, sh=1, ing=0.275, rx=-1.277, -1.087, -0.9208
|
---|
455 | p:3.491120795397971, 0.0627093264475479, 3.542562176271334, sh=1, rx=0.4085, 1.0807, 0.5977
|
---|
456 | p:4.82498021179015, -1.4556859677056804, 3.7057221690326423, sh=1, rx=-0.9279, -0.2806, -0.7292
|
---|
457 | p:2.044122892122303, sh=3, sx=1.0144, sy=0.903, sz=0.903, ing=0.22727272727272727, ry=0.271, vs=0.514873
|
---|
458 | p:2.1225041839451873, 0.3558613626799459, 1.8896569415253044, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
459 | p:3.2159989925040344, -0.15022914055334208, 2.057760603467444, sh=1, rx=1.3416, -1.3967, 1.1368
|
---|
460 | p:1.0846131653683386, -0.09317957887309433, -3.5838606901740344, sh=2, sx=1.273, sy=0.133, sz=1.509, ing=0.22727272727272727, rx=-0.9744, -1.5695, 1.1659
|
---|
461 | p:0.17023272858450844, 0.7530512205261631, 3.1779194402835316, sh=3, sx=0.8736, sy=0.8736, sz=0.8736, rx=0.3229, -0.3828, 1.5117
|
---|
462 | p:1.6422082610960242, -0.21052356609516198, 2.883642273506047, sh=1, ing=0.22727272727272727, rx=1.3416, -1.3967, 1.1368
|
---|
463 | j:0, 1, sh=1
|
---|
464 | j:1, 2, sh=1
|
---|
465 | j:1, 3, sh=2
|
---|
466 | j:3, 4, sh=1
|
---|
467 | j:4, 5, sh=1
|
---|
468 | j:0, 6, sh=2
|
---|
469 | j:6, 7, sh=1
|
---|
470 | j:6, 8, sh=1
|
---|
471 | j:0, 9, sh=1
|
---|
472 | j:0, 10, rx=0.32290000000000013, -0.3828, 1.5117, dx=-0.48035983335347077, 0.9067404686418418, 3.10520747206641, sh=1, vg=0.857946
|
---|
473 | j:0, 11, sh=1
|
---|
474 | n:p=0, d=Gpart
|
---|
475 | n:p=1
|
---|
476 | n:j=0, d=Sti
|
---|
477 | n:p=3
|
---|
478 | n:p=6
|
---|
479 | c:3, 1
|
---|
480 |
|
---|
481 |
|
---|
482 | ######### THE END ###########
|
---|
483 |
|
---|
484 | Hints:
|
---|
485 | 1. You can redirect output: genomanipulation >filename.txt
|
---|
486 | 2. Each run can yield different results and new behaviors, but you
|
---|
487 | need to uncomment rndRandomizeSeed() in genomanipulation.cpp.
|
---|
488 | 3. This application will use custom genotype passed as
|
---|
489 | a commandline parameter: genomanipulation "/*9*/FULU"
|
---|
490 |
|
---|
491 |
|
---|