Cancel
Showing results for
Did you mean:

# Get point coordinates of an endpoint of a line after rotating it through an angle

Valued Contributor

Hello,

It's more of a maths doubt rather then a NX doubt. Does anyone knows if there's a formula through which we can get the coordinates of an endpoint of a line after it is rotated through an angle. The below attached pic will help you in understanding the question betterpoint coordinates

If we take an example as per the above picture,  I know point coordinates at X,Y,Z and I also know the angle (12 deg in this case), the starting point of the line is (0,0,0). Having this information is there a formula through which I can find out point coordinates i.e X1, Y1, Z1 ?

3 REPLIES 3

# Re: Get point coordinates of an endpoint of a line after rotating it through an angle

Gears Phenom

Why not just ask the line for its end points?

Graham Inchley Snr R&D Engineer (Systems Development), Sandvik Coromant
Lenovo ThinkPad W540, Win7, 16GB. Developing in: Java | C | KF
Production: [NX8.5.3.3 MP11 64bit] Testing: [NX12.0.2 MP1]

# Re: Get point coordinates of an endpoint of a line after rotating it through an angle

Valued Contributor

I have drawn two lines only for reference in the pitcture. I have line (0,0,0) - (x,y,z) with me and I also have the angle through which this line has to be rotated. And after the rotation I have the line (0,0,0) - (x1,y1,z1) with me and I want to the (x1,y1,z1) coordinates.

I do not if theres a rotation function available in NX with which I can rotate the line and then get its end point.

I would like to avoid creating geometry to determine the coordinates of (x1,y1,z1). So I want to know if there's a mathematical solution for this problem.

Hope I was able to explain the problem clearly.

# Re: Get point coordinates of an endpoint of a line after rotating it through an angle

Legend

The mathematical solution is the rotation matrix

https://en.wikipedia.org/wiki/Rotation_matrix

Nikolas Losse | Developer | Siemens PG PR R&D TEC
NX12 | CentOS7 | Python