I need to create a random curve like this:
In this picture there are 3 examples, marked as follows:
I only can use Point because after making one of these I need to create another small curve for each of the Point in previous curve. I tried with sin function or cos function but it work sonly if x or y point is the same for both start and end point.
Does anyone know how it's possible to this with Graphics2D and Point?
You should use Bezier Curves.
If you to have a y-value for each x-value on your curve, then you could take a look at the apache commons implementation. What you get here is a PolynomialSplineFunction, which you can use to calculate any point on your curve.
SplineInterpolator interpolator = new SplineInterpolator();
PolynomialSplineFunction f
= interpolator.interpolate(xValues, yValues); //red and blue dots
f.value(4.0); //gets y-value for x = 4.0