"Plotting" an equation I have an equation like
$$
(x - a)^2 + (y - b)^2 = r^2
$$
that represents a circle.
I need to "plot" it very basically with a programming language. Computer graphics coordinate generally use the "lower-right" quadrant of a Cartesian plane (0, 0 being top left).
I want my circle to have its center in (200, 200) and a radius of, say, 100. All measures given in pixels.
I need to do this step by step, within a loop. So, if the loop is 100 times, i need to know at each iteration at what x and y coordinate to draw a pixel. How to this? With my center and radius, the above equation is like this
$$
(x - 200)^2 + (y - 200)^2 = 1000
$$
but still I can't figure out how to express any "advancement" of my virtual plotting device. Thanks
EDIT
My question specifically asked for the equation of a circle, but it was just an example. I have the same problem with parabolas, sins...
 A: Any reasonably correct method of plotting involves interval arithmetic. At a very rough level, it involves keeping track, for a given resolution, of intervals in which no pixel is part of the plot, intervals in which every pixel is, intervals yet to be analysed, and so on, updating and colouring pixels only when sure.
You can read this very readable paper:


*

*Jeff Tupper, Reliable Two-Dimensional Graphing Methods for Mathematical Formulae with Two Free Variables, SIGGRAPH 2001


Tupper is the author of the program GrafEq which when I used it many years ago impressed me by getting graphs correctly that most other graphing programs would have trouble with. (See e.g. its rogue's gallery. or other links on the site.) It's a very nice paper. There have presumably been improvements since 2001, but it's shocking how many graphers even today don't even do as much as this paper describes clearly.
A: Midpoint circle algorithm
A: I got it working this way:
loop i := 1..N
  i := i * 2π / N
  x = center_x + (radius * cos(i - rotation))
  y = center_x + (radius * sin(i - rotation))

A: If you want to plot curves given by generic equations $f(x,y)=0$, for which you cannot express $y$ as a function of $x$ or vice-versa, see One algorithm for drawing graph of implicit function.
A: Just find y as a function of x or x as a function of y manually. Then write a loop. For example if your equation is $ x = \sqrt{y}$ write a loop that finds x for each y and then plots it. This strategy usually works poorly for computer programs (simply because x and y can take up only discrete values and that finding one variable as a function of other might not be a simple task). That is why for plotting each there are usually specific algorithms, like bressenham for lines, midpoint circle algorithm for circles etc.

for y = 1 to 100
   x = sqrt(y)
   plot((int)x,y)

