Exponential sine wave
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Exponential sine wave

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    2

    Exponential sine wave

    Hello!

    With this code I can draw a simple sine wave on the stage:



    Code:
    var frequency:Number = 5;
    var axisY:Number = stage.stageHeight*.5;
    var amplitudeMultiplier:Number = 32;
    
    graphics.lineStyle(2);
    graphics.moveTo(0, axisY);
    
    for (var i:uint = 0; i <= stage.stageWidth; i++) {
    	var amplitude:Number = Math.sin(frequency * Math.PI*2 * i/stage.stageWidth);
    	graphics.lineTo(i, axisY - amplitude*amplitudeMultiplier);
    }
    But... I want to draw a exponential sine wave, like this:



    I think the Math.exp()-function can be useful. Please, help!

    Thanks already!

  2. #2
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    756
    some dude made this one.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com