0

I have a profile entity in XY plane. I have to do an extrusion along a vector. So I have to bring the profile entity perpendicular to the extrusion vector. Extrusion vector can be a arbitrary one (Xi+Yj+Zk). Could you please provide some idea about vector base manipulation to bring the profile perpendicular to the extrusion vector?

Update

......

Profile in XY plane

Global up vector : (0,0,1)

Extrusion vector : (Xe,Ye,Ze)

Local right = Extrusion vector x Global up vector = (x1,y1,z1) Local Left = Extrusion vector x Local right = (x2,y2,z2)

I assume I have to rotate the plane twice about Local right and Local Left.

So the angle is calculated for Local right = Atan(Xe.Y/Xe.Z) and the entity is rotated about Local right by calculated angle. and it is working fine

My question is how to calculate the angle for Local Left ?

If I summarize, I have to do the opposite of this one (Mapping coordinates from plane given by normal vector to XY plane)

Community
  • 1
  • 1
RobinAtTech
  • 1,299
  • 3
  • 22
  • 48
  • by Extrusion vector x Global up vector do you mean multiplication or cross product? – Lochemage Aug 07 '13 at 16:01
  • also, by `local left` you actually mean `local up`. You only need right and up vectors for a plane. Use those vectors in the negative direction for left and down vector equivalents. – Lochemage Aug 07 '13 at 16:06

1 Answers1

1

If you have your extrusion vector and one reference vector you can cross multiply them to retrieve your 2D planes' right vector in 3D space.

I usually use the global up vector as my reference. So your extrusion vector cross multiplied with global up will result in a local right vector. Another cross multiply between your extrusion vector and your new local right vector will result in a local up vector.

Once you get both your local right and local up vectors, those will be your planes X and Y vectors in 3D space.

Lochemage
  • 3,974
  • 11
  • 11
  • Please check my, update, Your solution working partially only, may be my mistake too – RobinAtTech Aug 07 '13 at 00:17
  • If I summaries my question, How transform coordinates from one plane to another plane. what are the steps to do it? – RobinAtTech Aug 08 '13 at 06:19
  • This is opposite of my requirements http://stackoverflow.com/questions/8780646/mapping-coordinates-from-plane-given-by-normal-vector-to-xy-plane – RobinAtTech Aug 08 '13 at 06:25