6.2	Drawing Three-Dimensional Objects

2015-04-21

$Version

1. Curves in space may be drawn in perspective. (ParametricPlot3D,ListPointPlot3D).

2. 2-dimensional surfaces extending through 3-dimensional space may be represented in several ways.

2.1	They may be drawn in perspective.   (ParametricPlot3D, Plot3D, 		
								  ListSurfacePlot3D)
2.2 	Lines of equal height may be projected on a plane (ContourPlot).
3.2 	The height of each point above a plane upon which the  surface is projected is indicated by a 		
	 corresponding shade  of gray (or of colour)   (DensityPlot).

6.2.1	Plotting Curves in Parametric Representation in 3-Dimensional Space

The general form of the statement is:

ParametricPlot3D[ {x[t],y[t],z[t]}, {t, tmin, tmax},options ]

The options are discussed in  § 6.2.6.

?ParametricPlot3D

x=7 Cos[t];y=7 Sin[t];z=t;
p1=ParametricPlot3D[{x,y,z},{t,0,7 π}];p2=Show[p1,Boxed->False];p3=ParametricPlot3D[{x,y,z},{t,0,7 π}, PlotStyle -> {Red, Thickness[0.03`]}];Show[GraphicsRow[{p1,p2,p3}],ImageSize->450]

6.2.2	Plotting Curves Given in 3-Dimensional Space by Points: ListPointPlot3D[]

Curves may be given by lists of points. They may be drawn by the comand

ListPointPlot3D[list]

?ListPointPlot3D

lt=Table[t {Sin[t],Cos[t],-1},{t,0,13.3`,0.1`}];
p1=ListPointPlot3D[lt];
p2=ListPointPlot3D[lt,PlotStyle->RGBColor[0.9`,0,0]];
Show[GraphicsRow[{p1,p2}],ImageSize->350]

6.2.3 	Plotting Surfaces in 3-dimensional Space in Perspective: ParametricPlot3D[], Plot3D[]

Surfaces may be represented in various mathematical forms:
1.   The coordinates are given as functions of two parameters:

x = x[u,v], y = y[u,v],  z = z[u,v].

The form of the corresponding statement is:

ParametricPlot3D[ {x[u,v],y[u,v],z[u,v]},         
          {u, umin, umax}, {v, vmin, vmax}, Options ]

a=3+Cos[u];x=a Cos[v];y=a Sin[v];z=Sin[u];p1=ParametricPlot3D[{x,y,z},{u,0,2 π},{v,0,2 π}];

2.  The third coordinate is given as a function of the two other coordinates:   
     			     				z = f[x,y]
The general form of the corresponding statement is:

Plot3D[ f[x,y], {x, xmin, xmax}, {y, ymin, ymax}, Options]

Clear[x,y,f];	f = x^2 - y^2;  
p2 = Plot3D[ f, {x, -3, 3}, {y, -2, 2} ];

Show[GraphicsRow[{p1,p2}],ImageSize->500]

p1=Plot3D[Abs[Exp[(I/(x+I y))]],{x,-π,π},{y,-π,π}, PlotLabel -> "Essential Singularity"];
p2=Plot3D[Abs[(I/(x+I y))],{x,-π,π},{y,-π,π},PlotLabel -> "First Order Pole"];
Show[GraphicsRow[{p1,p2}],ImageSize->450]

The preceeding plots show the relief (= the surface of the absolute value of the function) of an essential singularitly and of a pole.

6.2.3.1   Plotting a surface from points: ListSurfacePlot3D[]

?ListSurfacePlot3D

p1 = ListSurfacePlot3D[Flatten[Table[{Cos[ϕ] Sin[θ],Sin[θ] Sin[ϕ],Cos[θ]},{ϕ,-π,π,.2},{θ,0,π,.2}],1]];
p2 = ListSurfacePlot3D[Flatten[Table[{x, y, Sin[x y]},{x,0,3,0.1},{y,0,3,0.1}],1]] ;
p3 = Plot3D[Sin[x y],{x,0,3},{y,0,3}];
GraphicsRow[{p1,p2,p3}, ImageSize -> 500]

Figure p2 (the middle figure)  above shows that ListSurfacePlot3D[] may yield unsatisfactory images as compared to the output of Plot3D[]. Try this again for a step width of 0.05 !

6.2.4	Contour Plots: Plotting Contour Lines of Surfaces: ContourPlot[]

ContourPlot[  f[x,y], {x, xmin, xmax}, {y, ymin, ymax} ]

The comand produces contour lines as in a (geographical) map of the surface  z = f(x,y) . The shade of the area between two curves on the map is the lighter the higher the level of the corresponsing slice of the surface.

?ContourPlot

p1=ContourPlot[Abs[Exp[(I/(x+I y))]],{x,-π,π},{y,-π,π}, PlotLabel -> "Essential Sinularity"];
p2=ContourPlot[Abs[(I/(x+I y))],{x,-π,π},{y,-π,π},PlotLabel -> "First Order Pole"];
Show[GraphicsRow[{p1,p2}],ImageSize->450]

6.2.5	Density Plots:  Expressing the Level as Gray Density  or  Color: DensityPlot[]

DensityPlot[  f[x,y], {x, xmin, xmax}, {y, ymin, ymax} ]

The shade of a pixel is related to the level of the corresponding surface element above it. The shade is the lighter the higher the level.

?DensityPlot

p1=DensityPlot[Abs[Exp[(I/(x+I y))]],{x,-π,π},{y,-π,π}, PlotLabel -> "Essential Sinularity"];
p2=DensityPlot[Abs[(I/(x+I y))],{x,-π,π},{y,-π,π},PlotLabel -> "First Order Pole"];
Show[GraphicsRow[{p1,p2}],ImageSize->450]

6.2.6	Comparing Diagrams

6.2.6.1  Integral Representations of Bessel Functions. The Method of Steepest Descent

Integral representations of different Bessel functions. The integrand is always the same. 
Different integration paths lead to different functions.

Zn(r)  =  
(1/2πi) ∫Wi eir Cos(w) ein (w - π/2) dw

W0  : Jn(r) 	 	Bessel function of the first kind

	W1,2: Hn(1,2)(r)	Hankel function of the 1 st, 2 nd kind.

A. Sommerfeld: Partielle Differentialgleichungen der Physik.
Akademische Verlagsgesellschaft, Leipzig 1958. § 19, Fig.18.

Order n = 0, r = real:  Integrand = eir cos(z), z = x + I y.

Clear[f,r,x,y,z]
f[x_, y_, r_]  =  Abs[Exp[ I r Cos[x + I y] ]  ];  
s1 = Plot3D[ f[x,y,1], {x, 0, 4Pi}, {y, -2, 2}];
c1 = ContourPlot[ f[x,y,1], {x, 0, 4Pi}, {y, -2, 2}]  ;
Show[GraphicsRow[{s1,c1}],ImageSize->500]

d1 = DensityPlot[ f[x,y,1], {x, 0, 4Pi}, {y, -2, 2}]

s2=Plot3D[f[x,y,1],{x,0,2 π},{y,-1,1}];
c2=ContourPlot[f[x,y,1],{x,0,2 π},{y,-1,1}];
Show[GraphicsRow[{s2,c2}],ImageSize->500]

The working of the method of steepest descent (Sattelpunktsmethode) applied to the integrals above for large argument   r   can be understood in looking at the surfaces representing the modulus of the integrand.

s20=Plot3D[f[x,y,20],{x,0,2 π},{y,-1,1}];
s21=ContourPlot[f[x,y,1],{x,0,2 π},{y,-1,1},PlotRange->{0,2}];
Show[GraphicsRow[{s20,s21}],ImageSize->500]

s22=Show[s20,PlotRange->{0,1.5},ViewPoint->{-1.,-2.4,1.}];
s23=Show[s21,AspectRatio->1];
Show[GraphicsRow[{s22,s23}],ImageSize->450]

6.2.6.2  Comparison between Plot3D[]  and ParametricPlot3D[]

pp=Plot3D[Sin[x y],{x,1,2},{y,1,2}, PlotPoints -> 5]

FullForm[pp]

pa=ParametricPlot3D[{x,y,Sin[x y]},{x,1,2},{y,1,2},PlotPoints->4,BoxRatios->{1,1,0.4`}]

FullForm[pa]

6.2.7	RegionPlot3D

??RegionPlot3D

p1 = RegionPlot3D[x^2+y^2+z^2≤3,{x,-2,2},{y,-2,2},{z,-2,2}];

p2 = RegionPlot3D[x^2+y^2+z^2≤3,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None];

Show[GraphicsRow[{p1,p2}], ImageSize ->  490]

p1 = RegionPlot3D[1≤x^2+y^2+z^2≤3&&y≥0,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None,PlotPoints->50, PlotLabel -> "Half of a spherical shell\n"];

p2 = RegionPlot3D[x^2+y^2+z^2≤3&&y≥0&&y≥x+z,{x,-2,2},{y,-2,2},{z,-2,2},Mesh->None,PlotPoints->50,PlotLabel -> "Spherical wedge\n"];

Show[GraphicsRow[{p1,p2}], ImageSize ->  490]

6.2.8   Options for  Perspectivic Plots

curve = {x[t], y[t], z[t]};
		ParametricPlot3D[ curve, {t, tmin, tmax} ]
		surfa = {x[u,v], y[u,v], z[u,v]};
		ParametricPlot3D[ surfa, {u, umin, umax}, {v, vmin, vmax} ]
		z = z[x,y];
		Plot3D[ z, {x, xmin, xmax}, {y, ymin, ymax} ]

??Plot3D

?ParametricPlot3D

The options of ParametricPlot3D are nearly the same as those of Plot3D

Clear[x,y,z] 
z=Sin[x y];
pp=Plot3D[z,{x,0,3},{y,0,3}]

?AspectRatio

See also BoxRatios .

p1=Show[pp,AspectRatio->Automatic];
p2=Show[pp,AspectRatio->1.3`];

?Axes

p3=Show[pp,Axes->None]; Show[GraphicsRow[{p1,p2,p3}],ImageSize->500]

?AxesEdge

AxesEdge -> {{diry,dirz}, {dirx,dirz}, {dirx,diry}}
	dirk = + 1 or - 1.

Any pair may be replaced with Automatic or None. The entire list may be replaced with a single Automatic  or a single None.

p1=Show[pp,AxesEdge->None];
p2=Show[pp,AxesEdge->{{1,1},{1,-1},{1,1}}];Show[GraphicsRow[{p1,p2}],ImageSize->450]

?AxesLabel

z = "Sin(x, y)  ";
p1=Show[pp,AxesLabel->{"x","y","z   "}];
p2=Show[pp,AxesLabel->{x,y,z}]; Show[GraphicsRow[{p1,p2}],ImageSize->450]

?AxesOrigin

See same option in 2D case,  6.1.9 .

?AxesStyle

AxesStyle -> style	All axes are rendered according to same style directive.
AxesStyle -> {{xstyle}, {ystyle}, {zstyle}}

Style directives: 	Dashing[], Thickness[], AbsoluteThickness[]; see § 6.5.2.
			Hue; RGBColor, CMYKColor;   see § 6.5.3.

Show[pp,AxesStyle->{{Thickness[0.01`]},{Thickness[0.015`],Green},{Thickness[0.02`],Red}},
AxesLabel -> {"x","y","z"}]

?Background

Style directives:     GrayLevel[], Hue[]; RGBColor[], CMYKColor[].

p1=Show[pp,Background->GrayLevel[0.9`]];
p2=Show[pp,Background->RGBColor[0,1,0]];
Show[GraphicsRow[{p1,p2}],ImageSize->350]

??BaselinePosition

{x,Graphics3D[Sphere[],BaselinePosition->Center,BaselinePosition->Center,ImageSize->70],y}

Confer the same command, BaselinePosition,   in the 2D-case in  6.1.9.

?BaseStyle

p1 = Graphics3D[{Sphere[],Cylinder[{{3,0,-1},{3,0,1}}]}, Axes -> True];
p2 = Graphics3D[{Sphere[],Cylinder[{{3,0,-1},{3,0,1}}]},Axes -> True,BaseStyle-> Orange];
Show[GraphicsRow[{p1,p2}],ImageSize->350]

?Boxed

p1=Show[pp,Boxed->False];
p2=Show[pp,Axes->None,Boxed->False];
Show[GraphicsRow[{p1,p2}],ImageSize->400]

?BoxRatios

Show[pp,BoxRatios->{1,1.5,0.6`}]

curve={Cos[t],Sin[t],t};p1=ParametricPlot3D[Evaluate[curve],{t,0,6 π},ImageSize->100];
p2=Show[p1,BoxRatios->{1,1,3}, ImageSize ->   200];
Show[GraphicsRow[{p1,p2}],ImageSize->400]

?BoxStyle

Examples of settings are: 	Dashing[], Thickness[]; GrayLevel[], Hue[];
					 RGBColor[], CMYKColor	[].

plc=Show[pp,BoxStyle->{Thickness[0.02`],RGBColor[1,0,0]}]

?ClippingStyle

For  Plot3D[] only !       Possible Settings are:
	Automatic:		Show clipped area like the rest of the surface.
	None:				Make holes where the surface would be clipped.
	Color:			Show clipped areas with a particular color.
	{bottom, top}:  	Use different specifications for bottom, top clipped areas.

mm=((0.8`)^2);m1=1-mm;
cna=Abs[JacobiCN[x+I y,mm]];
per=EllipticK[mm];pep=EllipticK[m1];
plcn=Plot3D[cna,{x,-per,3 per},{y,0,3 pep}]
p2 =Plot3D[cna,{x,-per,3 per},{y,0,3 pep},ClippingStyle -> None]
p3 =Plot3D[cna,{x,-per,3 per},{y,0,3 pep},ClippingStyle -> Red]

?ColorFunctionScaling

?ColorFunction

The option must specify a GrayLevel[], Hue[], RGBColor[] or CMYKColor[]  directive.
Note, however, the option specifying a curve drawn by     ParametricPlot3D[]  must be included as the fourth argument of the first list (cf. § 6.2.1).

ColorFunction -> Automatic: 	yields a range of gray levels or colors.
ColorFunction -> Hue:			yields another range of colors.

p1=Plot3D[cna,{x,-per,3 per},{y,0,3 pep},ColorFunction->Hue];
p2=Plot3D[1-((x^2)+(y^2)),{x,-1,1},{y,-1,1},ColorFunction->(GrayLevel[((#1)^3)]&)];p3=Plot3D[ Exp[-((x^2)+(y^2))],{x,-1,1},{y,-1,1},ColorFunction->(Hue[((#1)^(3/2))]&)];Show[GraphicsRow[{p1,p2,p3}],ImageSize->500]

p1 =Plot3D[Exp[-((x^2)+(y^2))],{x,-1,1},{y,-1,1}, ColorFunction-> Hue];
p2 =Plot3D[Exp[-((x^2)+(y^2))],{x,-1,1},{y,-1,1},ColorFunction->"Rainbow"];
p3 = Plot3D[Sin[x y],{x,0,3},{y,0,3},ColorFunction->Function[{x,y,z},Hue[z]]];
Show[GraphicsRow[{p1,p2,p3}],ImageSize->500]

?ColorOutput

Superseded by ColorFunction

?Epilog

See   6.1.11.2

?FaceGrids

None					No grid lines drawn.
	All					Grid lines drawn on all faces.
          {face1,face2,...}		Grid lines drawn on faces listed
            facei = {dirx,diry,dirz} 	specifies the face where two   diri must be 0; while the third one 
            						must be either  -1 or 1. (As direction cosines)

pp=Plot3D[Sin[x y],{x,0,3},{y,0,3}];
p1=Show[pp,FaceGrids->All];
p2=Show[pp,FaceGrids->{{0,0,1},{0,-1,0}}];
Show[GraphicsRow[{p1,p2}], ImageSize -> 400]

??FaceGridsStyle

p1 =Graphics3D[Cylinder[],FaceGrids->All,FaceGridsStyle->Directive[Orange,Dashed]];
p2 = ParametricPlot3D[{v Cos[u],v Sin[u],v^3},{u,0,2Pi},{v,-1,1},Mesh->None,FaceGrids->{{0,-1,0}},AxesLabel -> {"x","y","z"},FaceGridsStyle->Directive[Gray,Dotted]];
Show[GraphicsRow[{p1,p2}], ImageSize -> 400]

??Filling                 (* Plot3D  only  *)

??FillingStyle           (* Plot3D  only  *)

p1 = Plot3D[Sin[x+y^2],{x,-2,2},{y,-2,2},RegionFunction->(1<#1^2+#2^2<4&),Filling->Bottom,FillingStyle->Opacity[0.3],Mesh->None];
p2 =Plot3D[Sin[x+y^2],{x,-2,2},{y,-2,2},RegionFunction->(1<#1^2+#2^2<4&),Filling->Bottom,FillingStyle->Opacity[0.7]];
Show[GraphicsRow[{p1,p2}], ImageSize -> 500]

The surface may be rendered transparent by the option  PlotStyle -> FaceForm[] for both Plot3D and 
ParametricPlot3D .

p1 = Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotStyle->FaceForm[],ViewPoint->{-2.281`,-1.373`,0.5`}];
p2 = Plot3D[Sin[x y],{x,0,3},{y,0,3},ViewPoint->{-2.281`,-1.373`,0.5`}];
Show[GraphicsRow[{p1,p2}],ImageSize->500]

p1 = ParametricPlot3D[{Sin[t] Sin[p],Sin[t] Cos[p],Cos[t]},{t,0,π},{p,0,2 π},
PlotStyle -> FaceForm[]];
p2 = ParametricPlot3D[{Sin[t] Sin[p],Sin[t] Cos[p],Cos[t]},{t,0,π},{p,0,2 π}];
Show[GraphicsRow[{p1,p2}],ImageSize->500]

?Lighting

This is a rather complex command. Here only a simple example is shown.

Table[Graphics3D[{White,Sphere[]},ImageSize -> 150,Lighting->{{"Directional",c,{{0,0,1},{0,0,0}}}}],{c,{Red,Orange,Blue}}]

Oben wird die Richtung der Lichtstraheln angegeben; unten die Position eines farbigen Scheinwerfers.

Graphics3D[{Specularity[White,50],Lighting->{{"Point",Red,{0,0,5}}},Sphere[],Lighting->{{"Point",White,{3,0,5}}},Sphere[{3,0,0}],Lighting->{{"Point",Blue,{0,3,5}}},Sphere[{0,3,0}],Lighting->{{"Point",Yellow,{3,3,5}}},Sphere[{3,3,0}]}]

?Mesh

Mesh -> True :		A mesh is drawn (default value).
Mesh -> False:		No mesh.

p1 = Plot3D[Sin[x y],{x,0,3},{y,0,3},Mesh->False];
p2 = Plot3D[Sin[x y],{x,0,3},{y,0,3},Mesh->True];
Show[GraphicsRow[{p1,p2}], ImageSize -> 400]

?MeshStyle

Graphics directives include:   Dashing[], Thickness[]; 
	GrayLevel[], Hue[]; RGBColor[], CMYKColor[].

p1=Plot3D[Sin[x y],{x,0,3},{y,0,3},MeshStyle->Thickness[0.01`]];p2=Plot3D[Sin[x y],{x,0,3},{y,0,3},MeshStyle->{{Dashing[{0.02`}],Red}}];Show[GraphicsRow[{p1,p2},Spacings->{Scaled[0.3`],Scaled[0]}],ImageSize->400]

p1=Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotStyle->FaceForm[],MeshStyle->Hue[0.2`]];p2=Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotStyle->FaceForm[],MeshStyle->Hue[0.7`]];Show[GraphicsRow[{p1,p2}]]

?PlotLabel

?PlotPoints

With more than one variable, PlotPoints -> n specifies that n initial points should be used in each direction.

With a single variable, PlotPoints -> n specifies the total number of initial sample points to use.

PlotPoints->{(Subscript[n, 1]),(Subscript[n, 2]),…} specifies different numbers of initial sample points for each successive direction.

The initial sample points are usually equally spaced.

Adaptive procedures controlled by MaxRecursion[] are used to choose more sample points.

z = Sin[x y];
p1=Plot3D[z,{x,0,3},{y,0,3},PlotPoints->5];p2=Plot3D[z,{x,0,3},{y,0,3},PlotPoints->{5,10}];Show[GraphicsRow[{p1,p2}]]

a=3+Cos[u];x=a Cos[v];y=a Sin[v];z=Sin[u];p1=ParametricPlot3D[{x,y,z},{u,π,2 π},{v,0,2 π}];a=3+Cos[u];x=a Cos[v];y=a Sin[v];z=Sin[u];p2=ParametricPlot3D[{x,y,z},{u,π,2 π},{v,0,2 π},PlotPoints->{7,10}];Show[GraphicsRow[{p1,p2}], ImageSize ->    400]

?PlotRange

p1=Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotRange->{-0.5`,0.5`}];p2=Plot3D[Sin[x y],{x,0,3},{y,0,3},PlotRange->{{1,2},{1,2},{-0.5`,1.5`}}];Show[GraphicsRow[{p1,p2}], ImageSize ->  450]

?PlotRegion

For Plot3D only !

Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, PlotRegion -> {{.1,.9}, {.3,.8}}]

Clicking at the picture shows your the frame sourring the area reserved for the image and the image compressed.

?PlotStyle

See explanations in  § 6.1.11.2

?Prolog

See explanations in  § 6.1.11.2

?SphericalRegion

SphericalRegion -> False (default value)
 scales 3-dimensional images to be as large as possible within the given display area.

SphericalRegion -> True
scales 3-dimensional images so that a sphere drawn around the 3-dimensional bounding box always fits into the display area specified.  So the image of the object remains consistent in size, regardless of the orientation of the object.

pld=Show[pp,BoxRatios->{1,5,1}];ple=Show[pld,ViewPoint->{7,1,2}];Show[GraphicsRow[{pld,ple}], ImageSize ->  450]

p1=Show[pld,SphericalRegion->True];p2=Show[ple,SphericalRegion->True];Show[GraphicsRow[{p1,p2}], ImageSize ->  450]

?Ticks

see  6.1.11.2

?TicksStyle

see  6.1.11.2

?ViewCenter

With the default setting ViewCenter->Automatic, the whole bounding box is centered in the final image.

ViewCenter->Automatic is equivalent to ViewCenter->{1/2,1/2,1/2}, which places the center of the three-dimensional bounding box at the center of the final image.

The setting for ViewCenter is given in scaled coordinates, which run from 0 to 1 across each dimension of the bounding box.

ViewCenter->{{x,y,z},{px,py}} makes the 3D point with scaled coordinates (x,y,z) appear at scaled coordinate position (px,py) in the final 2D image.

The default is ViewCenter->{{x,y,z},ImageScaled[{1,1}/2]}.

In a notebook front end, rotating a 3D object by dragging the mouse does not change the setting for ViewCenter. Panning changes the second element in the ViewCenter list.

Explicit settings for ViewVector override settings of the form ViewCenter->{x,y,z}.

Explicit settings for ViewMatrix always override settings for ViewCenter.

p1 = Framed[Graphics3D[Cylinder[],ViewCenter->Automatic,SphericalRegion->True]];
p2 = Framed[Graphics3D[Cylinder[],ViewCenter->{1,.5,1},SphericalRegion->True]];
Show[GraphicsRow[{p1,p2}], ImageSize ->    450]

The command for ViewCentre puts the top-right corner of the objects at the center of the final image (p2).

?ViewPoint

Default: 	ViewPoint -> {1.3, -2.4, 2.}

A new view point may be selected in several ways:

1.	The simplest method is adding an appropriate option.

pp=Plot3D[Sin[x y],{x,0,3},{y,0,3},ImageSize -> 200,ViewPoint->{1.3`,1.8`,2}]

Show[pp, ViewPoint -> {1.3,1.8,2} ]   renders the same figure but with different size.

2.	Dragging the picture with  the mouse you may draw the picture in all directions

After you have found a convenient position of the object you write Options[] and copy the object as argument.
After "Retrun|" you get a list of options including that for the new viewpoint.

Show[pp]

lo = Options[]

Show[pp, lo[[-2]]]

3.	        Dragging with the mouse while pressing Ctrl, Alt or Option zooms in or out, changing the value of  ViewAngle, but keeping ViewPoint fixed.

4.	        More information on directives for the option ViewPoint.

ViewPoint->{x,y,z} gives the position of the view point relative to the center of the three-dimensional box that contains the objects.

The view point is given in a special scaled coordinate system in which the longest side of the bounding box has length 1. The center of the bounding box is taken to have coordinates {0,0,0}.

Common settings for ViewPoint are:

The following symbolic forms can also be used:  »

Choosing a ViewPoint farther away from the object reduces the distortion associated with perspective.

Infinite coordinates can be used to specify orthographic views:  »

The coordinates of the corners of the bounding box in the special coordinate system used for ViewPoint are determined by the setting for the BoxRatios option.

In a notebook front end, dragging with the mouse rotates a 3D object, by changing the azimuthal components of ViewPoint, as well as the setting for ViewVertical.

Dragging with the mouse while pressing Ctrl, Alt or Option zooms in or out, changing the value of ViewAngle, but keeping ViewPoint fixed.

Explicit settings for ViewVector or ViewMatrix override settings for ViewPoint.

The spherical harmonics

Ylm(ϑ,φ)  = N(Subscript[l, lm]) Plm(cos ϑ) eim φ

are very important functions in quantum mechanics.

Clear[x,y,z] 
psa=Abs[SphericalHarmonicY[4,2,th,ph]];
x=psa Sin[th] Cos[ph];y=psa Sin[th] Sin[ph];z=psa Cos[th];plwa=ParametricPlot3D[{x,y,z},{th,0,π},{ph,0,π}];p2=Show[plwa,ViewPoint->{-1.509`,-2.91`,0.18`}];Show[GraphicsRow[{plwa,p2}]]

6.2.9  Options for ContourPlot and DensityPlot

??ContourPlot

??DensityPlot

For the options:
	AspectRatio, Axes, AxesLabel, AxesOrigin, AxesStyle, Background,
		ColorFunction, ColorOutput, Compiled        cf.  § 6.2.7

?ContourLines

ContourLines -> True (Default); 	or
	ContourLines -> False.

Clear[x,y,r]; f[x_,y_,r_] = Abs[Exp[ I r Cos[x + I y] ] ];

p1=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},PlotRange->{0,2},ContourStyle->Automatic];p2=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},PlotRange->{0,2},ContourStyle->None];
Show[GraphicsRow[{p1,p2}],ImageSize->350]

Contours -> n specifies to plot  n  contours, whose z values are spaced equally between the minimun 
				and maximum z values. Default value  n = 10.
				
	Contours -> {z1,z2,....}     specifies the z-values to use.

p1=Plot3D[f[x,y,1],{x,0,2 π},{y,-2,2},PlotRange->{0,2},ViewPoint->{-0.03`,-2.4`,2.`}];p2=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},PlotRange->{0,2},Contours->{0.055`,0.11`,0.33`,0.66`,0.9`,1,1.33`,1.66`,2.`}];Show[GraphicsRow[{p1,p2}],ImageSize->450]

