I know that vector graphics engines use mathematical formulas to render figures. Suppose I have a curve, which I created using the pen tool on adobe illustrator. I know that the engine is doing something in the background with bezier curves to convert the anchor points and handles into the curve.
Now i use the options available to set a thickness for the path - something like 5 px. A region around the curve is filled with a colour. How does the engine know which region to colour?
I’m really curious about the mathematics behind vector graphics engines. Please do share any references (documentation maybe) that helps understand it, even if it isn’t helpful for answering this particular question. Thanks!
This is mostly just semi-educated guessing ... I don't work for Adobe.
As you say, the control points are used to construct cubic Bezier curves. Then, what happens next (I suspect) is that the Bezier curves are approximated by strings of straight lines, and some pretty low level graphics code draws the straight lines. Drawing straight lines (even fat anti-aliased ones) is a well understood problem. The basic classic line-drawing algorithm is Bresenham's. The modern standard is Xiaolin Wu's algorithm.