To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 13444
13443  |  13445
Subject: 
Re: Finding a rotation matrix for a triangle
Newsgroups: 
lugnet.cad
Date: 
Mon, 28 Nov 2005 18:50:16 GMT
Viewed: 
1381 times
  
In lugnet.cad, Niels Bugge wrote:
   What I mean is:

In MLCad, you can take a part, and rotate it via a vector command like turn 45 degrees around y axis clockwise. Or more complex rotations based on more axes.

What I would like to know is: How do I find the rotation vector of a plane (defined by three coordinates)?

Back in the math class years ago, one of the possible definitions of a plane was a vector starting in some point on the plane, standing out at a 90 degrees angle to it. That way you would know the 3d angle of the plane from the vector.
Now, if I could get the 3d rotations of such a vector corresponding to my triangle, I would be able to place any primitive precisely on it at the right angle.

I know there’s formulas that would enable me to find that vector, and yet other and more complex formulas that would give me the angles - I would just like to know if there was some program out there that can do it for me.

It would probably not be too hard to make some sort of excel sheet, where you could enter the coordinates of the triangle, (and preferably the point where you would like to add the primitive), and get the rotation vector values out in the other end - IF you have the formulas to find the vector, and the formulas that will give you the correct, complex, rotation vector value.

I might be able to do the first part if I hadn’t had to return the books when I finished school, but I’m not sure how that rotation vector thingie works when stuff is turned at more than one angle at a time: It seem to get really complex.

So I was kinda hoping that someone had made a clever program already, or that somebody. that remembers a lot more of3D coordinate system and understand Ldraw and/or Mlcad much better than I. would whip it up.

It would really be a great help when working with parts - like I said, I’ve already got 2 parts I need this sort of program for: One that’s stucked/halted in the PT: http://www.ldraw.org/cgi-bin/ptdetail.cgi?f=parts/s/6153s01.dat
and one I’ve nearly finished, but got stucked with at least 7 months ago: http://peeron.com/inv/parts/6032

I can’t be the only one that could use such a program...

Cheers NB

Hi Niels,

I think you are getting two things a little crossed here but I will try to answer you questions.

Firstly, you must remember that a plane can be defined meaningfully by a normal vector (one perpendicular to the plane) and a vector position on the plane. The actual definition of a plane only requires three terms (ie. one vector) but it is often easier to think this way.

If you have a triangle lying on the plane (three points) you can define a plane by a normal vector defined as n=(p3-p1) x (p2-p3) where x is the cross-product. ie. n_x=(p3_y-p1_y)*(p2_z-p3_z)-(p3_z-p1_z)*(p2_y-p3_y) with similar expressions for n_y and n_z. Of course the plane also passes through any of these points so lets say it is p3.

From what you are talking about, I think it is n that you are interested in. Thus, if you define a triangle with points p1, p2 and p3, you want to rotate around the vector n=(p3-p1)x(p2-p3).

To do the rotation is a little more complicated than I can easily write with FTX so I refer you here where the v is n/|n| and theta is your angle (be sure of degrees or radians in your cos and sin).

One further point is that you need a hand system t

Hope that helps.

Tim



Message has 1 Reply:
  Re: Finding a rotation matrix for a triangle
 
(...) Heh, probably ;-) Well, perhaps I got the math part, and definition process a bit mixed up: I'd just like to have a program that, from a three coordinates on a plane, can give me a rotation vector+angle that I can enter in MLCad... And I'm a (...) (19 years ago, 29-Nov-05, to lugnet.cad, FTX)

Message is in Reply To:
  Re: Finding a rotation matrix for a triangle
 
What I mean is: In MLCad, you can take a part, and rotate it via a vector command like turn 45 degrees around y axis clockwise. Or more complex rotations based on more axes. What I would like to know is: How do I find the rotation vector of a plane (...) (19 years ago, 28-Nov-05, to lugnet.cad)

13 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR