|
30th September 2008, 02:43 PM | #1 |
Senior Member
Professional user
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
|
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 |
25th May 2014, 02:02 PM | #2 |
Junior Member
Member
Join Date: Apr 2010
Location: Brazil
Posts: 21
|
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 |
25th May 2014, 03:35 PM | #3 |
Senior Member
Professional user
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
|
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 |
25th May 2014, 05:43 PM | #4 |
Junior Member
Member
Join Date: Apr 2010
Location: Brazil
Posts: 21
|
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 |
26th May 2014, 02:40 PM | #5 | |
Senior Member
Professional user
Join Date: Nov 2007
Posts: 139
|
Re: Getting the angle vectors ?
Quote:
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 |
|
26th May 2014, 07:01 PM | #6 | |
Junior Member
Member
Join Date: Apr 2010
Location: Brazil
Posts: 21
|
Re: Getting the angle vectors ?
Quote:
not even wise on scripts languages.ops: ops: Really appreciated the reply, even I did not understand. Regards Fabrizio |
|
26th May 2014, 07:09 PM | #7 |
Junior Member
Member
Join Date: Apr 2010
Location: Brazil
Posts: 21
|
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 |
26th May 2014, 02:34 PM | #8 | |
Senior Member
Professional user
Join Date: Nov 2007
Posts: 139
|
Re: Getting the angle vectors ?
Quote:
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 |
|
|
|