Re: ContourPlot: non-rectangular domains?
- To: mathgroup at smc.vnet.net
- Subject: [mg16936] Re: [mg16907] ContourPlot: non-rectangular domains?
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 8 Apr 1999 02:32:39 -0400
- Sender: owner-wri-mathgroup at wolfram.com
David Johnson wrote >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. >In[1]:= ContourPlot[x Sin[x] - Cos[y], {x,-2,2},{y,x,2 x}] > >I have not been able to get Mathematica to duplicate this capability. >Is there a simple way? It would be nice if Mathematica allowed iterators with variable limits in the plotting routines as is allowed in the integration routines. But so far it doesn't. I have sent a notebook to David Johnson showing one method for solving this problem. If others are interested they may contact me. Essentially what is necessary is to 1) Transform the variables so that y = (1+w)x. 2) Then the second iterator is {w, 0, 1} and has the require constant limits. 3) Plot the new function and convert the ContourGraphics to Graphics. 4) Transform all points by {x_, w_} -> {x, x(1+w)} and Show David Park djmp at earthlink.net http://home.earthlink.net/~djmp/.