Draw from equation

160 views Asked by At

I am creating GeoGebra clone for my school project in Java and I wonder, is it better to draw each point from equation or just find out what kind of equation it is (eg. line, circle,...) and then draw using built-in Java functions? And if it is better to draw point by point how to find those points? I mean I could search through all possibilities on limited plane, but that is uneffective, also I could simplify the equation for y and work from there, but how to simplify? Thanks for answers and Merry Coding Christmas! George

1

There are 1 answers

1
Salix alba On

One thing you want to take account of is scaling the canvas, so you can easily zoom in and out of your scene. It far easier to store the appropriate geometric object and have separate code to render the geometry.

Drawing good lines and circles have many issues like anti-aliasing so I would say it better to use the java routines for these.