On Mon, Jun 15, 2020 at 9:47 AM Alexei Podtelezhnikov <[email protected]> wrote:
> On Mon, Jun 15, 2020 at 11:03 AM Anuj Verma <[email protected]> wrote: > >> > > > For linear segments, it will save more than 90% according to your > > > table. Then you will see that splitting Bezier curves is not such a > > > bad option. In general, Bezier curves are used in graphics because it > > > is easy to split and flatten them. I would be very surprised if > > > distance fields were different in this regard? > > > > Well, I'm not much familiar with the rendering part of bezier curve. > > This primer is fun to read with many interactive demos: > https://pomax.github.io/bezierinfo/ > The main thing to recognize is that splitting a Bezier at t=0.5 and > calculating the new set of control points for the halfs is lightning > fast. If you continue doing so, the segments very quickly converge to > almost straight (flat) segments. > Alexei, I find your suggestion deeply offensive. Have you looked at his code? You should. You will learn a few things about writing good code. This is the kind of toxic behavior that has been deeply bothering me on this list but I couldn't fully understand and verbalize. I'm getting closer to that now. I will start a new thread when I can write that down. In the meantime I think you should apologize to Anuj. https://www.businessinsider.com/cond-nast-assistant-quit-ceo-gave-her-elements-of-style-2020-6 > > In distance fields I'm just concerned about finding the shortest > distance as accurate and as fast as possible. > > Each split decreases deviation 4 times for a conic segment so that you > can reach a given accuracy of your distance field and use only > straight segments. The accuracy is defined by the grid resolution: it > won't be visible to a human eye if the approximation deviates from a > true curve by more than ~0.1 of the grid size. > > -- behdad http://behdad.org/
