Interactive point selection 3D points

조회 수: 8 (최근 30일)
Diego Hens
Diego Hens 2020년 11월 17일
답변: Prathamesh 2025년 4월 2일
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 :)

답변 (1개)

Prathamesh
Prathamesh 2025년 4월 2일
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

카테고리

Help CenterFile Exchange에서 Other Formats에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by