Initial release of Maemo 5 port of gnuplot
[gnuplot] / demo / animate2.dem
1 #
2 # $Id: animate2.dem,v 1.1 2006/01/07 23:21:02 sfeam Exp $
3 #
4 # demo for creating GIF animation and illustrating saving images to
5 # file one pixel to one pixel
6 #
7 # A combination of what was animate.dem and world2.dem with the
8 # addition of saving the rotated image to an animated GIF.
9 # Requires GIF_ANIMATION
10 #
11 # History:
12 #   - 1. 3. 2006 Dan Sebald:  1st version
13 #    07 Jan 2006 Ethan Merritt:  Revise to assume terminal type is set by caller
14 #
15
16 # Caller must set terminal type.
17 # Example of intended use:
18 # set term gif animate transparent opt delay 10 size 200,200 x000000
19
20 unset title
21 unset key
22 unset xtics
23 unset ytics
24 unset ztics
25 set border 0
26 set hidden3d nooffset
27 set parametric
28 set angles degrees
29 set samples 64,64
30 set isosamples 13,13
31 set mapping spherical
32 set dummy u,v
33 set urange [ -90.0000 : 90.0000 ] noreverse nowriteback
34 set vrange [ 0.00000 : 360.000 ] noreverse nowriteback
35 set style data line
36
37 # Defines for gnuplot.rot script
38 limit_iterations=72
39 xrot=60
40 xrot_delta = 0
41 zrot=136
42 zrot_delta = 355
43 xview(xrot)=xrot
44 zview(zrot)=zrot
45 set view xview(xrot), zview(zrot), 2, 1
46 set size square
47
48 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \
49       'world.dat' notitle with lines lt 2 lw 3
50
51 iteration_count=0
52 xrot =(xrot+xrot_delta)%360
53 zrot =(zrot+zrot_delta)%360
54
55 load "gnuplot.rot"
56
57 pause -1 "Hit return to continue"
58
59 reset
60
61 print "End of animate2 demo..."