Look at how Dear ImGui implements Bezier rendering: AddBezierCubic. It uses not only number_of_segments but if it's not provided then CurveTessellationTol tessellation tolerance is used to calculate the right number of segments for bezier. The implementation looks very easy.
Look at how Dear ImGui implements Bezier rendering:
AddBezierCubic. It uses not only number_of_segments but if it's not provided thenCurveTessellationToltessellation tolerance is used to calculate the right number of segments for bezier. The implementation looks very easy.