?ContourShading

ContourShading -> False	: 	No shading
ContourShading -> True 	: 	Shadings of gray increasing from black to white with increasing height.
ContourShading -> ColourFunction

p1=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},Contours->{0.2`,0.4`,0.6`,0.8`,1.`,1.2`,1.4`,1.6`,1.8`,2.`},ContourShading->False];p2=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},Contours->{0.2`,0.4`,0.6`,0.8`,1.`,1.2`,1.4`,1.6`,1.8`,2.`},ContourShading->True,ColorFunction->Hue];Show[GraphicsRow[{p1,p2}],ImageSize->450]

cc[xx_]:=Which[xx≥ 1,Hue[.35],xx> 0.5,Hue[.7],True,Hue[.03]]
p1=ContourPlot[0.65` (x^2)+(y^2),{x,-3,3},{y,-2,2}, AspectRatio -> Automatic];
p2=ContourPlot[0.65` (x^2)+(y^2),{x,-3,3},{y,-2,2},ColorFunctionScaling-> True,ColorFunction->(cc[2.5 #1]&), AspectRatio -> Automatic];
p3=ContourPlot[0.65` (x^2)+(y^2),{x,-3,3},{y,-2,2},ColorFunction-> Hue ,AspectRatio -> Automatic];
Show[GraphicsRow[{p1,p2,p3}],ImageSize->500]

?ContourStyle

ContourStyle -> {{style1},{style2}, ...} 
		specifies that successive contour lines should be drawn according to style1, ... .
		Style directives must be lists, perhaps of length 1.
		Corresponding Graphics Directives are: Dashing[],  Thickness[]; Hue; RGBColor[], ...

p1=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},Contours->{0.2`,0.4`,0.6`,0.8`,1.`,1.2`,1.4`,1.6`,1.8`,2.`},ContourShading->False,ContourStyle->{{Thickness[0.001`]},{Thickness[0.003`]},{Thickness[0.005`]},{Thickness[0.007`]},{Thickness[0.01`]},{Thickness[0.01`]},{Thickness[0.01`]},{Thickness[0.01`]},{Thickness[0.01`]},{Thickness[0.01`]}}];p2=ContourPlot[f[x,y,1],{x,0,2 π},{y,-2,2},Contours->{0.2`,0.4`,0.6`,0.8`,1.`,1.2`,1.4`,1.6`,1.8`,2.`},ContourShading->False,ContourStyle->{{Dashing[{}]},{Dashing[{0.01`}]},{Dashing[{0.02`}]},{Dashing[{0.03`}]},{Dashing[{0.04`}]},{Dashing[{0.05`}]}}];Show[GraphicsRow[{p1,p2}],ImageSize->450]

