Adjust view "distance" in 3D plot
5 ビュー (過去 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!