I need to write a loop that goes from 0 to bits.length, and then inside the loop, I have to set two different colors using strokeStyle and fillStyle. Then use the arc function to create a circle at the current bit's x and y position, with the bit's radius (i.e. bits[I].x, bits[I].y and bits[I].radius). Last, use fill() to draw the filled circle and stroke() to draw the circle's outline. I am using the JavaScript language btw.
x: 100
y: 100
dir: 0
radius: 50
open: true
[code]
function drawBits(ctx)
{
//write a loop that goes from 0 to bits.length
// set strokeStyle and fillStyle on ctx to different colors
// use arc() to draw a circle at bits[I].x and bits[I].y with bits [I].radius as the radius
// call fill() and stroke() on ctx
}