Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: Contour fitting

> > I'm happy to do the legwork, but am having trouble finding where the
> > relevant areas of code are. I'd really appreciate an overview of the
> > contour labelling algorithm and event structure, and also a description
> > of how the current contour fitting algorithm works.
> 
> Actually, contours are composed of straight lines across
> each grid box. Say it is drawing the "10" contour. It finds
> two adjacent grid points above and below the value 10, then
> find the point on the connecting edge where the grid point
> values interpolate to 10. There must be 2 (or 4) edges with
> such interpolated 10 points in a grid box, and a straight
> line is drawn between them (2 straight lines for 4 points).

No worries. I had done some Googling, and this grid method for finding
contour edges seems to be fairly common. I suppose improvements would
come from finer grids, and more complex line-drawing. 

I'll do this as a data renderer for now, and if I'm successful I'll post
back.

Thanks for the pointers,
-Tennessee


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690