2
finncyr
7y

Anyone who knows a light and simple way to plot circles in C?

Comments
  • 1
    for(;i<2*PI;i+=0.1)
    point(sin(i)*10, cos(i)*10);

    Where point() is whatever function you use for displaying points
  • 0
    from my graphics file of last semester:

    arc (int x,y,stangle,endangle,r):draws an arc of radius starting from starting angle"stangle"

    to"endangle" (0 to 360).for eg:

    arc(25,50,0,360,20);//a circle of radius 20 at point 25,50 using an arc of angle 0 to 360

    arc(75,50,0,180,20);//an arc of angle 0 to 180`

    arc(125,50,180,0,20);//an arc of radius 180 to 0`(reverse of above arc)

    • circle(x,y,radius): similer to arc eg. 1

    circle(25,100,20);
  • 12
    circle with C?
    CCC
    C C
    CCC
  • 2
    @thoxx I C what you did there
  • 0
    search SO for code golf question?
  • 0
    Okay, wrongly asked question:

    The function is not my problem.

    How do I draw points inside a terminal window?
    Like with graphics.h under DOS but executable cross-plattform.
  • 1
    look up ncurses
Add Comment