Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Get unitVector X Y Z values

Get unitVector X Y Z values

Get unitVector X Y Z values

Hi all
i want to create lines on a surface using bunch of points, those lines must be in 5deg incremental
here are the steps
Step:1 - first i will create lines using normal to surface option
Step:2 - then i measure the angle between normaltosurface line and xyPlane if the angle is near to 5deg mutiples number for ex if angle is 81.23deg
Step:3 - then i should create a line using point-direction option which is 80deg and if angle more than 82.5 and less than 87.5 then i should create a line using point-direction option which is 85deg
i need to get the X Y Z direction components which makes the angle between point-direction line and xyplane 5deg multiples like 80,85,90,95,100deg

the surface in the image is not actual surface

x y z components are unit vectors of line that i need to create
i know the angle, for that angle i need to find out the X Y Z unit vector values using VECTOR ROTATION IN 3D SPACE FORMULA
here is the image of that formula

here we know the value of theta using that we need to calculate X Y Z unit vector values
i need to this in VBA

RE: Get unitVector X Y Z values

just a suggestion: while you learn to use transformation matrix math, you can still use basic geometry logic...

so you have a point A on surface, a Line L, and the angle Theta with Z direction.
This angle is in the plane P defined by L and the vertical line V passing by A.
create the vertical line V and the plane P using vba

the rotation angle Theta could be measured between L and V. the rotation axis would be a line R normal to P passing by A
create this line R in vba

using the reference line V, the line axis R, and angle Theta, you can create the line L2 you want using line angle (ref plane is P and angle is Theta2...)
Create this line L2 in vba

use VBA to measure the line and get its direction, that will give you the XYZ value of the vector of the line you're looking for.

now you can build the line in vba with the point A and the direction you have.

Eric N.
indocti discant et ament meminisse periti

RE: Get unitVector X Y Z values

hey @itsmyjob thank you for your response, but

i am not getting the following statement

This angle is in the plane P defined by L and the vertical line V passing by A.
create the vertical line V and the plane P using vba

what is vertical line V here and plane P

could you elaborate please


RE: Get unitVector X Y Z values

for 2 given lines the angle between the line are in the plane passing by the 2 lines

you measuring your normal line L and the vertical Z.... Z is a direction not a line so I say you create line passing by point (A) on surface with vertical direction (line v)
the point (A) is the point on the surface where the normal line start from
the plane (P) pass by your normal line (L) and a vertical line (V) from point (A) on surface

Eric N.
indocti discant et ament meminisse periti

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close