File: animate.dem

package info (click to toggle)
gnuplot 5.4.1%2Bdfsg1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,316 kB
  • sloc: ansic: 85,877; cpp: 7,440; makefile: 2,548; javascript: 2,322; sh: 1,542; lisp: 667; perl: 304; pascal: 191; tcl: 88; python: 46
file content (33 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Demo animation, tumbling around 'glass.dat'.
#
# History:
#   - 1. 1. 2006 Dan Sebald:  Defined variables for more generic rotate
#   - ?. ?. ?    Hans-Bernhard Broeker:  Changed from rotating whale to
#                rotating glass
#   - ?. ?. ?    ?:  Initial tumbling whale demo

set parametric
set hidden3d
unset key
set style data line
xrot=60
xrot_delta = 17
zrot=0
zrot_delta = 10
xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi))
zview(zrot)=(60.+45.*sin(zrot/180.*pi))
set view xview(xrot),zview(zrot)
splot "glass.dat"

limit_iterations=40 # limits number of iterations if nonzero

if (!limit_iterations) print "The following animation will never stop on its own. You have"
if (!limit_iterations) print "to stop it manually by interrupting gnuplot (e.g., press ^C)"
print "On some screen terminal drivers for PC screens, you'll have"
print "to hit a key to get to the next frame"

pause -1 "Press a key to start the rotation..."

iteration_count=0
load "gnuplot.rot"
reset