# Problem with the smoothing of straight line

**URL:** https://forum.kirupa.com/t/problem-with-the-smoothing-of-straight-line/307516
**Category:** flash
**Created:** [April 5, 2010, 7:04am UTC](https://forum.kirupa.com/t/problem-with-the-smoothing-of-straight-line/307516 "2010-04-05T07:04:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Paul21](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@Paul21](https://forum.kirupa.com/u/Paul21)
#### Post date: [April 5, 2010, 7:04am UTC](https://forum.kirupa.com/t/problem-with-the-smoothing-of-straight-line/307516/1 "2010-04-05T07:04:21Z")

</div>

Hello.  
I have a problem with drawing line on AS. See image below.

```auto
var temp:Sprite = new Sprite();
var xP:Number;
var yP:Number;
var g:Graphics = temp.graphics;
temp.x = stage.stageWidth / 2;
temp.y = stage.stageHeight / 2;
g.lineStyle(1,0,1);

for(var phi:Number = -Math.PI/2; phi <= Math.PI/2;phi += 0.1)
{
   g.moveTo(0,0);
   xP=200*Math.cos(phi);
   yP=200*Math.sin(phi);
   g.lineTo(xP,yP);
}

addChild(temp);

```

Whether it is possible to receive the same image as in Canvas (JavaScript)?  
Maybe someone knows, what algorithm is used in Canvas for drawing of a straight line?  
Thanks in advance.
