> I am asking you to do some performance analysis. Specifically, would
> you please profile a curve and a straight segment to compare?
Sure, here is the average of 1 million iteration of computing shortest
distance from a point to both types of curves and line segments:
(using -O3 optimization, measured using chrono library)
A) Line Segment: ~0.32 microseconds
B) Conic Bezier: ~1.08
microseconds
C) Cubic
Bezier: ~1.25
microseconds
[I have also attached the gprof output in case you are interested. Note
that the gprof output is without any compiler optimization]
> We need to know if it is worth simply splitting the curve into a large
> number of straight segments. How many straight segments we can afford
> and still beat the exact solution.
In my opinion it's not worth splitting the curves into line segments.
But if there is a way to not check each and every line segment, then
it might be worth giving it a try.
>
Sure, but please use your dedicated branch.
Yes, I will do that.
Anuj