Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Display Modes
Old 30th September 2008, 02:43 PM   #1
Stiglr
Senior Member
Professional user
 
Stiglr's Avatar
 
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
Default Re: Getting the angle vectors ?

I've done the edit, but I'm not sure I'm getting the right results (or what I'm expecting to see).

For example, I have an aileron on an aircraft.



It's on a wing with a 5 degree dihedral (so this is known, and confirmed by actually rotating the part "flat" in AC3D from the vertice). But, if I select two leading top edges of the aileron (to use as the "hinge"), click Set axis, then cut and paste the results into a Notepad, I get:


0.995928 0.00242298 -0.0901201 (I'm assuming this is in X,Y,Z order)

None of these values is anywhere near 5 degrees (presumably this should be in the Y (nose to tail axis). The first value is basically one degree, the others are very close to "straight", as is indicated by the position of the part.

Also, when I click the Set Axis button, the message I get at the bottom of the screen is "Got axis from vertices OK". I'd much rather just see the numeric values... does this mean I don't want to use the code snippet for "copy and paste" onto the clipboard? What I'd like in the end is to see the values when I hit the Set Axis button, and then be able to copy-and-paste the results into a different application or a Wordpad document.
__________________
Flight Sim Project Contributor

My Gaming Rig:
i5 2500K Quad-Core CPU at 3.3GHz
MSI P67A-C43 mobo
4GB of PC12800 DDR3 memory
Windows 7
1GB Galaxy GeForce GTX550 Ti video card GeForce 270.61 drivers (4/2011)
Cougar joystick/throttle combo
CH Pedals
Stiglr is offline   Reply With Quote
Old 25th May 2014, 02:02 PM   #2
fabrizio fracaroli
Junior Member
Member
 
Join Date: Apr 2010
Location: Brazil
Posts: 21
Default Re: Getting the angle vectors ?

How can I get the angle from 3 selected vertices?
I am about to make a real cockpit (home cockpit) of the F16 at home. I have already the 3d model, but I would like to know the angles that the shapes are formed, in order to make the home cockpit closest to the 3d model, which is very nice drawn.
I will try to be more specific:
In a box, we know the angles of the sides are 90 degrees,
But there are too many "shapes" with too many different angles, that I need a tool to get them out.
I do not want to guesstimate the whole work.
Best regards
Fabrizio
fabrizio fracaroli is offline   Reply With Quote
Old 25th May 2014, 03:35 PM   #3
Stiglr
Senior Member
Professional user
 
Stiglr's Avatar
 
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
Default Re: Getting the angle vectors ?

I think you need an answer from someone who is good at Trigonometry or Geometry. That would definitely *not* be me!!
__________________
Flight Sim Project Contributor

My Gaming Rig:
i5 2500K Quad-Core CPU at 3.3GHz
MSI P67A-C43 mobo
4GB of PC12800 DDR3 memory
Windows 7
1GB Galaxy GeForce GTX550 Ti video card GeForce 270.61 drivers (4/2011)
Cougar joystick/throttle combo
CH Pedals
Stiglr is offline   Reply With Quote
Old 25th May 2014, 05:43 PM   #4
fabrizio fracaroli
Junior Member
Member
 
Join Date: Apr 2010
Location: Brazil
Posts: 21
Default Re: Getting the angle vectors ?

Hi thanks for quick reply.
Should I post a new thread about it?
In the ac3d, when I select two vertices, I have a measure of distance.
How about to have a feature like this:
When selecting three vertices, the UI shows the angle.
Regards Fabrizio
fabrizio fracaroli is offline   Reply With Quote
Old 26th May 2014, 02:40 PM   #5
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Getting the angle vectors ?

Quote:
Originally Posted by fabrizio fracaroli View Post
Hi thanks for quick reply.
Should I post a new thread about it?
In the ac3d, when I select two vertices, I have a measure of distance.
How about to have a feature like this:
When selecting three vertices, the UI shows the angle.
Regards Fabrizio
Hmm, the angle would depend on the order you selected the vertices in.

Math-wise, if your vertices were v1, v2 and v3 you could calculate the angle by letting vectorA = v1-v2 and vectorB = v3-v2 then take:

acos( vectorA dot vectorB )/(||vectorA|| ||vectorB||)

Not sure right now how to wrap that into a neat UI function...

Ron
jentron is offline   Reply With Quote
Old 26th May 2014, 07:01 PM   #6
fabrizio fracaroli
Junior Member
Member
 
Join Date: Apr 2010
Location: Brazil
Posts: 21
Talking Re: Getting the angle vectors ?

Quote:
Originally Posted by jentron View Post
Hmm, the angle would depend on the order you selected the vertices in.

Math-wise, if your vertices were v1, v2 and v3 you could calculate the angle by letting vectorA = v1-v2 and vectorB = v3-v2 then take:

acos( vectorA dot vectorB )/(||vectorA|| ||vectorB||)

Not sure right now how to wrap that into a neat UI function...

Ron
I am very embarrassed saying that... but I do not understand these maths. I was never good on "sen" cos" tang" etc, related to the geometric calculations...
not even wise on scripts languages.ops: ops:
Really appreciated the reply, even I did not understand.
Regards Fabrizio
fabrizio fracaroli is offline   Reply With Quote
Old 26th May 2014, 07:09 PM   #7
fabrizio fracaroli
Junior Member
Member
 
Join Date: Apr 2010
Location: Brazil
Posts: 21
Default Re: Getting the angle vectors ?

The UI showing the calculated angle would be nice. That is what I am needing.
I am starting making a homecockpit of the F16 Falcon at home.
It is only in the 3d model.
As I do not know how to get the measures and angles in another way, I thought if i get them from the 3d model, it will be the best for me.
So I started making "base textures" , It will be the base for me to build the pit in the future, as all the angles, and measures will be written on these textures, at the edges of the pit... Well, I hope I could explain better (at least a little).
(different language)
Regards Fabrizio
fabrizio fracaroli is offline   Reply With Quote
Old 26th May 2014, 02:34 PM   #8
jentron
Senior Member
Professional user
 
Join Date: Nov 2007
Posts: 139
Default Re: Getting the angle vectors ?

Quote:
Originally Posted by Stiglr View Post
I've done the edit, but I'm not sure I'm getting the right results (or what I'm expecting to see).

0.995928 0.00242298 -0.0901201 (I'm assuming this is in X,Y,Z order)

None of these values is anywhere near 5 degrees (presumably this should be in the Y (nose to tail axis). The first value is basically one degree, the others are very close to "straight", as is indicated by the position of the part.
Haven't read the thread too deeply, but what you're seeing here is:

x = cos(-5 degrees) = 0.996
y ignored since this is the axis you want. If it were large we'd have to set it to zero and re-normalize the vector.
z = sin(-5 degrees) =-0.087

Ron
jentron is offline   Reply With Quote
Reply


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 04:45 AM.


AC3D Forum
(C) Inivis Limited 2020