Creating a spiral Fibbonacci curve

/*
spiralFibonacci.mel v1.0                                                 
                                                                        
Author: Nate Lang                                                   
web: natelang3d.com

Install: Copy this file into a mel shelf button.

Use:
Creates a fibonacci spiral based on the golden ratio.
*/

//CONSTANTS
//-------------------------------------
//golden ratio
//phi = (1+(5^.5)/2);
float $phi = 1.6180;
//napier's constant
float $e = 2.7182;
//mmmmm pie
float $pi = 3.14159;
// lambda .4812 = ln(phi)
float $lambda = ((2/$pi) * .4812);
//omega = angle in degrees from 0
//use this to incrament to next position
float $degrees = 1;

//USER ADJUSTMENTS
//-------------------------------------
//user controled the initial start radius of spiral
float $radius = .05;
//number of points you wish to generate
int $numOfPoints = 50;

//Create Curve
//-------------------------------------
string $baseCurveName = `curve -degree 1 -point 0 0 0  -point 0 5 0 -point 0 10 0`;
string $newCurveName[] = `rebuildCurve -degree 3 -ch off -replaceOriginal false -spans ($numOfPoints-3) -name "fiboCurve#" $baseCurveName`;
string $shapeName[] = `listRelatives -children ($newCurveName)`;
delete $baseCurveName;

//Move points into correct locations
//-------------------------------------
for ($i = 0; $i<$numOfPoints; $i++)
{
    float $xCoord = $radius*(cos($degrees))*(pow($e,($lambda*$degrees)));
    float $yCoord = $radius*(sin($degrees))*(pow($e,($lambda*$degrees)));
    //print ("xCoord: "+$xCoord+"\n");
    //print ("yCoord: "+$xCoord+"\n");
    setAttr ($shapeName[0] + ".controlPoints[" + $i + "].xValue") $xCoord;
    setAttr ($shapeName[0] + ".controlPoints[" + $i + "].yValue") $yCoord;

    //increment by 10 degrees per step
    $degrees += 1;
}