For the options:
DefaultColor, Epilog, Frame, Framlabel, FrameStyle, FrameTicks,
PlotLabel, PlotPoints, PlotRange, PlotRegion, Prolog, RotateLabel,
Ticks, DisplayFunction   cf. § 6.1.9.

6.2.9.1	The Potential and the Equipotentials of the Restricted Three-Body System

In the restricted 3-body problem the motion of 3 masses under their mutual attraction is treated under the 
assumption that one of them (the zero mass, e.g. a planetoid) is so small that it does not influence the 
motion of the other two (the finite masses, e.g. Sun and Jupiter). The finite masses move with the same 
angular velocity  n  on circles around the common centre of mass, i.e. their is equilibrium between the 
mutual attraction and the centrifugal force.The finite masses have relative values μ ≤ 1/2   and 1 - μ. 
In a frame rotating with angular velocity  n  the finite masses are located on the x-axis, at positions  
x1 = - μ a   and  x2 =  (1 - μ) a;  their mutual distance is chosen as unit of length, so  a = 1. The rotation 
period is taken as unit of time, so n = 1.  The zero mass is attracted by the two masses and experiences 
the centrifugal force. So its potential is:

Clear[fu,fx,fy,x,y]

fu = - (1/2) ((x^2)+ (y^2))-(μ/(Sqrt[(y^2)+(((-1+x+μ))^2)]))+((-1+μ)/(Sqrt[(y^2)+(((x+μ))^2)]));

