- ginput3: https://www.mathworks.com/matlabcentral/fileexchange/34939-ginput-3d
- ginput: https://www.mathworks.com/help/releases/R2024a/matlab/ref/ginput.html
Interactive point selection 3D points
23 views (last 30 days)
Show older comments
Hello,
I need your help.
In the image bellow (hopefully it did work this time) there is a three-dimensional tooth on the left (with its three-dimensional coordinates, of course) and on the left the same tooth but in a two-dimensional parameterised disc. The order of the points on the 2D and 3D vectors are the same, that is, the points are corresponding.
I woud like to select a point on the 3D tooth and get the same point marked on the right 2D tooth. I can do this the other way around, that is, selecting a point on the disc and then getting the correspondent on the 3D figure.
My method for doing this on the 2D was with the function getpts, which gives me the coordinates of the mouse where I click. I then take the nearest neighbour of that point (or points) and plot the corresponding points on the 3D figure with its correct indexes.
So my question is, is there a similar function to getpts() for a 3D figure?
Thank you :)

0 Comments
Answers (1)
Prathamesh
on 2 Apr 2025
Hi @Diego Hens I understand that you have two images: a 3D representation of a tooth and a 2D parameterized disc of the same tooth. To select a random point from the 3D image and find the corresponding point on the 2D image you may use the MATLAB function ‘ginput’ for 2D and ‘ginput3’ for 3D. This function allows you to select points from a plot using the mouse. It typically returns the x and y coordinates of the selected points. It is a more general function and can be used in various plotting contexts.
For more details, please refer to the MathWorks documentations:
Hope this helps
0 Comments
See Also
Categories
Find more on Other Formats 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!