Curve equation generated by QuadCurve2D in Java?

I drew a square curve using QuadCurve2d in java using start, end and one control points. Is there any way to find out the equation of this curve? The reason I need it is that at some point in this curve it can cross the circle, and I want to know their intersection point. So basically I want to solve two equations, but I don’t know the equation of the curve generated by QuadCurve2D. Any help would be used.

S relationships

+6
java swing
source share
3 answers

See the Javadoc for java.awt.geom.PathIterator , specifically the SEG_QUADTO field, which SEG_QUADTO control equation in terms of start, end, and control points.

+4
source share

Take a look at the Area class. Method

 public void intersect(Area rhs) { curves = new AreaOp.IntOp().calculate(this.curves, rhs.curves); invalidateBounds(); } 

You can examine the sources to understand how the intersection point is calculated.

0
source share

This function uses a quadratic Bezier curve:

quadratic bezier formula

You can find it on Wikipedia.

0
source share

All Articles