The corresponding force components are:

fx = - D[fu,x]

fy = - D[fu,y]

The libration (= equilibrium) points of the zero mass are those points where  fx = fy = 0. These are called 
(Subscript[L, 1]),(Subscript[L, 2]), (Subscript[L, 3]),(Subscript[L, 5]),(Subscript[L, 4]).Here these are computed for the particular value  μ = 1/4.

sm = μ  -> 1/4 ;
son =RotateRight[NSolve[Thread[{fx,fy} == {0,0}]/. sm,{x,y}],1]

Their positions and potential values are:

um = fu /. sm;
vli = {x, y, um} /. son

The surface corresponding to this potential is shown below:

pp=Plot3D[um,{x,-1.5`,1.5`},{y,-1,1},PlotPoints->40];

pv=Show[pp,Graphics3D[Point/@vli],ImageSize->500,AxesLabel->{"x","y","U(x,y)"}];

The equipotentials are computed by:

cp=ContourPlot[um,{x,-1.5`,1.5`},{y,-1.5`,1.5`},Contours->15,PlotPoints->100];

pm = { Point[{ - μ,0}],Point[{1 - μ,0}]}/. sm  ;  (* masses *)
pe = Point[{x,y}]/. son ;                       (* libration points *)
su = .15;
pms = {{- μ,su},{1 - μ,su}}/. sm ; (* positions mass labels *)
tm =  {Text[Subscript["μ",1],pms[[1]]],Text[Subscript["μ",2],pms[[2]]]}/.sm;

