# Drawing math graphs

**URL:** <https://forum.kirupa.com/t/drawing-math-graphs/187819>\
**Category:** flash\
**Created:** [May 2, 2006, 4:05pm UTC](https://forum.kirupa.com/t/drawing-math-graphs/187819 "2006-05-02T16:05:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Olyalyu](https://avatars.discourse-cdn.com/v4/letter/o/aeb1de/32.png) [@Olyalyu](https://forum.kirupa.com/u/Olyalyu)\
**Post date:** [May 2, 2006, 4:05pm UTC](https://forum.kirupa.com/t/drawing-math-graphs/187819/1 "2006-05-02T16:05:54Z")

</div>

Hello,  
I need to create a falsh movie that will be able to draw a graph for some math functions (x^2, x^3 and etc.) and I’ve been having some problems:

1. I’v been trying to shift the coordinate system to the center of the stage by adding the shift value to the calculation output, but the graph still appears not centered:  
var x;  
var y;  
\_root.lineStyle(1, 0x0000FF, 100);  
\_root.moveTo(250,250);

2. The graph doesn’t look good as it is too small and I would like to magnify it, but when I multiply the output by 10 for example, the graph doesn’t look smooth any more.

I would greatly appreciate any help and suggestions.  
Mey be anyone knows where I can find some tutorial that would help me.
