title: C how to draw a point / set a pixel without using graphics library or any other library functions
body: <p>I am trying to understand how I can draw a set of points (/set the pixels) that form a circle without using the library functions. </p>
  
  <p>Now, getting the (x,y) co-ordinates of the points given the radius is straightforward.</p>
  
  <pre><code>    for (x=-r; x &lt;r; x=x+0.1) {
           y = sqrt(r*r - x*x);
           draw(x,y, 0, 0);
       }
  </code></pre>
  
  <p>But once I have the points, how do you actually draw the circle is what is confusing to me. I can use the graphic library but I want to understand how you can do it without using the graphics library</p>
  
  <pre><code>    void draw(float x, float y, float center_x, float center_y) {
            //logic to set pixel given x, y and circle's center_x and center_y
            // basically print x and y on the screen say print as a dot .
            // u 'd need some sort of a 2d char array but how do you translate x and y
            // to pixel positions
      }
  </code></pre>
  
  <p>Could someone share any links/references or explain how this works?</p>