What mathematical formula does Blender use to calculate Bezier paths?
For each segment of the path between two control points, it approximates a cubic Bezier curve:
where P0 and P3 are the control points and P1 and P2 are the handles.
Even though this isn't a question about Blender's code exactly, linking to Blender's code for calculating cubic bezier curves may help understanding.
- 2D masks can also use a different (more straightforward but slower) method where you can get any point on along the spline using a factor:
BKE_mask_point_segment_co(trivial to adapt for 3D curves too).
- 3D curves use an optimized (less straightforward), fixed step, subdivision method:
To see how this method works, see wikipedia's description of Higher order curves