|
![](/i/fill.gif) |
On 6 Aug 2000 22:27:03 -0400, Ron Parker wrote:
>On Sun, 06 Aug 2000 20:03:53 -0400, John VanSickle wrote:
>>The ability to extract the elements from a declared transform.
>
>[...]
>
>>I don't perceive this as being too difficult, and would give some of
>>the advanced users around here another tool.
>
>Can't you just make a macro that transforms the origin (for the translate
>part) and the three basis vectors (don't forget to subract the translate)
>to extract that info? You need vtransform, of course, but I'm guessing
>you already have access to that.
Here's what I'm talking about. I hope I didn't transpose the 3x3 part of
the matrix, but if I did you should be able to fix that easily enough:
#declare Place = transform {
scale <2,3,1>
rotate <45,-25,35>
translate <-3,0,3>
}
#declare vL=vtransform(0,Place);
#declare vXX=vtransform(x,Place)-vL;
#declare vYY=vtransform(y,Place)-vL;
#declare vZZ=vtransform(z,Place)-vL;
#declare vX=<vXX.x,vYY.x,vZZ.x>;
#declare vY=<vXX.y,vYY.y,vZZ.y>;
#declare vZ=<vXX.z,vYY.z,vZZ.z>;
#debug concat( "[ ", str(vX.x,3,3), ", ", str(vX.y,3,3), ", ",
str(vX.z,3,3), "] \n" )
#debug concat( "[ ", str(vY.x,3,3), ", ", str(vY.y,3,3), ", ",
str(vY.z,3,3), "] \n" )
#debug concat( "[ ", str(vZ.x,3,3), ", ", str(vZ.y,3,3), ", ",
str(vZ.z,3,3), "] \n" )
#debug concat( "[ ", str(vL.x,3,3), ", ", str(vL.y,3,3), ", ",
str(vL.z,3,3), "] \n" )
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |