Processing JS

Out of context: Reply #2

  • Started
  • Last post
  • 15 Responses
  • stewdio0

    Here's another. It's like a colorful moire pattern radar. Just copy this code and paste it into the code box (replacing what's already there) on the Processing JS page : http://processingjs.org/learning…

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    var r = 600;
    var d = 0;
    var h = 0;

    void setup()
    {
    size( 250, 250 );
    frameRate( 60 );
    strokeWeight( 1 );
    colorMode( HSB, 359 );
    background( 0, 0, 0 );
    };

    void draw()
    {
    background( 0, 0, 0, 10 );
    stroke( h, 359, 359 );
    x = ( width / 2 ) + Math.cos( radians(d) ) * r;
    y = ( height / 2 ) + Math.sin( radians(d) ) * r;
    line( width/2, height/2, x, y );
    d += 2;
    h ++;
    };

View thread