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; 

 g2.draw(cubic);

and this is the output,

[IMG]http://img221.imageshack.us/img221/7728/exampletr0.png[/IMG]


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.

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...

Comments
very helpful
This question has already been answered. Start a new discussion instead.