[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Contour plots
On Fri, 28 Jan 2005, Jeffrey A. Edlund wrote:
> The data come from simulations of populations of binaries white dwarf
> stars. I'm trying to plot the number of binary systems (z) in a given
> frequency range (x) and chirp mass range (y). I'm not quite sure how to
> answer your question about how curved the contours will be. Nothing
> really crazy I suppose.
>
That's pretty much what I was asking. :)
> I'd definitely be willing to do some programming to get this to work
> if I had some suggestions on the right way to approach this problem.
>
A few (definitely non-expert) ideas for numerical methods:
Interpolate the data with cubic spline patches to get a C^1 surface, then
- solve the level set equations algebraically.
- refine the data mesh (perhaps to 100x100?) using the spline patches,
then use piecewise-linear approximation to calculate contour points.
- Euler's method on J(grad f) -- find a point on the desired contour,
compute the gradient of the height function and rotate 1/4 turn,
follow for a short interval, and repeat until the contour returns to
its starting point or leaves the bounding box or...
I suspect there are more knowledgeable people subscribed to the list who
could suggest numerical methods that actually work. :)
> My thoughts: Ideally I'd like something that will autoselect contour
> levels that work well (while at the same time allowing the user to set
> specific levels). Also the contours need to be labeled in some way.
> Having an auto labeler would be nice.
>
Regarding implementation, presumably there'd be a "contour" class
containing the height of the contour, the position, orientation, and text
of the label, and linked lists of points representing the contour data
proper; and a "contour plot" class containing maximum and minimum heights,
the number of contours to plot and/or the specific heights, and a list of
contours...
--Andy
Andrew D. Hwang ahwang@mathcs.holycross.edu
Department of Math and CS http://math.holycross.edu/~ahwang
College of the Holy Cross (508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395 (508) 793-3530 (fax)