Finding Transformation Matrix of a viewer3d object
Show older comments
I need to map 3D vertices in a viewer3d object to 2d figure coordinates. It's actually because I want the user of my app to be able to select a set of points by drawing a polygon, as I have mentioned here.
The viewer3d has some camera properties: cameraPosition, cameraTarget, cameraUpvector and cameraZoom.
But appearently I cannot use these parameters to construct a transformation matrix, since the camera zoom seems to be relative; it's 1.0 at the beginning of the display and is not a function of the window size, object dimension etc.
Is there any way I could extract the camera information needed?
4 Comments
Catalytic
on 20 Feb 2024
What is "the beginning of the display"? The lower left corner?
Reza
on 20 Feb 2024
It's actually because I want the user of my app to be able to select a set of points by drawing a polygon
If so, a mapping from 3D to 2D is not what you would need. You need the other way around. A polygon is 2D, so the input to your mapping would be a 2D selection and the output would be 3D locations on the object.
Reza
on 20 Feb 2024
Accepted Answer
More Answers (1)
Categories
Find more on Process Point Clouds in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

