Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #11431

Re: Topography contours

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: Topography contours
Date 2020-11-12 15:57 +0000
Organization A noiseless patient Spider
Message-ID <87eekyr2jt.fsf@bsb.me.uk> (permalink)
References <599350c8-0ae4-44eb-8a55-f533be181cc0n@googlegroups.com>

Show all headers | View raw


Malcolm McLean <malcolm.arthur.mclean@gmail.com> writes:

> If you have a topology in continuous space that you can sample to
> arbitrary resolution, both in space and in height, what is the best
> way of producing isomers (contour lines of equal height).

I've never heard of the called that before.  If you are searching, I
think contour lines will be more successful

There must be established algorithm for this and if you find one, please
post a link.

If you can assume your function is continuous and smooth, I thought you
could use partial derivatives to find the tangent of the contour at a
given point.  You could the move some small step in that direction and
try again.  But to stop errors piling up, you'd have to a search in the
neighbourhood of the end point for a close match to the starting value.

Given that, maybe just a search at each step is the best bet.  If the
function is smooth in relation to the step size you want to take, you
might get away with a binary search of the points on a circle of radius
r (the step size) away from the previous point, with the angles ranging
from -pi to +pi and 0 being "ahead" -- the direction of the last line
segment in the contour.  (It would be easier to describe with a
diagram!)

And you could, of course, make the step size dependent on how smooth
the function is in an particular neighbourhood.

-- 
Ben.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Topography contours Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-11-11 09:26 -0800
  Re: Topography contours Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-11-12 15:57 +0000
    Re: Topography contours Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-11-12 08:24 -0800
      Re: Topography contours Ben Bacarisse <ben.usenet@bsb.me.uk> - 2020-11-12 17:44 +0000
        Re: Topography contours Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2020-11-13 05:22 -0800

csiph-web