Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2014

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

Search the Archive

Re: Help!

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132552] Re: Help!
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Fri, 11 Apr 2014 02:09:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20140410070757.C6C146A0F@smc.vnet.net>

It is not clear to me what you want, but here are several views of the
intersection.


SetOptions[ContourPlot3D,
  PlotPoints -> 100,
  PlotRange -> Automatic,
  Boxed -> False,
  Axes -> False,
  ImageSize -> 300];


param = {x, a, b} /.
  Solve[{x^3 + x a + b == 0, a + 3 x^2 == 0},
    {a, b}][[1]]


{x, -3*x^2, 2*x^3}


pp = ParametricPlot3D[
   param,
   {x, -3.2, 3.2},
   PlotPoints -> 100,
   PlotStyle ->
    Directive[Red, AbsoluteThickness[4]]];


{{cp1 = ContourPlot3D[
     x^3 + x a + b == 0,
     {x, -3.2, 3.2},
     {a, -3.2, 3.2},
     {b, -3.2, 3.2},
     MeshFunctions ->
      {Function[{x, a, b},
        a + 3 x^2]},
     Mesh -> {{0}},
     MeshStyle -> Thick],
   cp2 = ContourPlot3D[
     a + 3 x^2 == 0,
     {x, -3.2, 3.2},
     {a, -3.2, 3.2},
     {b, -3.2, 3.2},
     MeshFunctions ->
      {Function[{x, a, b},
        x^3 + x a + b]},
     Mesh -> {{0}},
     MeshStyle -> Thick]},
  {Show[cp3 = ContourPlot3D[
      x^3 + x a + b == 0,
      {x, -3.2, 3.2},
      {a, -3.2, 3.2},
      {b, -3.2, 3.2},
      Mesh -> None,
      RegionFunction ->
       Function[{x, a, b},
        a + 3 x^2 < 0]], pp],
   Show[cp4 = ContourPlot3D[
      a + 3 x^2 == 0,
      {x, -3.2, 3.2},
      {a, -3.2, 3.2},
      {b, -3.2, 3.2},
      Mesh -> None,
      RegionFunction ->
       Function[{x, a, b},
        x^3 + x a + b < 0]], pp]},
  {Show[cp1, cp2, pp],
   Show[cp3, cp4, pp]}} //
 Grid



Bob Hanlon




On Thu, Apr 10, 2014 at 3:07 AM, =E6=9E=97=E9=9A=BD <jlin at ynao.ac.cn> wrote:

>
> Could anybody teach me how to shade the region surrounded by the curve
> plotted by the code below? The curve is determined by the intersection of
> two 3D curves, x^3 + x a + b == 0, and a + 3 x^2==0.
>
> Thanks a lot!
>
> Jun
>
>
> Mathematica cade:
>
> ContourPlot3D[
>   x^3 + x a + b == 0, {x, -3.2, 3.2}, {a, -3.2, 3.2}, {b, -3.2, 3.2},
>   MeshFunctions -> {Function[{x, a, b}, a + 3 x^2]}, Mesh -> {{0}},
>   ContourStyle -> None, PlotPoints -> 100, Boxed -> False,
>   Axes -> False] /. {x_Real, a_Real, b_Real} -> {3.1, a, b}
>
>
>
>
>
>




  • References:
    • Help!
      • From: 林隽 <jlin@ynao.ac.cn>
  • Prev by Date: Variables in ProbabilityDistribution have strange "scoping" mechanism
  • Next by Date: Re: Controlling breaking of lines in output of Write
  • Previous by thread: Help!
  • Next by thread: Runge-Kutta 2