Sponsored links: Algebra eBooks
 

Related

make_random_state-makelist

s1: make_random_state...

clear%makelist(random...

Calculate

make_random_state-set_random_state-solve

s1: make_random_state...

set_random_state (s1);

A:random(10);

Calculate

make_random_state-set_random_state-solve

s1: make_random_state...

set_random_state (s1);

A:random(10);

Calculate

make_random_state-set_random_state-true

set_random_state(make...

random(10);

random(10);

Calculate

make_random_state-set_random_state

s1:make_random_state ...

set_random_state (s1);

random(10);

Calculate

make_random_state-set_random_state

s1: make_random_state...

set_random_state (s1);

random(5);

Calculate

make_random_state-set_random_state

set_random_state (mak...

random (10^6);

Calculate

make_random_state-set_random_state-solve

s1: make_random_state...

set_random_state (s1);

A:random(10) / random...

Calculate

make_random_state-set_random_state-solve

s1: make_random_state...

set_random_state (s1);

A:random(10) / random...

Calculate

make_random_state

make_random_state (65...

random (10^6);

Calculate

make_random_state

Run Example
(%i1)build_info();

Maxima version: 5.21.1
Maxima build date: 7:25 9/18/2010
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.7

(%o1) 
(%i2) /* compute angles for intrinsic Tait-Bryan angles * on axes y-z'-x'', conventionally named pitch, yaw, and roll * (following terminology on Wikipedia page for "Euler angles") * via method expounded by G. Slabaugh: * http://www.staff.city.ac.uk/~sbbh653/publications/euler.pdf * * Argument R is a 3x3 rotation matrix. * Return value is a list of two triples, [[pitch1, yaw1, roll1], [pitch2, yaw2, roll2]], * because there are always two solutions. */intrinsic_yzx (R) :=  if equal (R[2, 1], 1) or equal (R[2, 1], -1)    then intrinsic_yzx_yaw_pi2 (R)    else block ([pitch1, pitch2, yaw1, yaw2, roll1, roll2],      yaw1 : asin (R[2, 1]),       yaw2 : %pi - yaw1,      pitch1 : atan2 (-R[3, 1]/cos(yaw1), R[1, 1]/cos(yaw1)),      pitch2 : atan2 (-R[3, 1]/cos(yaw2), R[1, 1]/cos(yaw2)),      roll1 : atan2 (-R[2, 3]/cos(yaw1), R[2, 2]/cos(yaw1)),      roll2 : atan2 (-R[2, 3]/cos(yaw2), R[2, 2]/cos(yaw2)),      [[pitch1, yaw1, roll1], [pitch2, yaw2, roll2]]);
(%o2) intrinsic_yzx(R) := if equal(R    , 1) or equal(R    , - 1)
                                    2, 1               2, 1
 then intrinsic_yzx_yaw_pi2(R) else block([pitch1, pitch2, yaw1, yaw2, roll1, 
roll2], yaw1 : asin(R    ), yaw2 : %pi - yaw1, 
                     2, 1
                - R         R                         - R         R
                   3, 1      1, 1                        3, 1      1, 1
pitch1 : atan2(---------, ---------), pitch2 : atan2(---------, ---------), 
               cos(yaw1)  cos(yaw1)                  cos(yaw2)  cos(yaw2)
               - R         R                        - R         R
                  2, 3      2, 2                       2, 3      2, 2
roll1 : atan2(---------, ---------), roll2 : atan2(---------, ---------), 
              cos(yaw1)  cos(yaw1)                 cos(yaw2)  cos(yaw2)
[[pitch1, yaw1, roll1], [pitch2, yaw2, roll2]])
(%i3) intrinsic_yzx_yaw_pi2 (R) :=  block ([pitch1, pitch2, yaw1, yaw2, roll1, roll2],    yaw1 : %pi/2,    roll1 : 0, /* could be anything */    pitch1 : -roll1 + atan2 (R[3, 2], R[3, 3]),    yaw2 : -%pi/2,    roll2 : 0, /* could be anything */    pitch2 : roll2 + atan2 (R[1, 3], R[1, 2]),    [[pitch1, yaw1, roll1], [pitch2, yaw2, roll2]]);
(%o3) intrinsic_yzx_yaw_pi2(R) := block([pitch1, pitch2, yaw1, yaw2, roll1, 
               %pi
roll2], yaw1 : ---, roll1 : 0, pitch1 : - roll1 + atan2(R    , R    ), 
                2                                        3, 2   3, 3
       - %pi
yaw2 : -----, roll2 : 0, pitch2 : roll2 + atan2(R    , R    ), 
         2                                       1, 3   1, 2
[[pitch1, yaw1, roll1], [pitch2, yaw2, roll2]])
(%i4) set_random_state (make_random_state (1));
(%o4)                                done
(%i5) random_3d_unit () := (random_3d (), %%/norm(%%));
                                                       %%
(%o5)             random_3d_unit() := (random_3d(), --------)
                                                    norm(%%)
(%i6) random_3d () := makelist (random (10), i, 1, 3);
(%o6)            random_3d() := makelist(random(10), i, 1, 3)
(%i7) norm (v) := sqrt (lsum (x^2, x, v));
                                              2
(%o7)                   norm(v) := sqrt(lsum(x , x, v))
(%i8) u : random_3d_unit ();
                            5          9          4
(%o8)                  [---------, ---------, ---------]
                        sqrt(122)  sqrt(122)  sqrt(122)
(%i9) v : random_3d_unit ();
                            8         3         3
(%o9)                   [--------, --------, --------]
                         sqrt(82)  sqrt(82)  sqrt(82)
(%i10) R(a,b):= block ([v, s, c], v:cross(a,b), s:norm(v), c:dot(a,b), ident(length(a)) + ssc(v) + (ssc(v).ssc(v))*(1 - c)/s^2, ratsimp(%%));
(%o10) R(a, b) := block([v, s, c], v : cross(a, b), s : norm(v), 
                                           (ssc(v) . ssc(v)) (1 - c)
c : dot(a, b), ident(length(a)) + ssc(v) + -------------------------, 
                                                       2
                                                      s
ratsimp(%%))
(%i11) cross(a,b) := [a[2]*b[3]-b[2]*a[3], -(a[1]*b[3]-b[1]*a[3]), a[1]*b[2]-b[1]*a[2]];
(%o11) cross(a, b) := [a  b  - b  a , - (a  b  - b  a ), a  b  - b  a ]
                        2  3    2  3      1  3    1  3    1  2    1  2
(%i12) norm(v):= sqrt(v[1]^2 + v[2]^2 + v[3]^2);
                                          2    2    2
(%o12)                   norm(v) := sqrt(v  + v  + v )
                                          1    2    3
(%i13) dot(a,b):= a[1]*b[1]+a[2]*b[2]+a[3]*b[3];
(%o13)                dot(a, b) := a  b  + a  b  + a  b
                                    1  1    2  2    3  3
(%i14) ssc(v) := matrix ([0, -v[3], v[2]], [v[3], 0, -v[1]], [-v[2], v[1], 0]);
(%o14)   ssc(v) := matrix([0, - v , v ], [v , 0, - v ], [- v , v , 0])
                                 3   2     3        1       2   1
(%i15) Ruv : float (R (u, v));
         [  0.80240796270139   0.58412740488141   0.12221553199131  ]
         [                                                          ]
(%o15)   [ - 0.5556446634958   0.80598226750272  - 0.20408721762966 ]
         [                                                          ]
         [ - 0.21771648840189  0.09585280036434   0.97129386456431  ]
(%i16) intrinsic_yzx (Ruv);

rat: replaced -1.5556446634958 by -7758/4987 = -1.55564467615801

rat: replaced 0.4443553365042 by 4987/11223 = 0.44435534170899
(%o16) [[0.26495004690786, - 0.58913814199809, 0.24800273610235], 
             [- 2.876642606681936, %pi + 0.58913814199809, - 2.89358991748744]]
(%i17) 
Run Example
random(6);
(%o1)                                  2
(%i2) make_random_state(true);
(%o2) #S(RANDOM-STATE STATE
      #(0 2567483615 624 3629429270 1732935498 3180354457 4030142250
        792728625 678244442 2892643720 3349094777 1292402474 2392141568
        940678612 1295366319 2865298098 172169085 1416964447 3471745061
        3236136206 4216484658 428059495 2877144758 446075160 682956429
        308173495 1824962890 4171054511 2076074229 1252709470
        3282411670 324736997 2784819830 2818761698 2419509119
        1724488049 3803609425 36224892 888203279 2074383631 3608497323
        973416046 446367629 655323081 2255006582 2872621294 2261467463
        3640765797 1228865387 1349549824 3579880596 458669763
        2963578400 1954583964 437718052 630394472 3398588221 3340671404
        4145695042 4216958941 2693935311 1734735387 245629565
        1500831885 186352505 3213205499 2116247164 49294481 345124470
        1707309776 1250971064 3499469633 3934315343 3314637122
        2548236268 3473364782 4190599690 1849751255 1267984569
        4125968612 1962041968 929452003 2404581342 3316624924
        3646376332 3434515645 1988703561 110988732 489064321 1061060411
        3294348702 943782985 2862979622 1506743438 614245318 1205572474
        3354067684 748078209 304844868 490753844 254677989 3440797371
        1440153339 1562141446 2523058472 2802974712 65849353 2276900085
        3036265692 3735835136 2482304666 1438949988 507453254 428723468
        2734772779 2409388957 3943775532 2010401533 1069969887
        2371109999 3050853494 3266799162 3483293172 4159478251
        2215502081 4059652521 1347256973 3410324920 1044012612
        223712594 3169504217 649568487 1709120164 3972714651 3385697403
        3396213724 2708756096 717206480 529285527 9482267 3692097072
        3918284201 3578099357 926178018 2692271543 4054975991
        3122130387 3865881861 1419934191 349993336 709174507 3564524619
        3552692477 3874896588 3561421634 121498173 561188778 3949799596
        1033876646 3224968218 3074455418 2963692278 620394211
        2762302255 697185890 1424222028 1137538820 300196509 411381142
        2030715604 4003683248 2557147463 1316832738 2936540729
        2775068914 2598092636 2511195843 612293587 1349887470 297819899
        1888931000 3290220207 3294654095 721979888 2445270117
        2826310745 2583149470 1130856772 2699488754 3523301482
        225176360 1518612356 3694652726 2826236839 1376415192
        2144696413 3341138189 3108798792 3445988597 2094044114
        3962256900 4151457929 2216175929 271964175 1917273524
        2120179251 2422664325 2027983119 3181099347 1641248451
        3662261593 1112313682 271382416 4146707618 3989869912
        3971326139 2612191597 641751201 3744997724 412746323 877024920
        3258942162 1606907472 4030334929 2748479671 3985997127
        3638546611 1271629392 2858702806 3278052230 4235659612
        2761132639 3888929942 893338799 2457911538 983338904 4123328481
        3134646036 1376645785 2558267108 4248106923 3825638966
        817481944 1135597096 4112150558 641253731 2174175234 238512372
        296942905 3182455155 3441300364 3795730275 3457769945
        2320975356 1523944497 865468396 798442777 710386907 2177515110
        1424630388 436418090 778492308 3155168359 3149525469 1139131648
        2400928619 817089140 3883070668 3674627508 2511006013
        2012855782 2709097519 2452841422 4181888138 2553660444
        3623644902 4063448682 1947410815 451585481 2244672097 97043748
        1303514186 3923770798 266054489 197934134 1632020584 400532360
        4067904964 2518822816 745045512 1122239047 18242750 379995671
        2310862645 1851455702 3136306423 1478109902 1122282449
        920263223 1200932827 1268548651 3969949628 1125465734
        2139679599 1862582675 997556680 1145584919 2362106078 342127613
        3047106819 1606662040 380064145 3785410666 3599647651 565268311
        231398795 3026570256 3537708628 1260761230 4181995687
        1516959217 3814750446 2688650176 4160026314 2000023438
        3328445357 2306521833 736133883 4001956172 3404319857
        3687099457 2190821714 710000089 768084199 3472892782 2986233933
        3631806328 3431430101 3211644605 2234501547 3999597054
        3855953699 2368977139 502788457 1759670466 3909343557
        1991585781 198279324 465517285 2168048307 538751536 637402700
        3999269209 1846522848 2862375460 3074625630 1941615021
        4252051006 1388690548 4245747853 2694319979 1948010195
        2026656833 1332969128 3925371670 165903795 2565497866
        3761881236 1459276800 2284193491 1818069732 947870409
        3109249982 3362387614 3239268964 948544279 540387464 1746159390
        4025001906 1784603469 103242357 1377980067 1108064613
        2526194160 2725089271 49736231 701120994 3745247658 244894254
        1975280552 1246217264 3215303129 284430316 1279497634 489899478
        645141750 2780687511 1537021267 1654672613 4238367616
        1087518524 1361736095 2145280741 1508182404 1746399242
        355768553 4260628096 978824771 4172193028 3458053209 498225945
        4152503157 1205292327 3024406424 1529490269 2287687912
        3573895151 2723272122 1303431991 2583303150 2949065149
        2804134141 1975930174 1196175999 1904696155 2982164008
        821549625 4179663653 49188263 628966285 678239564 885931176
        3161184245 685794593 3868037300 3779922147 3678691857
        1626625228 3479317396 1076888391 2744894035 1671955627
        342807241 3993353221 2785830423 3424158979 1205435067
        2391865118 1697872841 1023795110 1569395773 861346156 535549277
        3737449587 966025715 1369092515 780519599 1140250065 2172562647
        2001415889 1416022489 4084874242 2304587568 2930674310
        3432598497 759489528 2515905191 3905004009 2574327075
        3390974167 1871417719 1965198178 1190001380 3479931695
        3239867955 3872019144 1001279216 1016305290 932200525
        1550685501 2159869577 2291519925 5746194 1765626106 1885620200
        1164644815 342312489 2288623889 3294935396 3905308297 398438489
        1383020037 870610301 2926395707 496057960 4186654964 817953376
        3670026702 3301586128 1339081775 4221306391 1583029206
        1924730054 2554956663 2631443486 504347906 1265214913
        3533842104 3553647808 3761108457 2082619725 663318776
        3715517397 152793964 9263003 2766308647 2258785946 2089518074
        1284073226 799509595 2981369068 1975624172 2122824072
        1821738517 4132084717 3294881008 3079954666 1539204500
        3113079510 1318298546 12542638 3524464310 3612781690 449695439
        2995282110 1622591552 3742289082 2440349715 2258307532
        1074536030 2845955220 2679580488 1380916301 2775504920
        1998007903 1351064372 4060257032 3243053175 3831600101
        1710191072 1687181544 2800142097 3474634660 2070140425
        1445313359 893494766 372561679 1062789653 2577494388 3835947962
        1809908522 883246373 3073906376 618207714 3316591195 70045418
        13557381 945158573 205789302 3140406980 361335893 3450920129
        2922966211 409973599 1722326454 1089350255 2746064291
        3091291075 2586476132 221410942 2613325815 499387115 412947450
        3380588006 816982686 1634427036 3327927608 2061780367
        1948938575 2357425168 2373480293 3287487727 2274201449
        1283906181 96525411 1170010207 3669960039 3458746054 4012268300
        2990929471 1040960870 1901961620 477921056 3607513592 485459296
        3196059962 1370453363 1848728150 254948784 2505728206 614107
        57844167 356406500 1061258326 3942989393 3551099582 1270322166
        1566413273 98509983 3489369123 18574089 3579317751 2631997359
        4231327405 3277802259 3778293694 3511549184))
(%i3) random(6);
(%o3)                                  0
(%i4) random(6);
(%o4)                                  2
(%i5) 
Run Example
Rx(t) := matrix ([1, 0, 0], [0, cos(t), -sin(t)], [0, sin(t), cos(t)]);
(%o1) Rx(t) := matrix([1, 0, 0], [0, cos(t), - sin(t)], [0, sin(t), cos(t)])
(%i2) Ry(t) := matrix ([cos(t), 0, sin(t)], [0, 1, 0], [-sin(t), 0, cos(t)]);
(%o2) Ry(t) := matrix([cos(t), 0, sin(t)], [0, 1, 0], [- sin(t), 0, cos(t)])
(%i3) Rz(t) := matrix ([cos(t), -sin(t), 0], [sin(t), cos(t), 0], [0, 0, 1]);
(%o3) Rz(t) := matrix([cos(t), - sin(t), 0], [sin(t), cos(t), 0], [0, 0, 1])
(%i4) Rxyz(a, b, c) := Rx(a) . Ry(b) . Rz(c);
(%o4)              Rxyz(a, b, c) := Rx(a) . (Ry(b) . Rz(c))
(%i5) R(a,b):= block ([v, s, c, I],  v:cross(a,b),  s:norm(v),  c:dot(a,b),  I : ident (length (a)),  if equal(s, 0) /* a and b are parallel or antiparallel */    then (if c >
 0 then I else -I)    else I + ssc(v) + (ssc(v).ssc(v))*(1 - c)/s^2);
(%o5) R(a, b) := block([v, s, c, I], v : cross(a, b), s : norm(v), 
c : dot(a, b), I : ident(length(a)), if equal(s, 0)
                                                   (ssc(v) . ssc(v)) (1 - c)
 then (if c > 0 then I else - I) else I + ssc(v) + -------------------------)
                                                               2
                                                              s
(%i6) cross(a,b) := [a[2]*b[3]-b[2]*a[3], -(a[1]*b[3]-b[1]*a[3]), a[1]*b[2]-b[1]*a[2]];
(%o6)  cross(a, b) := [a  b  - b  a , - (a  b  - b  a ), a  b  - b  a ]
                        2  3    2  3      1  3    1  3    1  2    1  2
(%i7) norm(v):= sqrt(v[1]^2 + v[2]^2 + v[3]^2);
                                          2    2    2
(%o7)                    norm(v) := sqrt(v  + v  + v )
                                          1    2    3
(%i8) dot(a,b):= a[1]*b[1]+a[2]*b[2]+a[3]*b[3];
(%o8)                 dot(a, b) := a  b  + a  b  + a  b
                                    1  1    2  2    3  3
(%i9) ssc(v) := matrix ([0, -v[3], v[2]],                  [v[3], 0, -v[1]],                  [-v[2], v[1], 0]);
(%o9)    ssc(v) := matrix([0, - v , v ], [v , 0, - v ], [- v , v , 0])
                                 3   2     3        1       2   1
(%i10) intrinsic_xyz (R) :=  if equal (R[1, 3], +1) or equal (R[1, 3], -1)    then intrinsic_xyz_pitch_pi2 (R)    else block ([roll1, roll2, pitch1, pitch2, yaw1, yaw2],      pitch1 : asin (R[1, 3]),      pitch2 : %pi - pitch1,      roll1 : atan2 (-R[2, 3]/cos(pitch1), R[3, 3]/cos(pitch1)),      roll2 : atan2 (-R[2, 3]/cos(pitch2), R[3, 3]/cos(pitch2)),      yaw1 : atan2 (-R[1,2]/cos(pitch1), R[1, 1]/cos(pitch1)),      yaw2 : atan2 (-R[1,2]/cos(pitch2), R[1, 1]/cos(pitch2)),      [[roll1, pitch1, yaw1], [roll2, pitch2, yaw2]]);
(%o10) intrinsic_xyz(R) := if equal(R    , + 1) or equal(R    , - 1)
                                     1, 3                 1, 3
 then intrinsic_xyz_pitch_pi2(R) else block([roll1, roll2, pitch1, pitch2, 
yaw1, yaw2], pitch1 : asin(R    ), pitch2 : %pi - pitch1, 
                            1, 3
                - R           R
                   2, 3        3, 3
roll1 : atan2(-----------, -----------), 
              cos(pitch1)  cos(pitch1)
                - R           R
                   2, 3        3, 3
roll2 : atan2(-----------, -----------), 
              cos(pitch2)  cos(pitch2)
               - R           R
                  1, 2        1, 1
yaw1 : atan2(-----------, -----------), 
             cos(pitch1)  cos(pitch1)
               - R           R
                  1, 2        1, 1
yaw2 : atan2(-----------, -----------), 
             cos(pitch2)  cos(pitch2)
[[roll1, pitch1, yaw1], [roll2, pitch2, yaw2]])
(%i11) intrinsic_xyz_pitch_pi2 (R) :=  block ([roll1, roll2, pitch1, pitch2, yaw1, yaw2],    pitch1 : +%pi/2,    yaw1 : 0, /* could be anything */    roll1 : -yaw1 + atan2 (R[2, 1], R[2, 2]),    pitch2 : -%pi/2,    yaw2 : 0, /* could be anything */    roll2 : +yaw2 + atan2 (R[3, 2], R[3, 1]),    [[roll1, pitch1, yaw1], [roll2, pitch2, yaw2]]);
(%o11) intrinsic_xyz_pitch_pi2(R) := block([roll1, roll2, pitch1, pitch2, 
                      + %pi
yaw1, yaw2], pitch1 : -----, yaw1 : 0, roll1 : - yaw1 + atan2(R    , R    ), 
                        2                                      2, 1   2, 2
         - %pi
pitch2 : -----, yaw2 : 0, roll2 : + yaw2 + atan2(R    , R    ), 
           2                                      3, 2   3, 1
[[roll1, pitch1, yaw1], [roll2, pitch2, yaw2]])
(%i12) intrinsic_xyz_minimum_norm (R) :=  block ([p, q],    [p, q] : intrinsic_xyz (R),    if norm(p) <
 norm(q) then p else q);
(%o12) intrinsic_xyz_minimum_norm(R) := 
   block([p, q], [p, q] : intrinsic_xyz(R), if norm(p) < norm(q) then p else q)
(%i13) set_random_state (make_random_state (8));
(%o13)                               done
(%i14) random_3d_unit () := (random_3d (), %%/norm(%%));
                                                       %%
(%o14)            random_3d_unit() := (random_3d(), --------)
                                                    norm(%%)
(%i15) random_3d () := makelist (random (10), i, 1, 3);
(%o15)           random_3d() := makelist(random(10), i, 1, 3)
(%i16) a0:float (random_3d_unit ());
(%o16)      [0.34874291623146, 0.92998110995055, 0.11624763874382]
(%i17) norm(a0);
(%o17)                                1.0
(%i18) Rx1:Rx(0.1);
                 [ 1          0                   0          ]
                 [                                           ]
(%o18)           [ 0  0.99500416527803   - 0.099833416646828 ]
                 [                                           ]
                 [ 0  0.099833416646828   0.99500416527803   ]
(%i19) a1:flatten (args (Rx1.a0));
(%o19)      [0.34874291623146, 0.91372967907776, 0.20851007637721]
(%i20) norm(a1);
(%o20)                                1.0
(%i21) R(a0,a1);

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962
       [   0.99946512237808    0.004253693727404  - 0.032424916953477 ]
       [                                                              ]
(%o21) [ - 0.0070814490636194  0.99613054842092   - 0.087600134599152 ]
       [                                                              ]
       [  0.031926826164306    0.087782894645276   0.99562786279753   ]
(%i22) R(a0,a1).a0 - a1;

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962
                         [           0.0            ]
                         [                          ]
(%o22)                   [ - 1.1102230246251565E-16 ]
                         [                          ]
                         [  2.7755575615628914E-17  ]
(%i23) R(a1,a0).a1 - a0;

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962
                         [           0.0            ]
                         [                          ]
(%o23)                   [           0.0            ]
                         [                          ]
                         [ - 1.3877787807814457E-17 ]
(%i24) transpose(R(a0,a1)) - R(a1,a0);

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962
                               [ 0.0  0.0  0.0 ]
                               [               ]
(%o24)                         [ 0.0  0.0  0.0 ]
                               [               ]
                               [ 0.0  0.0  0.0 ]
(%i25) intrinsic_xyz_minimum_norm (Rx1);
(%o25)                            [0.1, 0, 0]
(%i26) intrinsic_xyz_minimum_norm (R(a0, a1));

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962

rat: replaced -1.03242491695348 by -5190/5027 = -1.03242490551024

rat: replaced 0.96757508304652 by 4864/5027 = 0.96757509448976
(%o26)  [0.087758825274045, - 0.032430601435794, - 0.0042559444543473]
(%i27) intrinsic_xyz_minimum_norm (R(a1, a0));

rat: replaced 0.093579964804628 by 7533/80498 = 0.09357996471962

rat: replaced -0.9680731738357 by -5185/5356 = -0.968073188947

rat: replaced 1.031926826164306 by 5527/5356 = 1.031926811053025
(%o27)   [- 0.087940974857543, 0.031932252607692, 0.0070851202417696]
(%i28) Rz1:Rz(0.1);
                 [ 0.99500416527803   - 0.099833416646828  0 ]
                 [                                           ]
(%o28)           [ 0.099833416646828   0.99500416527803    0 ]
                 [                                           ]
                 [         0                   0           1 ]
(%i29) a1:flatten (args (Rz1.a0));
(%o29)      [0.25415746263813, 0.96015127488945, 0.11624763874382]
(%i30) norm(a1);
(%o30)                                1.0
(%i31) R(a0, a1);

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249
        [ 0.99507784201325   - 0.098464987313879   - 0.01116846486926 ]
        [                                                             ]
(%o31)  [ 0.098503645529863    0.9951322745843     0.0029644389006664 ]
        [                                                             ]
        [ 0.010822206410214  - 0.0040499819686495   0.99993323651855  ]
(%i32) R(a0,a1).a0 - a1;

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249
                          [ 5.5511151231257827E-17 ]
                          [                        ]
(%o32)                    [ 1.1102230246251565E-16 ]
                          [                        ]
                          [          0.0           ]
(%i33) R(a1,a0).a1 - a0;

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249
                         [ - 5.5511151231257827E-17 ]
                         [                          ]
(%o33)                   [  1.1102230246251565E-16  ]
                         [                          ]
                         [  1.3877787807814457E-17  ]
(%i34) transpose(R(a0,a1)) - R(a1,a0);

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249
                               [ 0.0  0.0  0.0 ]
                               [               ]
(%o34)                         [ 0.0  0.0  0.0 ]
                               [               ]
                               [ 0.0  0.0  0.0 ]
(%i35) intrinsic_xyz_minimum_norm (Rz1);
(%o35)                            [0, 0, 0.1]
(%i36) intrinsic_xyz_minimum_norm (R(a0, a1));

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249

rat: replaced -1.01116846486926 by -10774/10655 = -1.01116846550915

rat: replaced 0.98883153513074 by 10536/10655 = 0.98883153449085
(%o36)   [- 0.0029646281447198, - 0.01116869706464, 0.098630965900368]
(%i37) intrinsic_xyz_minimum_norm (R(a1, a0));

rat: replaced 0.0991582498431 by 589/5940 = 0.099158249158249

rat: replaced -0.9891777935898 by -7038/7115 = -0.9891777933942

rat: replaced 1.010822206410215 by 7192/7115 = 1.010822206605762
(%o37)   [0.0040502302303021, 0.010822417671092, - 0.098669438486904]
(%i38) intrinsic_xyz (Rxyz (0.0, 0.0, 0.1));

rat: replaced -1.0 by -1/1 = -1.0

rat: replaced 1.0 by 1/1 = 1.0
(%o38) [[0.0, -0.0, 0.1], [3.141592653589793, %pi, - 3.041592653589793]]
(%i39) intrinsic_xyz (Rxyz (0.0, 0.1, 0.0));

rat: replaced -0.9001665833532 by -7565/8404 = -0.9001665873394

rat: replaced 1.099833416646828 by 9243/8404 = 1.099833412660638
(%o39) [[0.0, 0.1, 0.0], [3.141592653589793, %pi - 0.1, 3.141592653589793]]
(%i40) intrinsic_xyz (Rxyz (0.1, 0.0, 0.0));

rat: replaced -1.0 by -1/1 = -1.0

rat: replaced 1.0 by 1/1 = 1.0
(%o40) [[0.1, -0.0, 0.0], [- 3.041592653589793, %pi, 3.141592653589793]]
(%i41) intrinsic_xyz (Rxyz (0.1, 0.1, 0.0));

rat: replaced -0.9001665833532 by -7565/8404 = -0.9001665873394

rat: replaced 1.099833416646828 by 9243/8404 = 1.099833412660638
(%o41) [[0.1, 0.1, 0.0], [- 3.041592653589793, %pi - 0.1, 3.141592653589793]]
(%i42) intrinsic_xyz (Rxyz (0.1, 0.0, 0.1));

rat: replaced -1.0 by -1/1 = -1.0

rat: replaced 1.0 by 1/1 = 1.0
(%o42) [[0.1, -0.0, 0.1], [- 3.041592653589793, %pi, - 3.041592653589793]]
(%i43) intrinsic_xyz (Rxyz (0.0, 0.1, 0.1));

rat: replaced -0.9001665833532 by -7565/8404 = -0.9001665873394

rat: replaced 1.099833416646828 by 9243/8404 = 1.099833412660638
(%o43) [[0.0, 0.1, 0.1], [3.141592653589793, %pi - 0.1, - 3.041592653589793]]
(%i44) intrinsic_xyz (Rxyz (0.1, 0.1, 0.1));

rat: replaced -0.9001665833532 by -7565/8404 = -0.9001665873394

rat: replaced 1.099833416646828 by 9243/8404 = 1.099833412660638
(%o44) [[0.1, 0.1, 0.1], [- 3.041592653589793, %pi - 0.1, - 3.041592653589793]]
(%i45) Rz(c);
                            [ cos(c)  - sin(c)  0 ]
                            [                     ]
(%o45)                      [ sin(c)   cos(c)   0 ]
                            [                     ]
                            [   0        0      1 ]
(%i46) Rxyz(a, b, c);
                [            cos(b) cos(c)             ]
                [                                      ]
(%o46)  Col 1 = [ cos(a) sin(c) + sin(a) sin(b) cos(c) ]
                [                                      ]
                [ sin(a) sin(c) - cos(a) sin(b) cos(c) ]
           [           - cos(b) sin(c)            ]         [     sin(b)      ]
           [                                      ]         [                 ]
   Col 2 = [ cos(a) cos(c) - sin(a) sin(b) sin(c) ] Col 3 = [ - sin(a) cos(b) ]
           [                                      ]         [                 ]
           [ cos(a) sin(b) sin(c) + sin(a) cos(c) ]         [  cos(a) cos(b)  ]
(%i47) 
[append,ascii,block,concat,copylist,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,concat,delete,divsum,first,if,make_random_state,next_prime,second,set_random_state,slength,substring,true] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring,true] [append,ascii,block,copylist,delete,divsum,first,if,make_random_state,next_prime,print,sconcat,second,set_random_state,slength,substring] [append,ascii,block,delete,divsum,first,if,make_random_state,next_prime,sconcat,second,set_random_state,slength,substring,true] [append,ascii,block,delete,first,if,make_random_state,next_prime,sconcat,second,set_random_state,slength,substring,true] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt,subst,transpose] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt,transpose] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt] [args,asin,atan2,block,cos,flatten,float,ident,length,make_random_state,makelist,set_random_state,sqrt] [args,asin,atan2,block,cos,flatten,float,length,make_random_state,makelist,set_random_state,sqrt] [array,block,float,listarray,make_random_state,plot2d,print,set_random_state,true] [array,block,float,listarray,make_random_state,plot2d,print,set_random_state] [asin,atan2,block,cos,ident,length,make_random_state,makelist,matrix,set_random_state,sin,sqrt] [asin,atan2,build_info,cos,float,ident,length,lsum,make_random_state,makelist,ratsimp,set_random_state,sqrt] [asin,atan2,cos,float,fpprintprec,ident,lambda,length,lsum,make_random_state,makelist,map,ratsimp,set_random_state,sqrt] [block,concat,delete,if,make_random_state,set_random_state,true] [block,concat,emptyp,if,make_random_state,makelist,not,printf,random,set_random_state] [block,concat,emptyp,if,make_random_state,makelist,not,printf,random] [block,float,length,make_random_state,ratsimp,set_random_state,sqrt,transpose] [block,ident,length,make_random_state,matrix,ratsimp,set_random_state,sqrt,transpose] [block,length,make_random_state,ratsimp,set_random_state,sqrt,transpose] [display,make_random_state,set_random_state,true] [echelon,genmatrix,lambda,make_random_state,row,set_random_state,true] [evolution,load,make_random_state,orbits,set_random_state,staircase,true] [false,make_random_state,set_random_state] [float,make_random_state,ratsimp,sqrt,true] [genmatrix,make_random_state,permanent,random] [genmatrix,make_random_state,random] [kill,make_random_state,set_random_state,true] [make_random_state,makelist,set_random_state] [make_random_state,makelist] [make_random_state,set_random_state,solve] [make_random_state,set_random_state,true] [make_random_state,set_random_state] [make_random_state]

Related Help

Help for Make_random_state