Recursive subdivision is not the best way to flatten quadratic Béziers to polylines. Here's a better way: https://raphlinus.github.io/graphics/curves/2019/12/23/flatten-quadbez.html … . Hopefully catnip for my followers who are really into 2D graphics and math.
my instinct is to do this by dynamic programming instead, since you know the number of segments. locate endpoint of first segment assuming subsequent ones are chosen optimally. then work backwards by DP.
-
-
Yeah, that's what was going through my head a week or so ago. But this way, you have a closed form expression that just spits out all the t values in parallel for all the segments, which is *way* better if your evaluation environment is a GPU.
-
DP totally makes sense if you have an expensive preprocessing step and will then play that back many times. In fact, that's how fontcrunch works. But these days I'm more interested in getting near optimal results on the fly.
Kraj razgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.