Showing the points on a surface about a circle in the plane

• To: mathgroup at smc.vnet.net
• Subject: [mg74848] Showing the points on a surface about a circle in the plane
• From: "ahallam at iastate.edu" <ahallam at iastate.edu>
• Date: Sun, 8 Apr 2007 05:04:16 -0400 (EDT)

```What I would like to do with Plot3D and ParametricPlot3D is show a
surface in three dimensions, a circle in the plane and the points on
the surface above the circle.  This is what I have in mind where I
have a square in the plane.  I simply don't know of a way to handle
the circle.  If there were am ImplicitPlot3D, I can think so some
options.

I am not sure how to send code so that it is readable so I am simply
pasting as is.

Someone can yell at me and tell me this is wrong and how to do it
correctly and then I will.

\!\(\*
RowBox[{\(Clear[f, x1, x2];\),
"\n", \(c = 0;\), "\[IndentingNewLine]", \(A = 10;\),
"\[IndentingNewLine]", \(=CE=B11 = 1/4;\), "\[IndentingNewLine]", \(=
=CE=B12
=
1/2;\), "\[IndentingNewLine]", \(f[x1_, x2_] := A*x1^=CE=B11*x2^=CE=
=B12;\),
"\
\[IndentingNewLine]", \(Print[
"\<This is f[x1, x2]\>"]\), "\[IndentingNewLine]", \(f[
x1, x2]\), "\n", "\[IndentingNewLine]", \(fv = Table[f[x1, x2],
{x1, 20,
24}, {x2, 20, 24}];\), "\[IndentingNewLine]", "fv
", "\[IndentingNewLine]", \(Print["\<This is the minimum
value of
the function\>"];\), "\[IndentingNewLine]", \(fvmin = Min[fv] // N
\),
"\[IndentingNewLine]", \(Print["\<This is the
maximum value of the function\>"];\), "\[IndentingNewLine]", \
(fvmax = \
Max[fv] // N\), "\[IndentingNewLine]", \(x1g = {20, 24}; x2g = {20,
24}; zg = {fvmin, fvmax};\), "\[IndentingNewLine]",
RowBox[{
RowBox[{"p1", "=",
RowBox[{"Plot3D", "[", "  ",
RowBox[{\(f[x1, x2]\), ",", \({x1,  .1, 30}\), ",", \({x2,  .
1,
30}\), ",", "
", \(AxesLabel -> {\*"\"\<\!\(x\_1\)\>\"", \
\*"\"\<\!\(x\_2\)\>\"", \*"\"\<f(\!\(x\_1\),\!\(x\_2\))\>\""}\), ",",
\
\(TextStyle -> {FontFamily -> "\<Helvetica\>", FontSize -> 18}\), ",
", " ", \(ColorFunction -> \ Hue\), ",",
RowBox[{"ViewPoint", "->",
RowBox[{"{",
RowBox[{\(-1.5\),
StyleBox[",",
"MR"],
StyleBox["2.5",
"MR"],
StyleBox[",",
"MR"],
StyleBox[\(-1\),
"MR"]}],
StyleBox["}",
"MR"]}]}], ",", " ", \(ImageSize -> \ 600\), ",", "
",
RowBox[{
StyleBox["Boxed",
"MR"], " ",
"->", " ", "True"}], ",", \(BoxRatios -> {1, 1,
0=2E6}\), ",
", \(DisplayFunction -> Identity\)}], "]"}]}],
";"}], "
", "\[IndentingNewLine]",
RowBox[{
RowBox[{"p2", "=",
RowBox[{"Plot3D", "[", "  ",
RowBox[{\(f[x1, x2]\), ",", \({x1, 20, 24}\), ",", \({x2,
20, 24}\), ",", "
", \(AxesLabel -> {\*"\"\<\!\(x\_1\)\>\"", \
\*"\"\<\!\(x\_2\)\>\"", \*"\"\<f(\!\(x\_1\),\!\(x\_2\))\>\""}\), ",",
" ", \
\(ColorFunction -> \((GrayLevel[#^3] &)\)\),
StyleBox[",",
FontWeight->"Bold"], " ", \(TextStyle -> {
FontFamily -> "\<Helvetica\>", FontSize ->
18}\), ",", \(ViewPoint\  -> \ {6, 3, \ \(-1\)}\),
",", "
", \(ImageSize -> \ 600\), ",", " ",
RowBox[{
StyleBox["Boxed",
"MR"], " ", "->", "
", "True"}], ",", \(BoxRatios -> {1, 1, 0.6}\), ",", \
\(DisplayFunction -> Identity\)}], "]"}]}], ";"}], " ", "\
[IndentingNewLine]",

RowBox[{
RowBox[{"Neigh1", "=", " ",
RowBox[{"Plot3D", "[",
RowBox[{"c", ",", \({x1, 20, 24}\),
",", \({x2, 20,
24}\), ",", "  ", \(ColorFunction -> \((GrayLevel[#^3] &)\)
\),
StyleBox[",",
FontWeight->"Bold"],
RowBox[{"ViewPoint", "->",
RowBox[{"{",
RowBox[{\(-1.5\),
StyleBox[",",
"MR"],
StyleBox["2.5",
"MR"],
StyleBox[",",
"MR"],
StyleBox["0",
"MR"]}],
StyleBox["}",
"MR"]}]}], ",", \(DisplayFunction\  -> \ Identity
\)}], "]
"}]}], ";"}],
"\[IndentingNewLine]", \(tx1 =
Graphics3D[{\ \ CMYKColor[ .8, 0,  .3,  .1], \
PointSize[
0.015], Point[\ {22, 22, 0}]\ , \
PointSize[0.015],
Point[\ {22, 22, f[22,
22]}]\ , \[IndentingNewLine]CMYKColor[ .1,
0,  .3,  .9], \ Text["\<\>", \ {\(-3.9\), 0.5, 20},
\ \
TextStyle -> {FontSize -> 24, FontWeight ->
"\<Bold\>"}]\[IndentingNewLine]\ }];\), " ",
"\[IndentingNewLine]", \(Show[\ p1, p2, Neigh1, tx1, \
Ticks -> {Automatic, Automatic, \ \ \ {\ {25,
"\<25\>",  .02, {Thickness[ .004]}\ }, {50, "\<50\>",  .
02, {
Thickness[ .004]}\ }, \[IndentingNewLine]{75, "\<75\>",  .
02, \
{Thickness[ .004]}\ }, {
125, "\<125\>",  .02, {Thickness[ .004]}\ }, {fvmin,
\*"\"\<\!\(f\
\_min\)\>\"",  .02, {
Thickness[ .004]}\ }, {fvmax, \*"\"\<\!\(f\_max\)\>
\"",  .02, \
{Thickness[ .004]}\ }\ \ }\ \ \ }, ViewPoint\  -> \ {6, 3, \ 3},
FaceGrids -> {{{1, 0, 0}, {x2g,
zg}}, {{0, 1, 0}, {x1g, zg}}, {{0, 0, \(-1\)}, {
x1g, x2g}}}, DefaultFont -> {"\<Helvetica\>", 20}, \
DisplayFunction\  -> \ \$DisplayFunction, \ ImageSize\  ->
\
600];\)}]\)

```

• Prev by Date: Re: Enquirey
• Next by Date: Plot a simple function
• Previous by thread: GenerateConditions setting
• Next by thread: Re: Showing the points on a surface about a circle in the plane