Set the last column of a Geom::Transformation
-
Hi Guys,
I am working on a plugin handling projections where I end up creating my own transformation matrices. I was getting weird results and it took me a while to see that SketchUp was discarding some data from the last column , which is problematic in my case.
Geom;;Transformation.new([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]).to_a >> [1.0, 2.0, 3.0, 0.0, 5.0, 6.0, 7.0, 0.0, 9.0, 10.0, 11.0, 0.0, 13.0, 14.0, 15.0, 16.0]
(note the missing items #3,#7,#11 keeping the value 0.0)
Do you know why and if there is any workaround?
Thanks!
-
You may find information on this in:
"Automatic SketchUp - Creating 3-D Models in Ruby"
by Mathew Scarpino
Permissions may be sought directly from Eclipse Engineering LLC:
Fax: (925) 262-1757
E-mail: info@eclipseengineer.comAppendix B: Advanced Geometry..................................... 391
B.3 Introduction to Transformation Matrices .........................................406
B.4 Combinations of Transformations...................................................415
B.5 Transforming Points and Vectors....................................................418
B.6 Mathematics of Combining Transformations....................................423You may find helpful links here:
http://sketchucation.com/forums/viewtopic.php?f=180&t=10142&p=573943&hilit=automatic+sketchup#p269709
Advertisement