Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: Bug in Plot3D?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105240] Re: [mg105217] Bug in Plot3D?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 25 Nov 2009 02:33:34 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Change your definitions for f and g to

f[x_, y_] := z /. Solve[ff[x, y, z] == a, z][[1]]

g[x_, y_] := z /. Solve[gg[x, y, z] == b, z][[1]]



Bob Hanlon

---- SixWingedSeraph <wellsoberlin at gmail.com> wrote: 

=============
The two plot commands in the notebook below should give identical
outputs, but they don't.  The notebook is posted at http://abstractmath.org/MM/MmaBugQ.nb

a := 9; b := 18;

ff[x_, y_, z_] := x + y + z

gg[x_, y_, z_] := 2*x - 2*y - z

f[x_, y_] := z /. Solve[ff[x, y, z] == a, z]

f[x, y]

g[x_, y_] := z /. Solve[gg[x, y, z] == b, z]

g[x, y]

Plot3D[{-x - y + 9, 2*(x - y - 9)}, {x, 6, 10}, {y, -5, 1},
   BoxRatios -> {4, 6, 24}, ViewPoint -> {4.5, 3, 20},
 MeshStyle -> Gray,
   AxesLabel -> {x, y, z}, PlotStyle -> {{Red, Opacity[0.7]},
       {Green, Opacity[0.7]}}, ColorFunction -> White]

Plot3D[{f[x, y], g[x, y]}, {x, 6, 10}, {y, -5, 1},
   BoxRatios -> {4, 6, 24}, ViewPoint -> {4.5, 3, 20},
 MeshStyle -> Gray,
   AxesLabel -> {x, y, z}, PlotStyle -> {{Red, Opacity[0.7]},
       {Green, Opacity[0.7]}}, ColorFunction -> White]




  • Prev by Date: Re: newbie q-n about FinancialData
  • Next by Date: Re: how to read in a number in hex and then get it in binary?
  • Previous by thread: Bug in Plot3D?
  • Next by thread: Re: Bug in Plot3D?