You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I feel as though I am missing something fundamental here, that some existing component already serves this purpose and I don't know it.
Is there a reason that quadratic Bezier curves are not explicitly supported by this library? The BezierCurve2 class explicitly excludes them, likely due to not having a valid result for GetThirdDerivative(double t). I see three potential solutions to this:
BezierCurve2 is modified to automatically convert quadratic bezier curves to cubic ones by calculating control point 1, which can be done as follows:
QuadraticBezierCurve2 is added and its implementation of GetThirdDerivative(t) always returns double.NaN.
BezierCurve2 is modified to natively support quadratic bezier curves, but the boolean property isQuadratic is added, and GetThirdDerivative(t) returns double.NaN when the curve is quadratic.
The text was updated successfully, but these errors were encountered:
The curve classes were added to support various projects I was working on at different times, and I guess I didn't have a need for quadratic Bezier curves. So that's why it's not supported. Your solutions seem plausible but I am not going to implement them, feel free to submit a PR.
Disclaimer: I feel as though I am missing something fundamental here, that some existing component already serves this purpose and I don't know it.
Is there a reason that quadratic Bezier curves are not explicitly supported by this library? The
BezierCurve2
class explicitly excludes them, likely due to not having a valid result forGetThirdDerivative(double t)
. I see three potential solutions to this:BezierCurve2
is modified to automatically convert quadratic bezier curves to cubic ones by calculating control point 1, which can be done as follows:QuadraticBezierCurve2
is added and its implementation ofGetThirdDerivative(t)
always returnsdouble.NaN
.BezierCurve2
is modified to natively support quadratic bezier curves, but the boolean propertyisQuadratic
is added, and GetThirdDerivative(t) returnsdouble.NaN
when the curve is quadratic.The text was updated successfully, but these errors were encountered: