You are on page 1of 11

Notebook 10

N10.0
TIIs noLebook IncorporuLes u IIrsL seIecLIon oI surIuces. L InvesLIguLes puLcIes und
ussocIuLed normuI vecLors. L IncIudes deIInILIons oI puruboIoIds, IyperboIoIds, und LIe
eIIIpLIcuI LorI uIreudy dIscussed In N;.6.
Towurds LIe end oI LIe noLebook, In N1o.8, we sIuII need SLeve WIIkInson's puckuge
ImplicitPlot3D LIuL Is uvuIIubIe Irom IIs websILe. We Iuve pIuced u copy InsIde LIe
Graphics IoIder /AddOns/StandardPackages/Graphics of the Mathematica
directory, to ensure that it can be loaded as follows:
<<Graphics`ImplicitPlot3D`
As expIuIned In N6.o und Nq.o, use oI LIe commund S Is necessury Lo dIspIuy grupIIcs,
wIIcI ure oLIerwIse suppressed. TIIs ensures LIuL onIy LIe IInuI pIcLure uppeurs eucI
LIme u number oI dIsLIncL pIoLs ure combIned. Moreover, onIy LIe numbered IIgures
wIII be dIspIuyed wIen LIe enLIre noLebook Is evuIuuLed. As we sIuII poInL ouL uguIn In
N1o.1, LIe sLrIng S@ needs Lo be udded by Iund Lo see LIe oLIer pIoLs. TIe user wIo
preIers noL Lo do LIIs sIouId repIuce LIe IoIIowIng ceII by LIe commund "S:=Show" so
us Lo muke S u mere ubbrevIuLIon Ior Show, und LIen resLurL LIe noLebook.
$DisplayFunction= Identity;
Unprotect[S];
S[X__]:= Show[X, DisplayFunction->(Display[$Display,#1] &)]
Protect[S];
We use LIe IoIIowIng opLIons Ior ParametricPlot3D.
SetOptions[ParametricPlot3D,
BoxRatios->Automatic, Compiled->False, Axes->None,
Boxed->False
];
TIe deIInILIon oI LIe grudIenL wIII be used uguIn In N1o.;.
320
grad[f_, coor_]:= Table[D[f, coor[[i]]], {i, Length[coor]}]
TIe nexL subsecLIon conLuIns LIe deIInILIon oI LIe norm L und LIe communds tangent,
normal, binormal Ior LIe reneL Irume, IIrsL gIven In NoLebook ;.
N10.0.1
N10.1
TIe spIere, IIrsL deIIned In N8.q, Is un obvIous surIuce wILI wIIcI Lo begIn.
sphere[a_][u_, v_]:= a{Cos[v] Cos[u], Cos[v] Sin[u], Sin[v]}
UsIng LIIs puLcI, we pIoL LIe Imuge oI u recLungIe LIuL does noL cover LIe enLIre spIere:
Iiure :o.:
x:= sphere[1]
S @ ParametricPlot3D[x[u, v], {u,0,3/2}, {v,-/2, /2},
Boxed->True];
TIe IoIIowIng IIgures IIIusLruLe nonInjecLIve puLcIes:
Iiure :o.z
S @ ParametricPlot3D[{Cos[u], Sin[u], v}, {u,0,2}, {v,-1,1},
PlotPoints->{30,15}];
Iiure :o.
S @ ParametricPlot3D[{u^3, v^3, u v}, {u,-1,1}, {v,-1,1},
ViewPoint->{-2, -2.5, 1}];
TIe PlotPoints commund Is used Lo decIde Iow muny unILs Lo dIvIde LIe cIrcumIerence
und LIe IengLI oI LIe cyIInder InLo. TukIng smuIIer enLrIes wIII produce u box sIupe.
WIIIsL LIIs Is noL un uccuruLe represenLuLIon oI LIe cyIInder, LIIs devIce Is useIuI uL
LImes, us IL wouId Luke mucI Ionger Lo pIoL LIe Iour sIdes sepuruLeIy. Add S@ Lo LIe
IIrsL IIne Lo dIspIuy LIe pIoL.
NOTEBOOK 10 321
ParametricPlot3D[{Cos[u], Sin[u], v}, {u,0,2}, {v,-1,1},
PlotPoints->{5,5}];
TIe IoIIowIng mInIprogrum compuLes LIe JucobIun muLrIx oI u puLcI. L begIns by
deIInIng LIe purLIuI derIvuLIves LIuL consLILuLe LIe JucobIun's Lwo coIumns. On LIe
oLIer Iund, u muLrIx Is represenLed In Mcthemcticc by un ordered seL oI row vecLors,
so IL Is necessury Lo IInIsI wILI LIe commund Transpose:
jacobian[x_][u_, v_]:=
Module[{xu,xv,M},
xu= D[x[U, V], U];
xv= D[x[U, V], V];
M= Simplify[{xu,xv}] /. {U->u, V->v};
Transpose[M]
];
We dIspIuy LIe JucobIun muLrIx oI LIe sLundurd puLcI Lo LIe spIere. L cun be vIewed In
LIe more convenLIonuI wuy by usIng LIe MatrixForm commund uILerwurds.
x:= sphere[a]
jacobian[x][u, v]
%//MatrixForm
TIe JucobIun muLrIx Is noL squure, buL we cun munuIucLure u z by z muLrIx by muILIpIy-
Ing JM by ILs Lrunspose. Ls deLermInunL Is nonzero uL poInLs wIere LIe puLcI Is reguIur:
surfacejacobian[x_][u_,v_]:=
Module[{M},
M= jacobian[x][u,v];
Det[Transpose[M].M]//Simplify
];
TIe nexL surIuce wIII provIde u IuILIIuI compunIon Ior IuLure consLrucLIons.
monkeysaddle[u_,v_]:= {u, v, u^3-3u v^2}
jacobian[monkeysaddle][u,v]
surfacejacobian[monkeysaddle][u,v]
322 NOTEBOOK 10
N10.2
TIe IoIIowIng progrum consLrucLs LIe unIL normuI oI u puLcI.
unitnormal[x_][u_,v_]:=
Module[{U, V, xu, xv},
xu= D[x[U,V], U];
xv= D[x[U,V], V];
Nx= Cross[xu, xv] /. {U->u, V->v};
Simplify[Nx/L[Nx]]
]
TIe unIL normuI Lo u spIere Is proporLIonuI Lo LIe puLcI descrIbIng LIe spIere ILseII:
Clear[a]
x:= sphere[a]
unitnormal[x][u,v]//PowerExpand
x[u,v]
TIe commund unitnormal[x] Is ILseII u IuncLIon or puLcI wIose Imuge IIes on LIe unIL
spIere. TIe puLcIes obLuIned In LIIs wuy Iuve coordInuLe curves LIuL represenL LIe
normuI vecLor Lo LIe orIgInuI surIuce, und ure LIereIore very dIIIerenL Irom LIose oI LIe
ordInury spIerIcuI puLcI:
y:= unitnormal[monkeysaddle]
ParametricPlot3D[y[u,v], {u,-1,1},{v,-1,1}, ViewPoint->{1,3,-1}];
A Monge puLcI purumeLrIzes LIe grupI oI u IuncLIon h oI Lwo vurIubIes.
monge[h_][u_,v_]:={u, v, h[u,v]}
We compuLe ILs JucobIun muLrIx, und conIIrm LIuL LIe puLcI Is everywIere reguIur:
Clear[h]
mp[u_,v_]:= {u, v, h[u,v]}
jacobian[mp][u,v]
surfacejacobian[mp][u,v]
NOTEBOOK 10 323
TIe progrum ubove Ior LIe unIL normuI uIso enubIes us Lo exLrucL LIe normuI vecLor Nx
consIsLIng oI LIe cross producL oI LIe LungenL vecLors Lo LIe coordInuLe curves. TIe
norm-squured oI Nx coIncIdes wILI LIe ubove deLermInunL:
unitnormal[mp][u,v]
L[Nx]^2
N10.2.1
N10.3
TIe deIInILIon oI LIe nexL surIuce Is obLuIned Irom LIuL oI un eIgIL curve by uddIng LIe
second purumeLer us LIe LIIrd coordInuLe. A more compIIcuLed surIuce, bused on LIe
sume IuncLIons, cun be seen In Igure 1o.1z.
eightcylinder[u_,v_]:= {Sin[u], Sin[2u], v}
jacobian[eightcylinder][u,v]
unitnormal[eightcylinder][u,v]
Iiure :o.
S @ ParametricPlot3D[eightcylinder[u,v], {u,-/3, 5/4},
{v,-1,1}, PlotPoints->{40,10}, ViewPoint->{1,-1,3}];
TIe eusIesL wuy oI obLuInIng u second cIurL on LIe spIere Is Lo cIeuL und roLuLe LIe
IIrsL! To do LIIs, we muke use oI LIe oI LIe buIIL-In puckuge
<<Geometry`Rotations`
Iiure :o.
x:= sphere[1]
M:= RotationMatrix3D[0.6, 0.5, 0]
y[u_,v_]:= M . x[u, v]
pl[f_]:= ParametricPlot3D[f[u, v], {u,0,7/4}, {v,-/2,/2}];
S @ GraphicsArray[{pl[x], pl[y]}];
324 NOTEBOOK 10
N10.4
One cun cupLure boLI Lypes oI puruboIoId wILI LIe sIngIe deIInILIon
paraboloid[a_,b_][u_,v_]:= {u, v, a u^2 + b v^2}
TIe eIIIpLIc puruboIoId urIses wIen u und b ure boLI posILIve or boLI neguLIve. TIe
IyperboIIc puruboIoId occurs wIen u und b Iuve opposILe sIgns:
r:= 1.5
z[a_, b_]:= ParametricPlot3D[paraboloid[a,b][u,v], {u,-r,r},
{v,-r,r}];
GraphicsArray[{z[1,1], z[1,-1]}];
Here Is u sImpIe commund Ior conversIon Lo poIur coordInuLes:
polarize[f_][r_,_]:= f[r Cos[], r Sin[]]
Iiure :o.;
x:= paraboloid[1,1]
xx:= polarize[x]
z1:= ParametricPlot3D[x[u,v], {u,-r,r}, {v,-r,r}];
z2:= ParametricPlot3D[xx[r,], {r,0,2.7}, {,0,2}];
S @ GraphicsArray[{z1,z2}];
TIe monkey suddIe wus purumeLrIzed In N1o.1.
Iiure :o.8
r:= 1.3
S @ ParametricPlot3D[monkeysaddle[u,v], {u,-r,r},
{v,-r,r}, ViewPoint->{3,-4,8}, AspectRatio->.8, Boxed->True];
f[n_,u_,v_]:= Re[(u + I v)^n]//ComplexExpand
f[3,u,v]
f[5,u,v]
NOTEBOOK 10 325
Iiure :o.p
r:= 1
z1:= Plot3D[f[5,u,v], {u,-r,r}, {v,-r,r}, Axes->False];
z2:= ContourPlot[f[5,u,v], {u,-r,r}, {v,-r,r}, Frame->False];
S @ GraphicsArray[{z1, z2}];
ParametricPlot3D[{u, v, f[5,u,v]}, {u,-r,r}, {v,-r,r},
AspectRatio->1, Boxed->True];
TIe IoIIowIng deIInILIon wus IIrsL gIven In NoLebook ;:
torus[a_,b_,c_][u_,v_]:=
{(a + b Cos[v])Cos[u], (a + b Cos[v])Sin[u], c Sin[v]}
ParametricPlot3D[torus[8,3,7][u,v], {u,0,}, {v,0,2},
PlotPoints->{24,48}];
N10.4.1
N10.5
TIe IoIIowIng consLrucLIon Lo combIne LIe pIoL oI u curved surIuce und pIune Is LIe
busIs Ior Igure 1o.1q. To dIspIuy LIe pIoL, udd S@ uL LIe sLurL oI LIe IIrsL IIne, or
repIuce Show by S In LIe penuILImuLe IIne.
Module[{f,g,r,z},
f[u_,v_]= {u, v, u v};
g[u_,v_]= {u, v, 0};
r= 1.5;
z[x_]:= ParametricPlot3D[x[u, v], {u, -r, r}, {v, -r, r}];
Show[z[f], z[g], PlotRange->All]
]
N10.5.1
326 NOTEBOOK 10
N10.6
TIe nexL deIInILIon Is sImIIur Lo LIe IuncLIon torus:
ellipsoid[a_,b_,c_][u_,v_]:=
{a Cos[v]Cos[u], b Cos[v]Sin[u], c Sin[v]}
CIungIng LIe AmbientLight option gives a warmer coloring:
Iiure :o.:
p[a_,b_,c_]:=
ParametricPlot3D[ellipsoid[a,b,c][u, v], {u, 0, 9/5},
{v,-/2, /2}, AmbientLight->GrayLevel[.2]];
S @ GraphicsArray[{p[1,1,1.5], p[1,4,3]}];
Clear[a,b,c]
ell:= ellipsoid[a,b,c]
jacobian[ell][u,v]
surfacejacobian[ell][u,v]
stereographicellipsoid[a_,b_,c_][u_,v_]:=
{(2 a u)/(u^2 + v^2 + 1), (2 b v)/(u^2 + v^2 + 1),
(c (u^2 + v^2 - 1))/(u^2 + v^2 + 1)}
Iiure :o.:
x:= stereographicellipsoid[5,4,3]
S @ ParametricPlot3D[x[u,v], {u,-2.8,2.8}, {v,-2.8, 2.8},
ViewPoint->{1,-2,4}, PlotPoints->20];
Here ure more purumeLrIzuLIons oI sLundurd quudrIcs:
hyperboloid1[a_,b_,c_][u_,v_]:=
{a Cosh[v] Cos[u], b Cosh[v] Sin[u], c Sinh[v]}
hyperboloid2[a_,b_,c_][u_,v_]:=
{a Sinh[v] Cos[u], b Sinh[v] Sin[u], c Cosh[v]}
NOTEBOOK 10 327
ellipticalcone[a_,b_,c_][u_, v_]:= {a v Cos[u], b v Sin[u], c v}
TIey ure sIown LogeLIer usIng un Array oI pIoLs.
Iiure :o.:;
a = 1.3; b = 1.65; c = 2;
h[1]:= hyperboloid2[a, a, a]
h[2]:= hyperboloid2[a, a, -a]
h[3]:= hyperboloid1[b, b, b]
h[4]:= ellipticalcone[c, c, c]
z[i_]:= ParametricPlot3D[h[i][u, v], {u,1.8,7.6}, {v,-1,1},
ViewPoint->{0,3,1}]
S @ Array[z,4];
An uILernuLIve purumeLrIzuLIon oI LIe IyperboIoId oI one sIeeL wIII sIow ILs sLruIgIL-
IIne ruIIngs. TIIs wIII be dIscussed In N1q.1.
ellipticalhyperboloidplus[a_,b_,c_][u_,v_]:=
{a Cos[u] - a v Sin[u], b v Cos[u] + b Sin[u], c v}
h[1]:= hyperboloid1[1,2,1]
h[2]:= ellipticalhyperboloidplus[1,2,1]
z[i_]:= ParametricPlot3D[h[i][u, v], {u, 0, 2}, {v,-1,1}]
GraphicsArray[{z[1], z[2]}];
Clear[x]
g[n_][x_, y_, z_]:= x^n + y^n + z^n
grad[g[n][x, y, z], {x, y, z}]
Here, we use LIe ImplicitPlot3D progrum Lo upproxImuLe cubes:
Iiure :o.:8
S @ ImplicitPlot3D[g[6][x, y, z] == 1, {x,-2,2}, {y,-2,2}, {z,-2,2},
PlotPoints->30, AmbientLight->GrayLevel[0.5],
LightSources->{{{2,0,0}, Hue[0]}, {{0,2,0}, Hue[.4]},
{{0,0,2}, Hue[.7]}}];
328 NOTEBOOK 10
ImplicitPlot3D[g[5][x,y,z]1, {x,0,2}, {y,0,2}, {z,0,2},
ViewPoint->{2,2,2}];
N10.7
TIe ImplicitPlot3D progrum used nexL wus Iouded uL LIe sLurL oI N1o.o.
Iiure :o.:p
Module[{f, r, z},
r= 5;
f= x^2 y^2 + y^2 z^2 + z^2 x^2;
z[r_]:= ImplicitPlot3D[f == 1, {x,-r,r}, {y,-r,r}, {z,-r,r},
Boxed->False];
S @ z[1.3]
];
TIe sIne surIuce wIII be unImuLed usIng quuLernIons In NoLebook z.
sinsurface[u_,v_]:={Sin[u], Sin[v], Sin[u+v]}
ParametricPlot3D[sinsurface[u,v],{u,0,2},{v,0,2}, Axes->None,
PlotPoints->{28,42}];
sinsurfaceimplicit[a_][x_,y_,z_]:=
4x^2 y^2(a^2-z^2) - a^2(x^2+y^2-z^2)^2
helix[a_,b_][t_]:={a Cos[t], a Sin[t], b t}
ContourPlot3D Is u buIIL-In ImpIIcIL pIoLLIng commund LIuL IIrsL dIvIdes LIe druwIng
In smuII cubes.
<<Graphics`ContourPlot3D`
NOTEBOOK 10 329
Here we use IL Lo dIspIuy Kummer's surIuce, wIIcI Is u quurLIc wILI 16 doubIe poInLs.
UnIIke LIe nonpurumeLrIc deIInILIons oI curves gIven In NoLebook , LIe ImpIIcIL
equuLIons In LIIs secLIon ure polnomicls ruLIer LIun equctions.
kummer[x_,y_,z_]:= kummer[x,y,z]=
x^4+y^4+z^4 - x^2 - y^2 z^2 - y^2 - z^2 x^2 - z^2 -
x^2 y^2 + 1
Iiure :o.zo
Clear[x,y,z]
r:= 1.5
S @ ContourPlot3D[kummer[x,y,z], {x,-r,r}, {y,-r, r}, {z, -r, r},
ViewPoint->{2,-4,1}, PlotPoints->{7,7}];
%//Timing
or CuyIey's surIuce, IL Is uguIn dIIIIcuIL Lo render LIe conIcuI poInLs; LIe commund
ContourPlot3D Lends Lo Ignore LIem.
TIe nexL deIInILIon uses normal und binormal deIIned In N;.z und N1o.o.1.
seashell[_,r_][t_, _]:=
[t] + r t (-(Cos[] normal[][t]) + Sin[] binormal[][t])
Iiure :o.z:
Module[{x},
x= seashell[helix[1,.6], .1];
z[v_]= ParametricPlot3D[x[t,]//Evaluate, {t,/4,5}, {,0,2},
Boxed->False, Axes->None, PlotPoints->50, ViewPoint->v];
S@GraphicsArray[{z[{0,-2,0}], z[{0,0,2}]}, GraphicsSpacing->.4];
]
goursat[a_,b_,c_][x_,y_,z_]:=
x^4+y^4+z^4 + a(x^2+y^2+z^2)^2 + b(x^2+y^2+z^2) + c
r:= 1
ImplicitPlot3D[goursat[-1/5,0,-1][x,y,z]==0, {x,-r,r}, {y,-r,r},
{z,-r,r}];
330 NOTEBOOK 10

You might also like