4 ms·
What does "topology" mean in this context? I was guessing it meant something like the z-index of different shape layers, which wouldn't pose a problem for font
by anentropic 6y ago
What does "topology" mean in this context?
I was guessing it meant something like the z-index of different shape layers, which wouldn't pose a problem for font generation
- webmaven 6y ago> What does "topology" mean in this context? Some letterforms are not topologically equivalent and cannot be transformed into each other. For a simple example, lower case 'g' has a form in some fonts that is a loop with a descender, and in other fonts a 'two story' form where the descender connects to a lower loop.
- enriquto 6y ago> Some letterforms are not topologically equivalent and cannot be transformed into each other. But this does not seem like a fundamental limitation, just a temporary implementation detail. If you represent shapes implicitly using a condition like "u(x,y)>0", then there's no topology changes involved and you can dance between all the letters just by changing smoothly the values of u.
- gugagore 6y agoWonderful 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.
- anentropic 6y agoah I see, thanks
- andybak 6y agoBut any shape can be made (almost) visually identical to another shape without changing the topology. For example a C can become an O if the gap becomes arbitrarily small.