I would like to know how to join point together to form a curve. I have 20 points in a diagram and would like to know how to join to them. I tried with GeneralPath object, but would like to know if there is a better way?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To build a curve, and not just lines, you can use method of
GeneralPathwhich creates Bezier curve. But to calculate control points
x1, y1, x2, y2you need to put some maths, or download some interpolation library.Also you can check this question, it has a links to source code implementing some interpolation algorithms.