|
Packit |
0986c0 |
# A generic rotation routine for the gnuplot view. In the commands
|
|
Packit |
0986c0 |
# that load this file, the following should be defined:
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# iteration_count: set iteration_count=0
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# limit_iterations: if set to a nonzero value, it'll stop after that
|
|
Packit |
0986c0 |
# many iterations; if zero value, continues indefinitely
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# xrot: the initial x rotation of the view
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# xrot_delta: the amount to increment the x rotation for each new plot
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# xview: function for generating x view value; for example
|
|
Packit |
0986c0 |
# xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi))
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# zrot: the initial z rotation of the view
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# zrot_delta: the amount to increment the z rotation for each new plot
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# zview: function for generating z view value; for example
|
|
Packit |
0986c0 |
# zview(zrot)=(60.+45.*sin(zrot/180.*pi))
|
|
Packit |
0986c0 |
#
|
|
Packit |
0986c0 |
# History:
|
|
Packit |
0986c0 |
# - 1. 1. 2006 Dan Sebald: Made more generic so other demos could use
|
|
Packit |
0986c0 |
# - ?. ?. ? Hans-Bernhard Broeker: Used to just turn round and round
|
|
Packit |
0986c0 |
# by somewhat large steps. Now, it tumbles back and forth
|
|
Packit |
0986c0 |
# smoothly.
|
|
Packit |
0986c0 |
# - ?. ?. ? ?: Initial recursive script
|
|
Packit |
0986c0 |
|
|
Packit |
0986c0 |
iteration_count=iteration_count+1
|
|
Packit |
0986c0 |
if ((!limit_iterations) || (iteration_count<=limit_iterations)) \
|
|
Packit |
0986c0 |
set view xview(xrot),zview(zrot); \
|
|
Packit |
0986c0 |
replot; \
|
|
Packit |
0986c0 |
zrot=(zrot+zrot_delta)%360; \
|
|
Packit |
0986c0 |
xrot=(xrot+xrot_delta)%360; \
|
|
Packit |
0986c0 |
reread
|