ContourPlot: non-rectangular domains?

• To: mathgroup at smc.vnet.net
• Subject: [mg16907] ContourPlot: non-rectangular domains?
• From: "David P. Johnson" <johnson at ae.msstate.edu>
• Date: Tue, 6 Apr 1999 01:27:34 -0400
• Organization: Mississippi State University
• Sender: owner-wri-mathgroup at wolfram.com

```I used Maple some before settling on Mathematica. Although, Maple is
not as well suited to my needs, it did have one extremely nifty
feature. You could make 3D and contour plots with non-rectangular
domains. This was accomplished by allowing the second range to be a
function of the first variable. For instance, in Mathematica syntax,
this would translate into something like the following:

In[1]:= ContourPlot[x Sin[x] - Cos[y],
{x,-2,2},{y,x,2 x}]

which would result in a triangluar domain, or:

In[2]:= Plot3D[x Sin[x] - Cos[y],
{x,-2,2},{y,0,Sqrt[2^2-x^2]}]

which would result in a semi-circular domain. More complex domains
could be constructed by viewing results from several sub-domains.

This was very useful when, for instance, I taught Elasticity. I could
plot the stresses in a body inside a domain shaped like the body. For
instance, a circular torsion bar with a semi-circular keyway cutout.
The resulting plots were very powerful vusualization tools.

I have not been able to get Mathematica to duplicate this capability.
Is there a simple way?

--
David
->(Signature continues here)

```

• Prev by Date: Re: Eigenvalue Problem
• Next by Date: Re: Help: Debuging Functions in Mathematica
• Previous by thread: Re: Curve Fitting w/ Parametric Equations
• Next by thread: Re: ContourPlot: non-rectangular domains?