# Optimizing circle drawer

Meshulam Silk

Greenhorn

Posts: 22

posted 4 years ago

I'm making a game using a grid and I recently decided to make a circle drawer. After a bit of deep trig thinking I came up with a simple way to plot a circle:

I get the circle just fine I just wanted to know of there was a more efficient way to increment i instead of going through all the angles.

I came up with a this: i+=45/(radius-2)

I've tried it out and it seems to work pretty well for smaller circles but I think (haven't had a chance to test) it might screw up with bigger circles. Does anyone know of this is the most efficient incrementation (or if it's right)?

I get the circle just fine I just wanted to know of there was a more efficient way to increment i instead of going through all the angles.

I came up with a this: i+=45/(radius-2)

I've tried it out and it seems to work pretty well for smaller circles but I think (haven't had a chance to test) it might screw up with bigger circles. Does anyone know of this is the most efficient incrementation (or if it's right)?