Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

Compose scene around object using camlookat

1 Ansicht (letzte 30 Tage)
Mehdi
Mehdi am 17 Mai 2015
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
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.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by