pc=Show[cp,Epilog->{pe,Red,pm,tm},ImageSize->500];

Show[GraphicsRow[{pv,pc}],ImageSize->500]

Show[pc,ImageSize->500]

Pointing the pointer to a contour line in the picture above makes appear a tag indicating the corresponding height.

6.3	Graphics Elements in 2 and 3 Dimensions.
	Plotting Points and Lines. Texts in Graphics

Mathematica presents all graphics in terms of graphics primitives; these present elements of an image and can be used to compose a drawing or to insert some additional elments into a drawing by the option  Epilog. 
Prime[n], the command used below, renders the n-th prime number.

lp=ListPlot[Table[Prime[n],{n,20}],ImageSize->250]

InputForm[lp]

The output above shows that the information on the points is the first element of the Graphics list. This may be used
in another graphic:

lp[[1]]

lp[[2]]

rp = ReplacePart[lp[[1]],Red,1]

p1 = Show[Graphics[{PointSize -> 0.02,rp}], AspectRatio-> 0.6];
p2 = Show[Graphics[{PointSize -> 0.02,lp[[1]]},lp[[2]]], AspectRatio-> 0.6];
GraphicsRow[{p1,p2}, ImageSize -> 450]

6.3.1	Two-Dimensional Graphics Elements

??Graphics

