#include <stdio.h>
#include <math.h>
#include "svg.h"

int main(void) {
    int c = 20, r = 50;
    double dt = 3.1, theta, tmp = 1.0 / c / 2 / M_PI;
    
    start();
    rulers();
    
    stroke(rgb1(0,0,1));
    noFill();
    translate(WIDTH/2, HEIGHT/2);

    beginShape();
    for(theta = 0.0; theta < c * 2 * M_PI; theta += M_PI / dt) {
        double x =   r * theta * tmp * cos(theta);
        double y = - r * theta * tmp * sin(theta);
        vertex(x,y);
    }
    endShape(OPEN);

    finish();
    return 0;
}
