MathGroup Archive 2008

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

Search the Archive

Weird Problem with Plot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89861] Weird Problem with Plot3D
  • From: Aaron Fude <aaronfude at gmail.com>
  • Date: Mon, 23 Jun 2008 02:46:39 -0400 (EDT)

Hi,

I have a complicated function that I am plotting and I am encountering
a weird problem. When I plot a function by itself, it looks OK, but in
combination with another (f(x, y)=100) it shows defects around z=0.
The full code is below.

Thanks!

Subscript[K, 1] = 1;
Subscript[K, 2] = 10;
g = 1;
Subscript[H, 1] = 10;
Subscript[H, 2] = 10;
k = 0.001;

Subscript[\[CapitalDelta], 1][c_, k_] := c^2/Subscript[K, 1]^2 - 1;
Subscript[\[CapitalGamma], 1][c_, k_] := g/(k*Subscript[K, 1]^2);
Subscript[U, 1][c_, k_] :=
  Subscript[\[CapitalGamma], 1][c, k]^2 -
   4*Subscript[\[CapitalDelta], 1][c, k];
Subscript[Q, 1][c_, k_] := Sqrt[Subscript[U, 1][c, k]];
Subscript[A, 1][c_, k_] :=
  1/2 k*Subscript[Q, 1][c, k]*Subscript[H, 1];
Subscript[\[CapitalDelta], 2][c_, k_] := c^2/Subscript[K, 2]^2 - 1;
Subscript[\[CapitalGamma], 2][c_, k_] := g/(k*Subscript[K, 2]^2);
Subscript[U, 2][c_, k_] :=
  Subscript[\[CapitalGamma], 2][c, k]^2 -
   4*Subscript[\[CapitalDelta], 2][c, k];
Subscript[Q, 2][c_, k_] := Sqrt[Subscript[U, 2][c, k]];
Subscript[A, 2][c_, k_] :=
  1/2 k*Subscript[Q, 2][c, k]*Subscript[H, 2];

fh[c_, k_] :=
  Subscript[\[CapitalDelta], 1][c, k]*
    Tanh[Subscript[A, 1][c, k]]*(Subscript[Q, 2][c, k] +
      Subscript[\[CapitalGamma], 2][c, k]*
       Tanh[Subscript[A, 2][c, k]]) +
   Subscript[\[CapitalDelta], 2][c, k]*
    Tanh[Subscript[A, 2][c, k]]*(Subscript[Q, 1][c, k] -
      Subscript[\[CapitalGamma], 1][c, k]*
       Tanh[Subscript[A, 1][c, k]]);
a = Plot3D[100, {x, 0, 4}, {k, 0.0001, 0.001},
   ColorFunction -> Function[{x, y, z}, RGBColor[1, 1, 1, .2]],
   Mesh -> None, PlotRange -> {-100, 200}];
b = Plot3D[fh[x, k], {x, 0, 4}, {k, 0.0001, 0.001},
   ColorFunction -> Function[{x, y, z}, RGBColor[.5, .5, .5, 1]],
   PlotRange -> {-100, 200}];
Show[b]
Show[a, b]


  • Prev by Date: Re: Re: Re: Footnote numbers
  • Next by Date: Speech synthesis in Mathematica 6
  • Previous by thread: Initialization of a dynamic module
  • Next by thread: Speech synthesis in Mathematica 6