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