Re: How does Mathematica create contour plots (or density plots)?

*To*: mathgroup at smc.vnet.net*Subject*: [mg112415] Re: How does Mathematica create contour plots (or density plots)?*From*: "David Park" <djmpark at comcast.net>*Date*: Wed, 15 Sep 2010 04:36:30 -0400 (EDT)

It would help to have a specific case, but you might try to use the MaxRecursion option instead of increasing PlotPoints too much. You might also try the PerformanceGoal option. Maybe you could compute the location of the peak before using graphics. David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: AES [mailto:siegman at stanford.edu] How does Mathematica create contour plots (or density plots)? More specifically, suppose I want a contour plot (with maybe 10 contour lines) or a density plot of a function that has just one primary peak located somewhere in an otherwise vast and featureless (i.e., flat) plane with value z=0. (Or maybe a narrow ridge running diagonally across the plane.) But: * I don't know in advance where this peak is -- or, it moves with time, and I want to make multiple plots and follow its motion. * The function it represents is somewhat costly to calculate. * And I'd like to get a moderately detailed (but maybe not super resolved) portrayal of the substructure within that peak. * And all this with reasonably fast response (e.g., inside a Manipulate). To obtain this, does Mathematica have to calculate a cast array of finely spaced pixel values covering the entire plane, then derive the contours from this? Or does it use some kind of smart algorithm that does a (random?) search for non-zero points, then rapidly homes in on areas of interest? Or, is there some way I can help it find the regions of interest?