Submit Browse Random
Anonymous Login RSS

SuperCollider Code

All (764) Code (64) Doc (175) Help (16) Quark (509) SCDoc ↗ Forum ↗ Google ↗
  1. RedMRCM Doc

    ... TALLED! See also: RedLTurtle , RedIFS , RedMandelbrot Description Plotting with Pen . After Flake - "The Computational Beauty of Nature". Class Methods . new Arguments: drawFunc A Function that draws something. matrices An array of arrays d ...

  2. 040-pendulum Doc

    //simple pendulum in a world with gravity ( var width= 300, height= 300, w, wgrav, world, n= 1, ploc; //--world w= RedWindow("pendulum test1", Rect(128, 64, width, height)).front; wgrav= RedVector2D[0, 0.98]; world= RedWorld(RedVector2D[wid ...

  3. 016-repulsive2 Doc

    ... ctor2D[0, 0], 1.5, 10) }.dup(n); //world,loc,vel,acc,mass,size //--loop w.draw{ Pen.strokeColor= Color.green; rep.loc= w.mouse; Pen.strokeRect(Rect.aboutRedObject2D(rep)); Pen.strokeColor= Color.white; world.objects.do{|o| if(o!=rep, { o.ad ...

  4. 045-pendulum4 Doc

    //a few pendulums that attract eachother ( var width= 300, height= 300, w, wgrav, world, n= 18, ploc; //--world w= RedWindow("pendulum test3", Rect(128, 64, width, height)).front; wgrav= RedVector2D[0, 0.98]; world= RedWorld(RedVector2D[wid ...

  5. 048-pendulums-linked Doc

    //linked pendulums ( var width= 300, height= 300, w, wgrav, world, n= 5, ploc; //--world w= RedWindow("linked pendulums", Rect(128, 64, width, height)).front; wgrav= RedVector2D[0, 0.98]; world= RedWorld(RedVector2D[width, height], wgrav, 2 ...

  6. 265-janus_bunch_clocks Doc

    ... i-1), world.objects.wrapAt(i+1)); }; world.objects.do{|o| o.update}; //--render Pen.width= 5; Pen.strokeColor= Color.black; Pen.fillColor= Color.white; world.objects.do{|o| var p, x, y; p= o.loc.asPoint; Pen.addOval(Rect.aboutPoint(p, o.siz ...

  7. 173-springs_soda Doc

    ... r.notNil, { over.loc= w.mouse; }); sprs.do{|spr| spr.update; //--render springs Pen.strokeColor= Color.grey; Pen.line(spr.object.loc.asPoint, spr.target.loc.asPoint); Pen.stroke; }; world.objects.do{|obj, i| obj.addForce(world.gravity); //w ...

  8. 041-pendulum2 Doc

    //many pendulums in a world with gravity ( var width= 300, height= 300, w, wgrav, world, n= 50, ploc; //--world w= RedWindow("pendulum test2", Rect(128, 64, width, height)).front; wgrav= RedVector2D[0, 0.98]; world= RedWorld3(RedVector2D[wi ...

  9. 017-repulsive3 Doc

    ... 0.001))*0.5+0.5*width, cos(w.frame*0.027+cos(w.frame*0.0012))*0.5+0.5*height ]; Pen.strokeColor= Color.yellow; Pen.strokeOval(Rect.aboutRedObject2D(rep)); Pen.strokeColor= Color.white; world.objects.do{|o, i| if(o!=rep, { o.addForce(o.gravi ...

  10. 180-distance_lines Doc

    ... el, 0, mass, mass*10); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ Pen.fillColor= Color.grey(0, cnt.fold(0, 500)/10000); Pen.fillRect(Rect(0, 0, width, height)); world.objects.do{|o| world.objects.do{|oo| var dist= o.loc.distan ...

prev 1 2 3 4 5 6 7 8 9 10 next

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow