Re: How does contour work?
- From: fburton@xxxxxxx (Francis Burton)
- Date: 30 Nov 2007 18:42:35 GMT
In article <546179d3-e2f7-407b-a475-1d4f0a43f2ec@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Rune Allnor <allnor@xxxxxxxxxxxx> wrote:
Is the source code of the low-level routine published
anywhere? Is it an implementation of an existing algorithm
(e.g. TOMS)? (Presumably if it's simple enough to describe in
the documentation, no great secrets would be revealed by
listing the code.)
Contouring is not at all difficult -- in principle. In practice,
one needs a somewhat elaborate edge detection engine.
You need to use some rather clever tricks if you want that
sort of thing to run fast, which may be one reason for
not handing out the code.
Following contour lines used to be done to optimize pen plotter
movements (minimize pen ups and downs), and otherwise extremely
simply algorithms were complicated by the code to do that. MATLAB
doesn't support pen plotters now afaik, though it retains
contour-following logic presumably in order to be able to return
the contour info as a matrix of graphics objects (lines or
patches).
Without contour-following, the algorithm is simple enough to be
able to generate many hundreds or thousands of contour plots a
second from a 20x20 Z matrix, I would expect. Following might not
slow it down that much, actually.
I guess the essential design detail, mentioned in "The Contouring
Algorithm", is that it does linear interpolation on a rectangular
grid (rather than linear on triangular, bicubic on rectangular,
or higher order interpolation).
Francis
.
- References:
- How does contour work?
- From: DC Lee
- Re: How does contour work?
- From: John D'Errico
- Re: How does contour work?
- From: Francis Burton
- Re: How does contour work?
- From: Rune Allnor
- How does contour work?
- Prev by Date: Re: Off-topic - how to implement x=a\b in C++?
- Next by Date: Re: Simple Question about extracting certain values from a matrix
- Previous by thread: Re: How does contour work?
- Next by thread: Re: How does contour work?
- Index(es):
Relevant Pages
|