Point[{x,y}]      			point at position  {x,y}
               
	Line[{{x1,y1},{x2,y2},....}] 	line through points  {x1,y1}, {x2,y2},.... 
   
	Circle[{x,y},r]				circle with radius  r  centered at   {x,y}            

	Disk[{x,y},r]				filled disk of radius  r  centered at   {x,y}

	Text[expr, {x,y}]  			a list of the text of expr,  centered at  {x,y}

In 2 dimensions some results may be obtained in two ways; either by the graphics elements  Point[]  or by ListPlot[];  either by Line[]  or by ListPlot[] with the option  PlotJoined -> True. The graphics elements give drawings only by the command Show[Graphics[]]  with the graphics elements as arguments.

?Point

?Line

?Circle

?Disk

?Text

?Arrow

??Grid

?Framed

More details may be found at the Wolfram Website. Go to Help, then Documention Center, In the Search Window type Graphics Objects, click >>, then click Graphics Objects .

In 2 dimensions some results may be obtained in two ways; either by the graphics elements  Point[]  or by ListPlot[];  either by Line[]  or by ListPlot[] with the option  PlotJoined -> True. Sometimes graphics elements give drawings only by the command Show[Graphics[]]  with the graphics elements as arguments.

li={{0,0},{1,1},{1.5`,5.2`},{2,1.4`},{1,-1.5`}};ListPlot[li,Prolog->PointSize[0.015`],ImageSize->200]

pt = Table[Graphics[Point[ li[[k]] ] ], {k,Length[li]} ] ;

as = 0.6;
p1=Show[pt, AspectRatio -> as];
p2=Show[pt,Axes->True, AspectRatio -> as];Show[GraphicsRow[{p1,p2}],ImageSize->500]

Style options must be included at the very first position of the list for a graphics element.

Show[Graphics[{Thickness[0.02`],Line[li]}], Axes -> True, AspectRatio -> 0.7]

p1=Show[pt,Prolog->PointSize[0.015`], AspectRatio -> as];
p2=Show[pt,Graphics[Line[li]],Prolog->PointSize[0.015`], AspectRatio -> as];Show[GraphicsRow[{p1,p2}],Prolog->PointSize[0.02`],ImageSize->400]

c1 = Circle[{0,0},2,{0,((3 π)/4)}];p1=Show[Graphics[c1],AspectRatio->Automatic];
c2 = Circle[{0,0},{2,3},{0,((3 π)/4)}];p2=Show[Graphics[c2],AspectRatio->Automatic];Show[GraphicsRow[{p1,p2}]]

p1 = Graphics[{Point[{1,0.3}],Circle[{1,0.3},1],Text[Style[x^2+y^2==1,15],{1,1}]},Axes -> True, ImageSize ->  200]

la={{-1,0},{2,0},{3.5`,3.5`},{1.5`,2.5`},{-2,4},{-1,0}};ListPlot[la,Joined->True,PlotStyle->Thickness[0.01`],AxesLabel->{"u","v"},Epilog->{Text["a1",{-0.7`,0.3`}],Text["a2",{1.8`,0.3`}],Text["a3",{2.7`,2.7`}],Text["a4",{1.5`,2.2`}],Text["a5",{-1.6`,3.4`}]}]

p1 = Graphics[{Blue,Circle[{0,0}],Red, Arrow[{{2,1},{1,0}}]}];
p2 = Graphics[{Green,Thickness[0.02],Circle[{0,0}],Red, Arrow[{{2,1},{1,0}},0.2]}];
GraphicsRow[{p1,p2}]

p1=Graphics[{RGBColor[0,1,0],Disk[{0,0},2]}, ImageSize -> 150];p2=Graphics[{RGBColor[0,0,1],Disk[{1,1},2]},ImageSize -> 150];
p3=Show[p1,p2,AspectRatio->Automatic];p4=Show[p2,p1,AspectRatio->Automatic];GraphicsRow[{p3,p4}]

