I am new in using Processing and, also, new asking something here
I hope that will get some help here and solve my problem.
There is an equation of elliptic curve that I would like to draw using Processing.
I wrote a code that calculates some points that belong to the curve, but I didn’t have any success in connecting them.
Here is my code:
} // end of setup() function
// drawing elliptic curve y^2=x^3+7
//drawing Cartesian coordinate system
// the starting point; zero point of elliptic curve
for(int i=1;i<width/2;i++) // translation of points
// coordinates of the center of ellipse
// drawing ellipse
}// end of for loop
}// end of draw() function
I draw a Cartesian coordinate system and points and ellipses that follow the shape of the given curve. I wanted, as I said, to connect them. The first idea was to save values that I’ve got in array of PVector and then to use those values to connect them using curveVertex. I couldn’t do that.
Please edit your post and add tripple back thicks before and after your code block: ``` as this will format your code properly here in the forum. Not doing this affects your original code format and some characters are removed from your original code.
You can use arrays to store the x and y coordinates. You can also use an array of vectors or you can use a dynamic size array of vectors by using an ArrayList. For example: