making a 2d image from 3d shape
Mostrar comentarios más antiguos
Hello. I have a shape that I would like to cut out a slice of. I also have coordinates from an XY plane at a particular Z value that I'd like to use. So because I'm expecting 2 circles, I calculate their radii and see if my XY plane coordinates match up. However, I'm not getting any good results...is there a better way to do this
This is my shape

This is the way the slice is supposed to look (but upside down)

This is what I'm getting. So my result is suposed to be a 64 by 64 double image. The reason my shape is to the left is because my coordinates also contain negative values. My shape is in the positive side.

This is what my code looks like to make the slice. X_pixels, Y_pixels etc are the coordinates I'm checking.

6 comentarios
Nnebunne Melisa
el 18 de Abr. de 2021
Matt J
el 18 de Abr. de 2021
How did you generate the first figure, with the two triangulated spheres? What original data was it derived from?
Nnebunne Melisa
el 18 de Abr. de 2021
Please post code in the form of text (in a code-well like the one below) rather than as an image. It makes it easier for us to copy/paste/run.
[X,Y,Z]=sphere;
X_axis=X*2
Nnebunne Melisa
el 19 de Abr. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


