- #1
RichardWattUK
- 12
- 1
- TL;DR Summary
- Mapping 3D Cartesian points between coordinate systems
I've taken on a new job recently where I'm having to maintain an existing application that generates a points profile to drive a CNC machine and part of it projects points from an axial plane (which represents the machine's working axis) onto another plane which (I think) acts as as a global/world coordinate system - I'm guessing as I'm still finding the documentation from the people who worked on it a few years ago and have since left.
The application uses Newton's method to find an angle of rotation to map a point on the profile in the axial plane across to the projected plane, which works in the majority of cases, but there are some where it doesn't due to being unable to find the appropriate angle of rotation to use within 30 iterations and with an accuracy of +- 0.0001.
I've been looking at matrix-based rotations and transformations to do this, including something based on the original code that was used to do this translation which worked in a different way by finding the distance along the Y axis for the new point using Newton's method with an accuracy of +- 0.00001 in a maximum of 30 iterations.
But I can't get anything to work - I've been looking at working with the radius and angle to the point on the axial plane (the Y coordinate is taken as = 0 so we're only looking at X and Z coordinates) to the origin, but not getting anywhere with that.
I've attached an image showing how the planes & their axes are related, with "γ" on the diagram representing the projection angle between the axial and projected planes.
So my question is related to whether anyone knows of a way to perform this mapping/projection please? It's been about 20 years since I last looked at these kinds of calculations so I'm a bit out of practice with them.
The application uses Newton's method to find an angle of rotation to map a point on the profile in the axial plane across to the projected plane, which works in the majority of cases, but there are some where it doesn't due to being unable to find the appropriate angle of rotation to use within 30 iterations and with an accuracy of +- 0.0001.
I've been looking at matrix-based rotations and transformations to do this, including something based on the original code that was used to do this translation which worked in a different way by finding the distance along the Y axis for the new point using Newton's method with an accuracy of +- 0.00001 in a maximum of 30 iterations.
But I can't get anything to work - I've been looking at working with the radius and angle to the point on the axial plane (the Y coordinate is taken as = 0 so we're only looking at X and Z coordinates) to the origin, but not getting anywhere with that.
I've attached an image showing how the planes & their axes are related, with "γ" on the diagram representing the projection angle between the axial and projected planes.
So my question is related to whether anyone knows of a way to perform this mapping/projection please? It's been about 20 years since I last looked at these kinds of calculations so I'm a bit out of practice with them.