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