10th July 2008, 12:03 PM | #1 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Output the angles, x,y,z
If I have two objects, a wing and aileron, where the aileron is cut into the wing object.
What I'd like to be able to have a read out of the x,y,z angles of the intersection, the aileron hinge. This would be by selecting two, or more, vertices along the hinge line. We can already red out the centre point of the intersection, but not the angles. Then I can then put both centre point and angle data into my animation file, a text file, for use by Targetware. Is this possible ?
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
10th July 2008, 02:47 PM | #2 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,565
|
Re: Output the angles, x,y,z
Hi Mossie,
I'm not sure how you can get an angle from two vertices. Can you make a picture of what you need? |
10th July 2008, 03:06 PM | #3 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Output the angles, x,y,z
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
11th July 2008, 09:50 AM | #4 |
Senior Member
Professional user
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
|
Re: Output the angles, x,y,z
Use your two vertices to construct a vector. Construct a second vector that is the axis you want to find the angle between.
Normalize both vectors and take the dot product of the two vectors. The arccosine of the dot product is the angle in radians between the two vectors. Remember this is along the plane formed by the two vectors, so adjust accordingly. Another (better) way to do it is to use your vector to construct an orientation matrix. As before, construct a vector from your two endpoints. This is your look vector. Normalize the vector. Assign an arbitrary up vector (generally 0,1,0 unless your look vector is parallel to this). Take the cross product between the look vector and the up vector which will give you a perpendicular. This is the right vector. Normalize the right vector. Take the cross product between the right vector and the look vector. This will give you a corrected up vector. Normalize it. You now have all three vectors required to construct an orientation matrix. Each vector forms one row (or column, depending on if you are row-major or column-major) of your 3x3 orientation matrix. You can convert from an orientation matrix to Euler angles if you need with the equation here: http://www.euclideanspace.com/maths/...uler/index.htm |
11th July 2008, 03:44 PM | #5 |
Senior Member
Professional user
Join Date: Feb 2006
Posts: 219
|
Re: Output the angles, x,y,z
|
7th September 2008, 02:43 PM | #6 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Output the angles, x,y,z
All too hard on maths, so I tried using the XPlane plug-in and it provides usefull animation capabilities, provides hinge point locations and helps me work out angles.
This for the momnet if covering what I need, till I exhaust this plug-in.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
12th January 2009, 07:28 PM | #7 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Output the angles, x,y,z
Ok, I've now exhausted the XPlane plug in and it still doesn't cover angles at all.
While the animation works a treat and helps with pivot points, directions and angle of animation. It doesn't provide the angles for intert parts like ailerons, etc. Even when you look at the raw text file. Yet it has the pivot points. So close. I've been looking at other 3D tools and Lightwave seems to have something, as well as Silo. But I don't want to change tools, as it would drop my productivity a lot. How can this suggestion/feature be moved forward?
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
Thread Tools | |
Display Modes | |
|
|