How to get xyz coordinates of a 3d object

15 次查看(过去 30 天)
I need to get the xyz coordinate points of a 3d object that I've loaded in MATLAB.
So far, I've been able to load the .stl file and I can already rotate it. The part I'm having trouble in is getting the xyz coordinates of the object before rotating it.
Basically, what I need is to get the xyz coordinate points in that blue line, rotate it, and then get the xyz coordinates again, and so on, and so forth until I got all the xyz coordinates of the 3d object.
Is it possible to do this? And can anyone point me in the right direction?
I'm sorry because I'm fairly new to Matlab and 3d processing.
Thanks in advance!
  6 个评论
Walter Roberson
Walter Roberson 2015-9-22
I am known by many names but Matthew is not one of them ;)
I will need to think about an implementation. Are the faces all in a consistent "handedness" that allow you to know which way is inside? Consistent orientation is needed for proper lighting so they might be in consistent order in the model file. Consistent order allows some linear algebra approaches to determine whether a given point is inside or outside.
Paula Daella
Paula Daella 2015-9-22
Oops, I'm sorry. I don't know where I got Matthew from. :) It looks like I need to take a little break from this project.
I'm not really sure I know the answer to your question. But I will try to think about it and get back to you on that. Thank you.

请先登录,再进行评论。

回答(2 个)

Walter Roberson
Walter Roberson 2015-9-22
So create a cubiod grid of the x and y points you want to test together with z sampled over a fine enough interval for your purpose. Then put the grid through the above routine along with the geometry. This will voxelize the geometry into binary inside or outside test. Then for any given row and column indices the positions where the third dimension is true are the coordinates you are looking for.

Anandh
Anandh 2019-6-21
Hi, I need a help. I have a 3D MRI data. I want to get the x,y,z coordinate matrices of the data. Can you please help me?
Thanks in advance!
Anandh.

类别

Help CenterFile Exchange 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by