Go Back   AC3D Forums > General > AC3D Suggestions
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 10th July 2008, 12:03 PM   #1
Mossie
Senior Member
Professional user
 
Mossie's Avatar
 
Join Date: Dec 2003
Location: UK
Posts: 369
Default 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/
Mossie is offline   Reply With Quote
Old 10th July 2008, 02:47 PM   #2
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default 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?
Andy is offline   Reply With Quote
Old 10th July 2008, 03:06 PM   #3
Mossie
Senior Member
Professional user
 
Mossie's Avatar
 
Join Date: Dec 2003
Location: UK
Posts: 369
Default Re: Output the angles, x,y,z

Ok, a picture tells it all......

http://www.mossie.me.uk/ww1/download/angle_readout.jpg

Thanks
__________________
Regards, Gerry "Mossie" Mos
--------------------------------------------------------------------------
WW1 Aircraft Library
http://ww1-aircraft.info/

Mossie 3D CAD, "Prompt and Precise"
http://mossie3dcad.com/
Mossie is offline   Reply With Quote
Old 11th July 2008, 09:50 AM   #4
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default 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
lisa is offline   Reply With Quote
Old 11th July 2008, 03:44 PM   #5
donamy
Senior Member
Professional user
 
Join Date: Feb 2006
Posts: 219
Default Re: Output the angles, x,y,z

try this:
http://www.inivis.com/forum/showthread.php?t=4937
donamy is offline   Reply With Quote
Old 7th September 2008, 02:43 PM   #6
Mossie
Senior Member
Professional user
 
Mossie's Avatar
 
Join Date: Dec 2003
Location: UK
Posts: 369
Default 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/
Mossie is offline   Reply With Quote
Old 12th January 2009, 07:28 PM   #7
Mossie
Senior Member
Professional user
 
Mossie's Avatar
 
Join Date: Dec 2003
Location: UK
Posts: 369
Default 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/
Mossie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 09:46 AM.


AC3D Forum
(C) Inivis Limited 2020