p1 = Grid[{{Graphics[Disk[],ImageSize->30,BaselinePosition->Bottom],abc},{ead,Graphics[Rectangle[],ImageSize->30,BaselinePosition->Top]}},Frame->All];
p2 = Framed[p1];
GraphicsRow[{p1,p2}]

p1 = Grid[Table[x,{3},{3}],Frame->All,Spacings->2];
p2 = Grid[Table[x,{3},{3}],Frame->All,Spacings->{2,0}];
GraphicsRow[{p1,p2}]

6.3.1.1	Arrows

Arrow

({{, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])}]
is a graphics primitive which represents an arrow from (Subscript[pt, 1]) to (Subscript[pt, 2]).}, {, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])},s]
represents an arrow with its ends set back from (Subscript[pt, 1]) and (Subscript[pt, 2]) by a distance s. }, {, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])},{(Subscript[s, 1]),(Subscript[s, 2])}]
sets back by (Subscript[s, 1]) from (Subscript[pt, 1]) and (Subscript[s, 2]) from (Subscript[pt, 2]). }})

Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])}] is drawn by default with its tail at (Subscript[pt, 1]) and its head at (Subscript[pt, 2]). 
Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2]),…}] represents an arrow whose shaft passes through the sequence of points (Subscript[pt, i]).

p1 = Graphics[Arrow[{{1,2},{2,3}}],Axes -> True];
p2 = Graphics[Arrow[{{1,2},{1.5,2.2},{1.3,2.7},{2,3}}],Axes -> True];
GraphicsRow[{p1,p2},Spacings -> {100,0}]

?Arrowheads

Arrowheads[s] specifies that arrowheads should have a length that is a fraction s of the total width of the graphic. The default is 0.04.  »
Arrowheads[{-s,s}] gives double-headed arrows.

The symbolic values Tiny, Small, Medium and Large can be used for s. With these values, the size of the arrowhead is independent of the total width of the graphic.  »

p1 = Graphics[{Arrowheads[0.1],Arrow[{{1.1,2.1},{2,3}}]},Axes -> True, PlotRange ->{{1,2},{2,3}}];
p2 = Graphics[{Arrowheads[{-0.1,0.1}],Arrow[{{1.1,2.1},{2,3}}]},Axes -> True, PlotRange ->{{1,2},{2,3}}];
GraphicsRow[{p1,p2},Spacings -> {100,0}]

a={Arrowheads[Large],Arrow[{{0,0},{1,.5}}]};

{Graphics[{Dashed,a}],Graphics[{Red,a}],Graphics[{Thick,a}],Graphics[{Thick,Dashed,Red,a}]}

Plot[Sin[x],{x,0,2Pi},Ticks -> {π {1/2,1,3/2,2},Range[-1,1,0.5]},Epilog->{Arrow[{{3Pi/2,1/2},{Pi,0}}],Text["Zero",{3Pi/2,1/2},{-1,-1}]}]

6.3.1.2	Arrows applied to the coordinate axes

When applying arrows to the coordinate axes, it is necessary to choose the lengths of the arrows, the Arrowhead, 
the PlotRange and the Ticks very carefully by trial and error in accordance with the ImageSize.

pl = Plot[x^3 + 2x^2 - 4x,{x,-4,3}, AxesLabel->{"x","y"}]

Show[pl,Graphics[{Arrow[{{3.15,0.12},{3.32,0.12}}],Arrow[{{0,26},{0,28}}]}],
PlotRange->{{-4,3.13},{-15,27}},Ticks-> {Range[-4,3,0.5],Range[-30,30,5]}, ImageSize -> 400]

Show[pl,Epilog -> {Arrow[{{3.15,0.12},{3.32,0.12}}],Arrow[{{0,26},{0,28}}]},
PlotRange->{{-4,3.13},{-15,27}},Ticks-> {Range[-4,3,0.5],Range[-30,30,5]}, ImageSize -> 600];

gives the same picture as above.

Show[pl,Graphics[{Arrowheads[0.028],Arrow[{{3.1,0.12},{3.3,0.12}}],Arrow[{{0,26},{0,28}}]}],
PlotRange->{{-4,3.13},{-15,27}},Ticks-> {Range[-4,3,0.5],Range[-30,30,5]}, ImageSize -> 400]

Another method is to construct arrow from lines (see the Epilog).

Plot[x^3 + 2x^2 - 4x,{x,-4,3}, AxesLabel->{"x","y"},PlotRange->{{-4,3.125},{-15,27}},
Ticks-> {Range[-4,3,0.5],Range[-30,30,5]},Epilog -> {Black,Thickness[0.0025],Line[{{3.05,1},{3.13,0},{3.05,-1}}],Line[{{0.1,26},{0,27},{-0.1,26}}]}]

6.3.2	Three-Dimensional Graphics Elements

??Graphics3D

Point[{x,y,z}]      				point at position {x,y,z}
               
Line[listp] 					line through points given in  listp  with		
listp  = {x1,y1,z1},{x2,y2,z2},..}

Text[expr, {x,y,z}]  				the text of  exprr, centered at {x,y,z}

?Point

?Line

?Text

?Framed

The graphics elements give drawings by the command   Show[Graphics3D[]] with the graphics elements as arguments.    Style options must be included  at the very first position of the list for a graphics element.

?Arrow

?Cylinder

?Sphere

?Cuboid

?Tube

l3={{0,0,0},{1,1,1},{1.5`,3.2`,3},{2,1.4`,2.5`},{1,-1.5`,-1}};
p1=Show[Graphics3D[Line[l3]]];
p2=Show[Graphics3D[{Thickness[0.03`],Line[l3]}]];
l4=Table[Graphics3D[{PointSize[0.04`],Point[l3[[k]]]}],{k,Length[l3]}];
p3=Show[l4,Axes->True];Show[GraphicsRow[{p1,p2,p3}],ImageSize->400]

Clear[a,z0,b,e,bx,x0]
a=4;z0=5;b[1]={0,0,0};b[2]={a,0,0};b[3]={a,a,0};b[4]={0,a,0};
x0=(a/2);e={x0,x0,z0};bx={x0,x0,0};
lp1={Thickness[0.02`],Line[{b[2],b[3],e,b[1],e,b[2],b[1]}]};
lp2={Thickness[0.012`],Line[{b[1],b[4]}],Line[{b[4],b[3]}],Line[{e,b[4]}]};
lp3={Line[{b[1],b[3]}],Line[{b[4],b[2],bx,e}]};Show[Graphics3D[lp1],Graphics3D[lp2],Graphics3D[lp3],Boxed->False,ImageSize->200]

p1=ParametricPlot3D[{Sin[8 u] Sin[u],Cos[8 u] Sin[u],Cos[u]},{u,0,2 π},PlotPoints->200];

The first element of the Graphics3D output contains the information on the curve(s. beginning of 6.3 ); 
 this may be used for another graphic where the layout of the curve even may be modified.

p2=Show[Graphics3D[{Thickness[0.015`],First[p1]}]];
Show[GraphicsRow[{p1,p2}],ImageSize->500]

