Clear Filters
Clear Filters

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

2 views (last 30 days)
SvB
SvB on 21 Jul 2023
Edited: SvB on 21 Jul 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!

Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!