Skip to content
Prev 255848 / 398506 Next

Animation for pers3d

On 11-04-05 5:43 AM, Grigory Alexandrovich wrote:
Yes, you can do animations.  See example(persp3d) for one that changes 
the viewpoint.  If you want to change the content of the plot, save the 
result of persp3d() on the first call, e.g.

objs <- persp3d( ... )
surface <- objs["surface"]

then delete and re-plot the "surface" element:

rgl.pop(id=surface)
# compute new x y z
surface <- surface3d(x, y, z)

If the scale changes during the animation it's likely to look ugly, so 
set the limits in the persp3d call (or turn off the axes).

Duncan Murdoch