this is the code that i managed to write after reading for a while.

CubicCurve2D cubic = new CubicCurve2D.Double (20.0, 200.0, 200.0,270.0, 30.0,30.0, 250.0, 170);
 Graphics2D g2 = (Graphics2D) g; 


and this is the output,


Now, like u have seen , everything works fine, i get my output and am happy, but there still exists doubt about which control point controls what area of the curve bcoz i completed this by trial and error . i have a vague idea but i need to be sure before i present it in front of the class.
So please help in explaining how the x1, y1 , y1,y2 etc points control the curve and how with respect to the co-ordinates i have used in my codes.

thanks for reading this post.

11 Years
Discussion Span
Last Post by livingsword

well, if you move control points far away from your original points, your curve bends more.

you can draw normal lines with the points that you use for cubicCurve, so that you can see both control points and how the curve bends

hope that helps...

Votes + Comments
very helpful
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.