"Calibrated" plotting of 3D shape at fixed pixel size

2 vues (au cours des 30 derniers jours)
SvB
SvB le 21 Juil 2023
Modifié(e) : SvB le 21 Juil 2023
I've loaded a 3D mesh (.obj file) in Matlab and am trying to plot it using the trimesh function in such a way that I know that 1 pixel equals a certain length unit (mm, cm, m, whatever). This way, I can visualize the shape, choose a certain viewing angle using view(AZ,EL) and determine a projected surface area for complex surfaces.
I've been poking around functions such as getpixelposition(gca) and the properties axes.Position and axes.Units as well as axis equal and axis vis3d. However I just can't seem to find the correct understanding: Once I take a screenshot of my figure, the axis dimensions I measure do not match the output of axes.Position, and changing the point of view (using view(azimuth,elevation)) also does not seem to affect axes.Position at all, even though the axes clearly change size.
1) Is there a better way to determine the projected frontal surface?
2) If no, any advice on making sure that if I plot something with certain settings, I can be certain that a single pixel will always correspond to a certain dimension?
Thank you!

Réponses (0)

Catégories

En savoir plus sur Specifying Target for Graphics Output dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by