3 ms·
Wonderful example, and this is why signed-distance functions/fields (SDF) are used. The diagram in https://en.wikipedia.org/wiki/Level-set_method https://en.wik
by gugagore 6y ago
Wonderful example, and this is why signed-distance functions/fields (SDF) are used. The diagram in https://en.wikipedia.org/wiki/Level-set_method https://en.wikipedia.org/wiki/Level-set_method might help explain how such a representation can "uniformly" handle topology changes.
I'll excerpt:
> The advantage of the level-set model is that one can perform numerical computations involving curves and surfaces on a fixed Cartesian grid without having to parameterize these objects (this is called the Eulerian approach).[1] Also, the level-set method makes it very easy to follow shapes that change topology, for example, when a shape splits in two, develops holes, or the reverse of these operations. All these make the level-set method a great tool for modeling time-varying objects, like inflation of an airbag, or a drop of oil floating in water.
It is unclear to me what you mean by "implementation detail". In order for a SDF to be used in vector graphics, it must be represented symbolically (the alternative is to rasterize them, as what is implied by "level-set method", which means you must commit to a spatial resolution).
But I suspect you then have the same problem on your lap: how to take derivatives with respect to structural changes in your symbolic SDF?
This question reminds me a bit of https://news.ycombinator.com/item?id=19871207 https://news.ycombinator.com/item?id=19871207 discussing "Why are 2D vector graphics so much harder than 3D?"
- enriquto 6y ago> the alternative is to rasterize them, as what is implied by "level-set method", which means you must commit to a spatial resolution Rasterizing is alright, since then there are no structural changes, just independent pixel values. Notice that rasterizing the function does not commit you to an output resolution, you can always interpolate it at an arbitrarily high resolution for the rendering step.
- gugagore 6y agoSurely you can see that rasterizing defeats the purpose of a vector graphics representation.
- enriquto 6y agoNot really, why? An interpolated rasterization is a just a particular case of vector graphics representation. As long as the represented objects fit well in the rasterized distance field (of a fixed resolution), you can sample the level curve to an arbitrarily high resolution, just like any other kind of vector graphics.
- gugagore 6y agoYou can do that in the same way that you can upscale a raster image to arbitrarily high resolutions by interpolating. In my mind, it's not just that you can zoom into vector graphics without seeing pixels. It's also that you can make small adjustments to the input parameters. If you're talking about sampling a grid at resolutions on the order of ~floating point epsilon (seems akin to using fixed-point numbers for parameters), then I guess you have a point.