Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Compose scene around object using camlookat

1 回表示 (過去 30 日間)
Mehdi
Mehdi 2015 年 5 月 17 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hello folks,
I have created three spheres in a GUI (without GUIDE) which are located far from each other as you see below:
[x1, y1, z1] = sphere(100);
hu1 = surface(x1 + dx1, y1 + dy1, z1 + dz1, 'FaceColor', 'b', 'EdgeColor','none');
[x2, y2, z2] = sphere(100);
hu2 = surface(x2 + dx2, y2 + dy2, z2 + dz2, 'FaceColor', 'g', 'EdgeColor','none');
[x3, y3, z3] = sphere(100);
hu3 = surface(x3 + dx3, y3 + dy3, z3 + dz3, 'FaceColor', 'r', 'EdgeColor','none');
I want to move to camera to compose a scene around one object so I have used this code:
camproj ('perspective')
camlookat(hu1)
but it doesn't move the camera. What am I missing? Thank you very much in advance.

回答 (0 件)

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by