Azzera filtri
Azzera filtri

camera fly-through effect

2 visualizzazioni (ultimi 30 giorni)
Hs5555
Hs5555 il 12 Lug 2018
Hi, I would like to implement the fly-through effect as shown in this nice example: https://ch.mathworks.com/help/matlab/visualize/example-moving-the-camera-through-a-scene.html
I've attached 4 files with my data variables. First I created a figure from hm variable by using surf function: surf(hm); Then, I defined an animated line from x,y and z variables and displayed on the hm figure as follows:
curve = animatedline; curve.LineWidth = 6; curve.Color = [ 1 0 1];
for i=1:length(x) addpoints(curve, x(i), y(i), z(i)); drawnow; end
Then, I wanted to implement the fly-through effect so that the camera will move along the line. I tried this code piece I took from the example above and I slightly modified it:
for i=1:length(x) campos([(x(i) -5),(y(i)-5),0]) camtarget([x(i),y(i),z(i)]) drawnow end
But the camera doesnt move as I intended.
what am i doing wrong?

Risposte (0)

Categorie

Scopri di più su Animation in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by