MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: a newbie problem with 3d graphing

  • To: mathgroup at
  • Subject: [mg25824] Re: [mg25797] a newbie problem with 3d graphing
  • From: Tomas Garza <tgarza01 at>
  • Date: Sat, 28 Oct 2000 01:41:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

I guess you mean how to obtain the surface of revolution and then how to 
plot it (correct me if I'm wrong). The first part is an elementary 
exercise in analytic geometry. If the equation g[x,y] = y - (1 - 
x^2)^0.5 == 0 is your two-dimensional curve, then f[x, y, z] = 
g[Sqrt[x^2 + z^2], y] == 0 is the equation of the surface of 
revolution obtained by revolving your plane curve about (*not* "along") 
the x-axis. Then you have

h[x_, y_] = y - (1 - x^2)^0.5    
-(1 - x^2)^0.5 + y
g[x_] := Solve[h[x, y] == 0, y][[1, 1, 2]]
1.(1. - 1. x^2)^0.5
 You may plot your curve this way:

Plot[g[x], {x, -1, 1}, PlotRange -> {{-0.5, 0.5}, {0, 1}}];

Now you define f:

f[x_, y_, z_] := h[Sqrt[x^2 + z^2], y]

and, in the same way as above,

r[x_, y_] := Solve[f[x, y, z] == 0, z][[2, 1, 2]],

and now you may plot (part of) the surface of revolution:

Plot3D[r[x, y], {x, -0.5, 0.5}, {y, 0, 0.85}]

This will yield one part of the surface above the x-axis, since you must 
be careful with the limits in the iterators so as to avoid invalid 
values, and so on.

Tomas Garza
Mexico City

"tom" <tgarshol at wrote:

  • Prev by Date: Re: Vertical Tangents
  • Next by Date: Re: better copied graphics
  • Previous by thread: RE: a newbie problem with 3d graphing
  • Next by thread: EnhancedRationalPlot