Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9887 > unrolled thread
| Started by | Andrzej Kozlowski <akozlowski@gmail.com> |
|---|---|
| First post | 2012-04-30 08:45 +0000 |
| Last post | 2012-04-30 08:45 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Getting only 1 of 3 curves of intersection Andrzej Kozlowski <akozlowski@gmail.com> - 2012-04-30 08:45 +0000
| From | Andrzej Kozlowski <akozlowski@gmail.com> |
|---|---|
| Date | 2012-04-30 08:45 +0000 |
| Subject | Re: Getting only 1 of 3 curves of intersection |
| Message-ID | <jnljer$n66$1@smc.vnet.net> |
Try this:
g1 = Plot3D[Sin[x*y], {x, 0, Pi}, {y, 0, Pi}, PlotStyle -> None,
MeshStyle -> Red, Axes -> True, AxesLabel -> {"x", "y", "z"}];
g2 = Plot3D[Cos[x*y], {x, 0, Pi}, {y, 0, Pi}, Mesh -> None,
PlotStyle -> {Cyan, Opacity[.8]}];
sols1 = w /. Solve[Sin[w] == Cos[w] && 0 < w < Pi^2, w, Reals] // N;
sols2 = Flatten[Solve[{z == Sin[#], x y == #}, {y, z}] & /@ sols1,
1];
g3 = ParametricPlot3D[{x, y, z} /. sols2, {x, 0, Pi},
PlotStyle -> {Magenta, Thickness[.007]}];
Show[g1, g2, g3, Background -> LightYellow, ImageSize -> 500]
Andrzej Kozlowski
On 29 Apr 2012, at 08:09, Bill wrote:
> Hi:
>
> Consider the following plot:
>
>
g1=Plot3D[Sin[x*y],{x,0,Pi},{y,0,Pi},PlotStyle->None,MeshStyle->Red,Axes->True,AxesLabel->{"x","y","z"}];
>
g2=Plot3D[Cos[x*y],{x,0,Pi},{y,0,Pi},Mesh->None,PlotStyle->{Cyan,Opacity[.8]}];
> nsSol=NSolve[{z-Sin[x*y],z-Cos[x*y]},{y,z}];//Quiet
>
g3=ParametricPlot3D[{x,y,z}/.nsSol[[2]],{x,0,Pi},PlotStyle->{Magenta,Thickness[.007]}];
> Show[g1,g2,g3,Background->LightYellow,ImageSize->500]
>
> Using the above Mathematica 8.0.4 code, I can plot one curve of intersection shown in magenta.
> Within the plotted area, I can see 2 more places where intersection curves should be.
> I've tried using Reduce in place of NSolve, but can't get it to work.
>
> Question: If this can be done, can someone please give me the code?
>
>
> Thanks,
>
> Bill
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web