# Drawing perfect circle using curveTo

**URL:** https://forum.kirupa.com/t/drawing-perfect-circle-using-curveto/281514
**Category:** flash
**Created:** [February 10, 2009, 5:39am UTC](https://forum.kirupa.com/t/drawing-perfect-circle-using-curveto/281514 "2009-02-10T05:39:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kernel\_flash](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kernel\_flash](https://forum.kirupa.com/u/kernel_flash)
#### Post date: [February 10, 2009, 5:39am UTC](https://forum.kirupa.com/t/drawing-perfect-circle-using-curveto/281514/1 "2009-02-10T05:39:26Z")

</div>

I have tried to draw a circle using drawing API curveTo function. But the result is not a perfect circle.  
Flash documents also suggest this method.  
[Check this link \>\>](http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00001494.html)  
This is the code I have used to make a circle of radius R and the registration point of circle movie clip is at the center.

```auto

this.createEmptyMovieClip("circle",this.getNextHighestDepth());
circle.lineStyle(1,0x0,100);
circle.moveTo(-R/2,0);
circle.curveTo(-R/2,-R/2,0,-R/2);
circle.curveTo(R/2,-R/2,R/2,0);
circle.curveTo(R/2,R/2,0,R/2);
cirvle.curveTo(-R/2,R/2,-R/2,0);

```

Let me know if there is any way of achieving a perfect circle using drawingAPI.
