Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Direction Cosines of a line in 3d Axis system

Status
Not open for further replies.

NaWin55

Mechanical
Mar 21, 2020
97
IN
HI all
i have problem in catia where i need to create a line using direction vectors the line must be in 5 deg multiples with each axis
for example 35deg with Z-axis,65deg with Y-axis and 95deg with X-Axis like the value may vary
this is about direction cosines and direction ratios
i need to use vba to get the direction cosines using math
i can do the vba part but i just need the logic to make line 5deg multiples to all 3 axis
below images shows the example

Direction_Vectors_cf6gkj.jpg

X-Angle_kcplmf.jpg

Y-Angle_wmeyix.jpg

Z-Angle_ntxr90.jpg


With respect X it is 90deg i need to make it 30deg with respect to Z without changing the X angle and 60deg with respect to Y without affecting any other angle
how to solve this with math equations


Thanks
 
Replies continue below

Recommended for you

For each axis and for each angle there is a cone about each axis that represents a line at that angle.

In the simple case, the X-Y plane the solution cones can be tangent. Any other intersections are outside the plane and can be ignored for the 2D case.

In 3D you are looking for places where integer multiples of three 5 degree cones intersect along a single line. I expect that will not often be the case, but it's easy enough to calculate all the intersections between the cones on the X and Y axes and see what the intersection angle is relative to the Z sxis.

By inspection you can eliminate all combinations that cannot intersect - 5 degrees to X and 5 degrees to Y, for example. Also, all combinations where the X-axis cones are tangent to the Y-axis cones will all be at 90 degrees to the Z axis.
 
Hi 3DDave Thank you very much for your response
i have created cones using your answer
below image
COnes_acec2k.jpg


i am getting 3 lines which are 5deg multiples with respect all 3 axis
now how do i create a main line which is in 5deg multiple to x y and z axis
 
They don't share a common intersection line so they don't meet the requirement. My guess is there is no solution that is not in one of the coordinate planes so one angle of the three will always be 90 degrees and the other two will add to 90 degrees or 180 degrees.
 
Thank you 3DDave
yes one must be 90deg then only it gives correct angles i tried that also but without one angle 90deg it is not possible i think

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top