1 # $Id: singulr.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $
3 # Demo that plots some surfaces with singularities.
4 # Author: Carsten Steger
6 # (x,y,x^2-y^2,2xy) is the graph of w=z^2 in 4-space.
7 # Therefore (x^2-y^2,2xy,x,y) is the graph of w=sqrt(z) in 4-space.
8 # Coordinates 1, 2, and 3 give the real part of either function,
9 # whereas coordinates 1, 2, and 4 give the imaginary part.
10 # The same holds for the cube function w=z^3. The graphs are given by
11 # (x,y,x^3-3xy^2,3x^2y-y^3) and (x^3-3xy^2,3x^2y-y^3,x,y).
24 set title "Real part of complex square root function"
25 splot u**2-v**2,2*u*v,u
26 pause -1 "Hit return to continue (1)"
30 set title "Real part of complex square root function (different view)"
32 pause -1 "Hit return to continue (2)"
38 set title "Imaginary part of complex square root function"
39 splot u**2-v**2,2*u*v,v
40 pause -1 "Hit return to continue (3)"
44 set title "Imaginary part of complex square root function (different view)"
46 pause -1 "Hit return to continue (4)"
52 set title "Real part of complex cube root function"
53 splot u**3-3*u*v**2,3*u**2*v-v**3,u
54 pause -1 "Hit return to continue (5)"
58 set title "Real part of complex cube root function (different view)"
60 pause -1 "Hit return to continue (6)"
66 set title "Imaginary part of complex cube root function"
67 splot u**3-3*u*v**2,3*u**2*v-v**3,v
68 pause -1 "Hit return to continue (7)"
72 set title "Imaginary part of complex cube root function (different view)"
74 pause -1 "Hit return to continue (8)"
81 set title "Real part of complex 4th root function"
82 splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,u
83 pause -1 "Hit return to continue (9)"
87 set title "Real part of complex 4th root function (different view)"
89 pause -1 "Hit return to continue (10)"
95 set title "Imaginary part of complex 4th root function"
96 splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,v
97 pause -1 "Hit return to continue (11)"
101 set title "Imaginary part of complex 4th root function (different view)"
103 pause -1 "Hit return to continue (12)"
110 set title "Enneper's surface"
111 splot u-u**3/3+u*v**2,v-v**3/3+v*u**2,u**2-v**2
112 pause -1 "Hit return to continue (13)"
116 set title "Enneper's surface (different view)"
118 pause -1 "Hit return to continue (14)"
123 set title "Moebius strip"
125 set vrange [-0.25:0.25]
126 splot (2-v*sin(u/2))*sin(u),(2-v*sin(u/2))*cos(u),v*cos(u/2)
127 pause -1 "Hit return to continue (15)"
131 set title "Moebius strip (view from opposite side)"
133 pause -1 "Hit return to continue (16)"
143 set title "Klein bottle"
144 splot (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*cos(v), \
145 (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*sin(v), \
146 2*sin(u)*sin(v/2)+sin(2*u)*cos(v/2)
147 pause -1 "Hit return to continue (17)"
151 set vrange [0:4*pi/3]
154 set title "Klein bottle with look at the 'inside'"
156 pause -1 "Hit return to continue (18)"
164 set view 50,15 #HBB: ,1,1.7
165 set title "Klein bottle, glassblowers' version (look-through)"
167 pause -1 "Hit return to continue (19)"
172 set title "Klein bottle, glassblowers' version (solid)"
174 pause -1 "Hit return to continue (20)"