(*^ ::[ frontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.1"; macintoshStandardFontEncoding; paletteColors = 128; automaticGrouping; currentKernel; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e8, 24, "Times"; ; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, e6, 18, "Times"; ; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, italic, e6, 14, "Times"; ; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, a20, 18, "Times"; ; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, a15, 14, "Times"; ; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, a12, 12, "Times"; ; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L-5, 12, "Courier"; ; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L-5, 12, "Courier"; ; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L-5, 12, "Courier"; ; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, B65535, L-5, 12, "Courier"; ; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, 12, "Courier"; ; fontset = name, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, 10, "Geneva"; ; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = leftheader, inactive, L2, 12, "Times"; ; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, 12, "Times"; ; fontset = leftfooter, inactive, L2, 12, "Times"; ; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 10, "Times"; ; fontset = clipboard, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = completions, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special1, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special2, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special3, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special4, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; fontset = special5, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, 12, "Times"; ; ] :[font = title; inactive; preserveAspect; rightWrapOffset = 431; fontName = "B Helvetica Bold"; startGroup; ] Point Plots and Space Curves by Theodore W. Gray ;[s] 4:0,1;28,0;29,2;48,0;49,-1; 3:2,33,23,Courier,1,24,0,0,0;1,19,14,B Helvetica Bold,1,14,0,0,0;1,16,12,B Helvetica Bold,3,12,0,0,0; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] This Notebook defines the functions PointPlot, PointPlot3D, PointParamPlot3D, SpaceCurve, and PointSpaceCurve. These functions let you make discrete point plots in two and three dimensions. The SpaceCurve and PointSpaceCurve functions let you make three-dimensional functions of one parameter (lines or points in 3D). ;[s] 11:0,0;36,1;45,0;47,1;58,0;60,1;76,0;78,1;88,0;94,1;109,0;320,-1; 2:6,17,12,Times,0,12,0,0,0;5,17,12,Times,1,12,0,0,0; :[font = section; inactive; preserveAspect; rightWrapOffset = 431; startGroup; ] Examples :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Each of the functions defined in this Notebook is a variation of either Plot, Plot3D, or ParametricPlot3D. The arguments are quite similar to these standard functions. Following are descriptions of each of the functions. ;[s] 7:0,0;72,1;76,0;78,1;84,0;89,1;105,0;224,-1; 2:4,17,12,Times,0,12,0,0,0;3,14,10,Times,1,10,0,0,0; :[font = subsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] PointPlot ;[s] 2:0,1;9,0;10,-1; 2:1,19,14,Geneva,1,14,0,0,0;1,19,14,Times,1,14,0,0,0; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] PointPlot[ f, {x, min, max, (step)}] produces a plot of f(x) vs. x. Here is an example: ;[s] 3:0,0;61,1;64,0;89,-1; 2:2,17,12,Times,0,12,0,0,0;1,17,12,Times,2,12,0,0,0; :[font = input; preserveAspect; rightWrapOffset = 431; startGroup; ] PointPlot[Sin[x], {x, 0, 2 Pi, 0.2}] :[font = postscript; PICT; formatAsPICT; output; inactive; preserveAspect; rightWrapOffset = 431; pictureLeft = 67; pictureWidth = 243; pictureHeight = 147; pictureID = 2570; ] :[font = output; output; inactive; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; ] The Unformatted text for this cell was not generated. Use options in the Actions Settings dialog box to control when Unformatted text is generated. ;[o] -Graphics- :[font = subsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] PointPlot3D :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] PointPlot3D[ f, {x, min, max, (step)}, {y, min, max, (step)}] produces a plot of f(x, y), plotted with points instead of surfaces. :[font = input; preserveAspect; rightWrapOffset = 431; startGroup; ] PointPlot3D[x y, {x, -4, 4, 0.5}, {y, -4, 4, 0.5}, BoxRatios->{1,1,1}] :[font = postscript; PICT; formatAsPICT; output; inactive; preserveAspect; rightWrapOffset = 431; pictureLeft = 107; pictureWidth = 202; pictureHeight = 198; pictureID = 25009; ] :[font = output; output; inactive; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; ] The Unformatted text for this cell was not generated. Use options in the Actions Settings dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = subsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] PointParamPlot3D :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] PointParamPlot3D[{x,y,z}, {u, min, max, (step)}, {v, min, max, (step)}] produces a parametric plot of (x(u,v), y(u,v), z(u,v)), plotted with points instead of surfaces. :[font = input; preserveAspect; rightWrapOffset = 431; startGroup; ] PointParamPlot3D[{Sin[u] Cos[v], Sin[u] Sin[v], Cos[u]}, {u, 0, Pi, Pi/15}, {v, 0, 2 Pi, Pi/15}, BoxRatios->{1,1,1}] :[font = postscript; PICT; formatAsPICT; output; inactive; preserveAspect; rightWrapOffset = 431; pictureLeft = 113; pictureWidth = 205; pictureHeight = 201; pictureID = 29261; ] :[font = output; output; inactive; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; ] The Unformatted text for this cell was not generated. Use options in the Actions Settings dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = subsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] SpaceCurve :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] SpaceCurve[{x,y,z}, {u, min, max, (step)}] produces a parametric plot of (x(u), y(u), z(u)), with the calculated points connected by straight lines. :[font = input; preserveAspect; rightWrapOffset = 431; startGroup; ] SpaceCurve[{u Sin[u], u Cos[u], u}, {u, 0, 15, 0.15}, BoxRatios->{1,1,1}] :[font = postscript; PICT; formatAsPICT; output; inactive; preserveAspect; rightWrapOffset = 431; pictureLeft = 107; pictureWidth = 202; pictureHeight = 198; pictureID = 1282; ] :[font = output; output; inactive; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; ] The Unformatted text for this cell was not generated. Use options in the Actions Settings dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = subsection; inactive; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] PointSpaceCurve :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] PointSpaceCurve[{x,y,z}, {u, min, max, (step)}] produces a parametric plot of (x(u), y(u), z(u)), with the calculated points shown as dots. :[font = input; Cclosed; preserveAspect; rightWrapOffset = 431; startGroup; ] PointSpaceCurve[{u Sin[u], u Cos[u], u^2}, {u, 0, 15, 0.30}, BoxRatios->{1,1,1}] :[font = postscript; PICT; formatAsPICT; output; inactive; preserveAspect; rightWrapOffset = 431; pictureLeft = 114; pictureWidth = 198; pictureHeight = 194; pictureID = 25529; ] :[font = output; output; inactive; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; endGroup; ] The Unformatted text for this cell was not generated. Use options in the Actions Settings dialog box to control when Unformatted text is generated. ;[o] -Graphics3D- :[font = section; inactive; Cclosed; pageBreak; preserveAspect; rightWrapOffset = 431; startGroup; ] Implementation :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Remove previous definitions for the functions defined in this file: :[font = input; preserveAspect; rightWrapOffset = 431; ] Remove[PointPlot, PointParamPlot3D, PointPlot3D, SpaceCurve, PointSpaceCurve]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Begin this package: :[font = input; preserveAspect; rightWrapOffset = 431; ] BeginPackage["PointPlots`"]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define the usage strings for each of the functions: :[font = input; preserveAspect; rightWrapOffset = 431; ] PointPlot::usage = "PointPlot[f, {u, u0, u1, (du)}], (options)] \ produces a 2D plot made out of points. \ Options are passed to Show[]"; :[font = input; preserveAspect; rightWrapOffset = 431; ] PointPlot3D::usage = "PointPlot3D[f, {x, x0, x1, (dx)}, \ {y, y0, y1, (dy)}, (options)] \ produces a 3D plot made out of points. \ Options are passed to Show[]"; :[font = input; preserveAspect; rightWrapOffset = 431; ] PointParamPlot3D::usage = "PointParamPlot3D[{x, y, z}, {u, u0, u1, (du)}, \ {v, v0, v1, (dv)}, (options)] \ produces a 3D parametric plot made out of points. \ Options are passed to Show[]"; :[font = input; preserveAspect; rightWrapOffset = 431; ] SpaceCurve::usage = "SpaceCurve[{x, y, z}, {u, u0, u1, (du)}, \ (options)] \ produces a 3D space curve. \ Options are passed to Show[]"; :[font = input; preserveAspect; rightWrapOffset = 431; ] PointSpaceCurve::usage = "PointSpaceCurve[{x, y, z}, \ {u, u0, u1, (du)}, (options)] \ produces a set of points in 3D. \ Options are passed to Show[]"; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Begin the private part of this package: :[font = input; preserveAspect; rightWrapOffset = 431; ] Begin["`Private`"]; `plotpoints = PlotPoints /. Options[Plot3D]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define PointPlot: :[font = input; preserveAspect; rightWrapOffset = 431; ] Attributes[PointPlot] = {HoldFirst}; PointPlot[function_, range:{x_,___}, options___] := ListPlot[Table[{x, function}, range], options]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define PointParamPlot3D: :[font = input; preserveAspect; rightWrapOffset = 431; ] Attributes[PointParamPlot3D] = {HoldFirst}; PointParamPlot3D[fun:{_, _, _}, {u_, u0_, u1_, du_:((u1-u0)/(plotpoints-1))}, {v_, v0_, v1_, dv_:((v1-v0)/(plotpoints-1))}, opts___] := Show[Graphics3D[Table[Point[N[fun]], {u, u0, u1, du}, {v, v0, v1, dv}]], opts]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define PointPlot3D (in terms of PointParamPlot3D): :[font = input; preserveAspect; rightWrapOffset = 431; ] Attributes[PointPlot3D] = {HoldFirst}; PointPlot3D[fun_, ulim:{u_, ___}, vlim:{v_, ___}, opts___] := PointParamPlot3D[ {u, v, fun}, ulim, vlim, opts]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define SpaceCurve: :[font = input; preserveAspect; rightWrapOffset = 431; ] Attributes[SpaceCurve] = {HoldFirst}; SpaceCurve[fun:{_, _, _}, {u_, u0_, u1_, du_:((u1-u0)/(plotpoints-1))}, opts___] := Show[Graphics3D[Line[Table[N[fun], {u,u0,u1,du}]]], opts]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] Define PointSpaceCurve: :[font = input; preserveAspect; rightWrapOffset = 431; ] Attributes[PointSpaceCurve] = {HoldFirst} PointSpaceCurve[fun:{_, _, _}, {u_, u0_, u1_, du_:((u1-u0)/(plotpoints-1))}, opts___] := Show[Graphics3D[Table[Point[N[fun]], {u,u0,u1,du}]], opts]; :[font = text; inactive; preserveAspect; rightWrapOffset = 431; ] End this package: :[font = input; preserveAspect; rightWrapOffset = 431; endGroup; endGroup; ] End[]; EndPackage[]; ^*)