Hi Karim,
   Andreas Weber wrote some classes to handle this - try here:

http://motiondraw.com/blog/index.php?s=catmullromspline

Cheers,
   Ian

On 8/13/07, Karim Beyrouti <[EMAIL PROTECTED]> wrote:
>
> Hi all...
>
> I am struggling a little drawing curves in flash. Say I have 25 randomish
> points , and would like to join them up with a nice smooth curve. How
> would
> I calculate the control points for the curve?...
>
> Here is a code sample:
>
> <code>
>
> numberOfPoints = 25;
> xSpacing = Stage.width / numberOfPoints;
> this.lineStyle( 5, 0x000000, 100);
>
> for ( var c = 0 ; c < numberOfPoints ; c ++ ) {
>         yPos = Math.floor(Math.random() * (Stage.height + 1)) + 1;
>         xPos = xSpacing * c;
>         this.lineTo( xPos, yPos  );
> }
> stop();
>
> </code>
>
>
>
> Kind regards
>
>
>
>
> Karim
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to