|
From: | Marcus G. Daniels |
Subject: | [Swarm-Modelling] Re: contour graph |
Date: | Sat, 22 Jul 2006 21:59:59 -0600 |
User-agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
Hi Sam,> i need a continuous contour sort of graph of densities in each cell of the grid...
> a line graph connecting cels of equal densities...What I'd suggest is to rescale and truncate the densities to integer group levels and then subset the points per those integer levels For example, if the densities were normalized between 0.0 and 1.0, then 0 < density <= 0.25 could be group 1, 0.25 < density <= 0.5 could be group 2, 0.5 < density <= 0.75 group 3, and 0.75 < density <= 1 group 4. Say the high density points were the ones of interest, then you'd only keep the x,y coordinates of those points in group 4.
Now using that list of coordinates of you can then compute a 2d convex hull / Delaunay triangulation to get the perimeter, and you can overlay contours at different densities by using different level sets. Here's a web page that illustrates some alternatives:
http://www.cse.unsw.edu.au/~lambert/java/3d/hull.htmlI see there is some Java source code for that demo available, but with some web searches I suspect you'll surely find other implementations.
Marcus
[Prev in Thread] | Current Thread | [Next in Thread] |