Submit Browse Random
Anonymous Login RSS

SuperCollider Code

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

    ... ill, 0, 1, ~initSize.value)}.dup(seeds-1); //--loop w.draw{ var free, frozen; //Pen.smoothing= false; Pen.strokeColor= Color.black; //--separate free and frozen objects free= world.objects.select{|o| o.vel!=still}; frozen= world.objects.sel ...

  2. 005-multiple_synth Doc

    ... vel, 0, mass, mass*5); //world,loc,vel,acc,mass,size }.dup(n); //--loop w.draw{ Pen.strokeColor= Color.black; Pen.fillColor= Color.red(1, 0.7); world.objects.do{|o| var osize, freq, amp, pan; o.addForce(world.gravity); o.update; if(world.co ...

  3. RedJWindow Doc

    ... ds Inherited class methods Instance methods draw play stop resize background isOpen mouse isPlaying userView animate frame frameRate Inherited instance methods Examples Classes (extension) | Red > redUniverse'>redUniverse RedJWindow Extensi ...

  4. 130-obstacle_rock Doc

    ... ], RedVector2D[0, 0], 0, 0, 60); //world,loc,vel,acc,mass,size //--loop w.draw{ Pen.strokeColor= Color.white; world.objects.do{|o, i| //iterate all objects in this world world.objects.copyToEnd(i+1).do{|oo| o.collide(oo)}; o.update; //objec ...

  5. red00 Doc

    ... y, 0)}; usr.mouseMoveAction= usr.mouseDownAction; usr.drawFunc= { physics.tick; Pen.fillColor= Color.black; physics.particles.do{|p| Pen.addOval(Rect.aboutPoint(Point(p.position.x, p.position.y), p.mass, p.mass)); }; Pen.fill; }; win.front; ...

  6. red01 Doc

    ... y, 0)}; usr.mouseMoveAction= usr.mouseDownAction; usr.drawFunc= { physics.tick; Pen.fillColor= Color.black; physics.particles.do{|p| Pen.addOval(Rect.aboutPoint(Point(p.position.x, p.position.y), p.mass, p.mass)); }; Pen.fill; }; win.front; ...

  7. 120-collision_objects Doc

    ... thin a world with gravity force and also collision detection //color and size depends on object's mass ( var width= 300, height= 300, w, wgrav, world, n= 20; //--world w= RedWindow("collision test", Rect(128, 64, width, height)).front; wgra ...

  8. 231-3Dpoints Doc

    ... points= {|i| Red3DPoint(RedVector3D[i+1/n-0.5, 0, 0])}.dup(n); //--loop w.draw{ Pen.fillColor= Color.white; world.objects.do{|o, i| thetas[i]= thetas[i]+speeds[i]; points[i].rotation= RedVector3D[thetas[i], thetas[i], thetas[i]]; points[i]. ...

  9. red02 Doc

    ... usr.mouseDownAction; usr.drawFunc= { physics.tick; physics.particles.do{|p, i| Pen.fillColor= Color.hsv(0.6, i/num, 0.7, 0.7); Pen.addOval(Rect.aboutPoint(Point(p.position.x, p.position.y), p.mass, p.mass)); Pen.fill; }; }; win.front; CmdP ...

  10. 233-3Dlines Doc

    ... s= {|i| Red3DLine(RedVector3D[0, i+1/n-0.5, 0], 1.75)}.dup(n); //--loop w.draw{ Pen.strokeColor= Color.white; world.objects.do{|o, i| thetas[i]= thetas[i]+speeds[i]; lines[i].rotation= RedVector3D[thetas[i], thetas[i]/2+1, thetas[i]/3+2]; l ...

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

SuperCollider home doc forum wiki git legacy help book

contact | by vividsnow