// Drawing a set of radial lines using Trigonometry functions.
void setup() { size(500, 500); background(255); noLoop(); } // setup()
void draw() { int n = 50; float l = 200; float x1 = width/2, y1 = height/2; float x2, y2; float angle = 0.0; float delta = 2*PI/n; // Do n times for (int i = 1; i <= n; i = i + 1) { // draw a spoke x2 = x1 + l * cos(angle); y2 = y1 + l * sin(angle); line(x1, y1, x2, y2); angle = angle + delta; } } // draw()