On Tue, Jun 16, 2020 at 9:49 AM Alexei Podtelezhnikov <apodt...@gmail.com>
wrote:

> Anuj,
>
> Each curved segment has a large number of neighboring grid points.
> each of which has a unique nearest projection on the curve. The curve
> is naturally sampled by this projection points a very large number of
> times and quite uniformly. Therefore, why not divide the curve into a
> large number of  segments to begin with and then just find whatever
> point is close to each grid? It could be a lot faster to find the
> distance this way.
>

So... You subdivide the curves into lines.  Can you sketch what you do then?

I did think about "rasterizing" the outline and mark all pixels that have
distance < 1.0 to the outline, and then "propagate" the distance out.  But
as I've shown in my GLyphy talk, no matter how much I thought about this, I
found that there can be points far from the curve such that the closest
edge for this point is different from the closest edge for all its
neighboring pixels.  As such, the only way to use this optimization is if
each pixel kept a list of edges that are closest, within a range....  That
then suggests that just using a coarse grid is even better, hence what I
suggested.

-- 
behdad
http://behdad.org/

Reply via email to