[vtkusers] vtkPlaneSource, orientation, position w/ SetCenter & SetNormal
Tim Ricard
bnr_shp at yahoo.com
Mon Dec 5 01:28:44 EST 2005
Hello users, please forgive the newbie/linear algebra ignorant question...
I am attempting to position a vtkPlaneSource such that it has a specific height and width (is rectangular) at a specific global coordinate with a specific normal... I have been having trouble using the vtkPlaneSource interface to get the desired orientation... if i do something like
->SetOrientation(0,0.0)
->SetPoint1(width,0,0)
->SetPoint2(0,height,0)
and then
->SetCenter( with the location I want the center to be at in global coords)
->SetNormal (with the actual normal i want the plane to have)
I dont get what I expect, im sure this is not a surprise to people who know whats going on, I read the documentation and it says something about how the normal specifies a rotation or something...well how do I use that so that the final orientation has the normal I want??? or am i totally missing something?
Any pointers here would be really appreciated, obviously im not too comfortable with transformations etc...
in fact, i have another problem, i am also attempting to orient a vtkCylinderSource along a specific vector (including the length), i have projected the vector into two planes, maybe xz to get an angle around the y axis and then the yx axis to get a rotation around the z axis etc... then i attempt to use a vtkTransform and a vtkTransformPolyDataFilter to orient the cylinder but again, i dont get what i expect. I always see/hear about rotation matrices, but are those rotations relative to the original orientation? or would say a rotation around y axis after a rotation around the x axis would actually rotate about the rotated y axis? Are the rotations cummulative? I guess what I am saying is people always show rotation matrices but what i dont get is given a desired orientation, how do i figure out the rotations that get me there, i know there are multiple ways each time...
anways, any help at all would be greatly appreciated, again
thanks for your time
-tim
---------------------------------
Yahoo! Shopping
Find Great Deals on Gifts at Yahoo! Shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051204/cea3c642/attachment.htm>
More information about the vtkusers
mailing list