# Circles on canvas

**URL:** <https://forum.kirupa.com/t/circles-on-canvas/329406>\
**Category:** Uncategorized\
**Created:** [August 23, 2012, 5:33pm UTC](https://forum.kirupa.com/t/circles-on-canvas/329406 "2012-08-23T17:33:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)\
**Post date:** [August 23, 2012, 5:33pm UTC](https://forum.kirupa.com/t/circles-on-canvas/329406/1 "2012-08-23T17:33:56Z")

</div>

hey - was looking fwd to kirupas tut - but it brings up a 404. Alas … \>  
I have a little Q re:canvas, and drawing multiple circles … and rendering them ::  
In my ‘render’ function which draws the objects on the stage … I am using the same code multiple times … And ps - i want to do this OUTSIDE of a for loop - cos when you use a for loop, as each object does different things.

```auto
stage.beginPath();    
stage.arc(ball.x, ball.y, radius, 0, 2 * Math.PI, false);
stage.fillStyle = "rgba(0,0,255,0.1)";
stage.fill();
stage.closePath();

```

is my code for a circle … but can i put this into a function and spit it out where it needs be, rather than duplicating as many times as i am … thanks!🥚