Graphics3D[{Yellow,Cuboid[{0,0,0}],Blue,Cuboid[{0.5,0.5,0.5}]}, ImageSize ->  150]

Graphics3D[{Yellow,Sphere[{0,0,0}],Blue,Cylinder[{{0.5,0.25,0.36},{1,1,1}}]}, ImageSize ->  150]

Graphics3D[Tube[{{0,0,0},{1,1,1}},.1], ImageSize ->  200]

6.3.2.3	1  Arrows

Arrow

({{, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])}]
is a graphics primitive which represents an arrow from (Subscript[pt, 1]) to (Subscript[pt, 2]).}, {, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])},s]
represents an arrow with its ends set back from (Subscript[pt, 1]) and (Subscript[pt, 2]) by a distance s. }, {, Arrow[{(Subscript[pt, 1]),(Subscript[pt, 2])},{(Subscript[s, 1]),(Subscript[s, 2])}]
sets back by (Subscript[s, 1]) from (Subscript[pt, 1]) and (Subscript[s, 2]) from (Subscript[pt, 2]). }})

p1 = Graphics3D[Arrow[{{1,1,-1},{2,2,0},{3,3,-1},{4,4,0}}], Axes -> True];
p2 = Graphics3D[Arrow[Tube[{{1,1,-1},{2,2,0},{3,3,-1},{4,4,0}},.1]]] ;
GraphicsRow[{p1,p2},Spacings -> 100]

a={Arrowheads[Large],Arrow[{{0,0,0},{2,1,1}}]};
{Graphics3D[{Dashed,a},ImageSize -> 100],Graphics3D[{Red,a},ImageSize -> 100],Graphics3D[{Thick,a},ImageSize -> 100],Graphics3D[{Thick,Dashed,Red,a},ImageSize -> 100]}

pl =Show[Plot3D[Sin[x]Sin[y],{x,0,2Pi},{y,0,2Pi},PlotRange->{-1,4},BoxRatios->Automatic,
AxesLabel -> {"x","y","z"}],Graphics3D[{Arrow[{{Pi,Pi,4},{Pi/2,Pi/2,1}}],Arrow[{{Pi,Pi,4},{3Pi/2,3Pi/2,1}}],Text[Panel["Maxima",FrameMargins->0],{Pi,Pi,4}]}]]

6.3.2.2	Arrows applied to the coordinate axes

I did not succed in drawing the arrqws as an extension of the lines supporting the ticks.

aa =Graphics3D[{Arrowheads[0.025],Arrow[{{5.8,0,-1.},{6.4,0,-1.}}],Arrow[{{0,0,3.6},{0,0,4.2}}],
Arrow[{{0,5.4,4},{0,6.,4}}]}];
p1 = Show[pl,aa, PlotRange -> All]
p2 = Show[pl,aa,Boxed -> False, PlotRange -> All]

6.3.3  Exercises

3D Graphics

Not all exercises are obligatory;  Obligatory ones have a cross  (+) after the number.

6.20+	Plot the space curve  x =  t cos(t),  y =  t sin(t),  z = 2 t  for 0 <= t <= 4π.

6.21	a)	Plot the ellipsoid  (x/2)2  +  y2  +  (z/3)2  =  1. 
	b)	Show  contour lines for the upper half of this surface, i.e. for  z >  0.
	Hint:	Use spherical coordinates for  x/2, y, z/3.

6.22	Plot the modulus of  sin z  for  z   taken from the strip of length  3π  and width  2   
	around the origin. Show also the contour lines.

6.23+	Show the modulus(= absolute value) of the integrand of Sommerfeld’s integral 					representation of the Bessel function  (Subscript[J, 1])(r)  for  r = 1   and  r = 10.  
	Display the saddle point as a surface and by contour lines.

6.24	Draw a red screw with blue box and green axes; these should have labels x,y,z. 
	The background should be yellow.

6.25	a)  Show the surface displaying the modulus of the function  sin(x + i y)  for 
	-π 1.2 <= x <= π 1.2,  -1.1 <= y <= 1.1. 
	The faces facing the viewer should  contain gridlines.  The x -axis should have 
	labels x, -π, π; the y-axis y, -1,1.
	b)	Show also the surface with a blue mesh. The other parts of the drawing 
		should be in red. 
	c)	Limit the above surface to the range (0,1.1).  "Wounds" resulting from 
		removals should be coloured in yellow.

6.26+	a)	Plot a hollow cylinder ( x = r cos(u), y = r sin(u), z = v;  v = -h/2, h/2; h = 5,  r = 1).   
	b)	Besides the picture resulting from the default values, show a view head-on to the 
		mantle, a top view, a view from an excentric point chosen such that the opposite 
		generator and a bit of the floor are visible.
	c)	Show the 4 pictures designed such that the real magnitude of the cylinder is the 					same in each of them and arrange them again in a  2 x 2   array.

6.27	Draw a circular cone. The visible part of the basis and the two generators defining the  
	outline should be 1.2 mm thick. Draw the height and a radius; attach the letters  h, r  
	respectively to the height, the radius respectively. Show also two other thin generators 
	and two semi-circles at heights   h/3  and   2h/3   in the visible part  of the lateral surface; 
	in the back these circles should be closed by dashed semi-circles; there should be two 
	dashed generates corresponding to those drawn by continuous lines.  There should be
	a letter  A  (= apex)  above the tip of the cone.

6.29	Using the list OldColorNames determine which color names Mathematica recognizes as 
	long as the list has not been introduced into the kernel. The command should prepare a 
	drawing (a disk or a square or a rectangle) colored by the color and have a plotlabel giving 
	the name of the color. For the colors not implemented into the kernel one gets a black 
	figure. Note that the color names given in the list are strings. They can be changed into 
	expressions by the command  ToExpression[].