File: animate2.dem

package info (click to toggle)
gnuplot 6.0.2%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,940 kB
  • sloc: ansic: 95,319; cpp: 7,590; makefile: 2,470; javascript: 2,328; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (59 lines) | stat: -rw-r--r-- 1,348 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# demo for creating GIF animation and illustrating saving images to
# file one pixel to one pixel
#
# A combination of what was animate.dem and world2.dem with the
# addition of saving the rotated image to an animated GIF.
# Requires GIF_ANIMATION
#
# History:
#   - 1. 3. 2006 Dan Sebald:  1st version
#    07 Jan 2006 Ethan Merritt:  Revise to assume terminal type is set by caller
#

# Caller must set terminal type.
# Example of intended use:
# set term gif animate transparent opt delay 10 size 200,200 background rgb 'black'

unset title
unset key
unset xtics
unset ytics
unset ztics
set border 0
set hidden3d nooffset
set parametric
set angles degrees
set samples 64,64
set isosamples 13,13
set mapping spherical
set dummy u,v
set urange [ -90.0000 : 90.0000 ] noreverse nowriteback
set vrange [ 0.00000 : 360.000 ] noreverse nowriteback
set style data line

# Defines for gnuplot.rot script
limit_iterations=72
xrot=60
xrot_delta = 0
zrot=136
zrot_delta = 355
xview(xrot)=xrot
zview(zrot)=zrot
set view xview(xrot), zview(zrot), 1.5, 1
set size square

splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \
      'world.dat' notitle with lines lt 2 lw 3

iteration_count=0
xrot =(xrot+xrot_delta)%360
zrot =(zrot+zrot_delta)%360

load "gnuplot.rot"

pause -1 "Hit return to continue"

reset

print "End of animate2 demo..."