Re: ContourPlot in arbitrary shape domain.

*To*: mathgroup at smc.vnet.net*Subject*: [mg21881] Re: [mg21815] ContourPlot in arbitrary shape domain.*From*: Hartmut Wolf <hwolf at debis.com>*Date*: Wed, 2 Feb 2000 22:54:36 -0500 (EST)*Organization*: debis Systemhaus*References*: <200001300846.DAA08641@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Roberto Brambilla schrieb: > > Hello! > > Sometimes I've to contour plotting a f(x,y) function on a > domain other than rectangular (ring, L,U,T-shapes, multiconnected > regions,etc.). An obvious solution is to subdivide the domain in > rectangles and to paste all the relative contourplots by some > external graphical program (or real scissors). > Heavy work and poor results. > There are not tricks or packages to improve ContourPlot[] function > extending its use to regions defined by a set of equations ? > I'd like something as > > ContourPlot[f[x,y],< set of xy-region specifications>] > Dear Roberto, In Tom Wickham-Jones book "Mathematica Graphics" (http://www.amazon.com/exec/obidos/ASIN/0387940472) you'll find in 13.3 Constraining Contour Plots some explanations to the function ConstrainedContourPlot[-function-,-constraint-,{x,x1,x2},{y,y2,y2}] You get the function with the package at http://www.mathsource.com/Content/Enhancements/Graphics/3D/0208-976 You can use it if you can express your shapes as a constraint function e.g. as f[x,y] < 0 for all points of your L, U, and Ts. The function gives the Contours, yet not the shading. For that you must extend the clipping function to Polygons. You can use part of the code, but the extension is not trivial. (Perhaps it's easier to post process the output of that function i.e. fill in your own shading.) Kind regards, Hartmut