Adjust view "distance" in 3D plot
조회 수: 11 (최근 30일)
이전 댓글 표시
I'm currently making an animation to represent an orbit's x, y, and z coordinates. It works nearly perfectly, and have no issues overall. Though I have one slight issue
I have it calculate optimal viewing angles for the object, which I store in an array and use during the animation to assign values to the view function. It does exactly as it's supposed to, changing the viewing angle perfectly according to the position in the orbit the animation is currently displaying. However, something that I'm less "happy" with is the viewing distance. As the orbit is eliptical and bounding box cubical, the viewing distance will move out as it approaches the edge of a box and back in as it moves towards the middle. It's not a big issue, but simply annoying when it's constantly fluctuating inwards and outwards. Is there any way that I could set a distance manually? I can do the calculations for said distance on my own, but I'd rather not have to manually change the dimensions of the box if I don't have to.
댓글 수: 1
AndresVar
2022년 2월 14일
Is it changing distance because the plot size is changing?
Set the axis limit in the loop so it doesn't change. Specify Axis Limits - MATLAB & Simulink (mathworks.com)
OR set the axis once then set it to manual so it doesn't change Set axis limits and aspect ratios - MATLAB axis (mathworks.com)
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Camera Views에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!