-
... ; }); }; world.objects.do{|o| o.addForceAngular2D(world.gravity); o.update; //--render ploc= o.pendulumLoc2D.asPoint; Pen.line(o.loc.asPoint, ploc); Pen.addOval(Rect.aboutPoint(ploc, o.size/5, o.size/5)); }; Pen.stroke; a= world.objects; }; ...
-
... d.objects.do{|o| o.addForce(o.world.gravity); o.update; o.world.contain(o); //--render Pen.strokeRect(Rect.aboutRedObject2D(o)); }; //Pen.strokeRect(Rect.aboutRedVector2D(~win.mouse, 10)); }; ~win.play; CmdPeriod.doOnce({~win.close}); ) //- ...
-
... amping, length obj.addForce(world.gravity); obj.update; world.contain(obj); //--render Pen.strokeColor= Color.grey; Pen.line(obj.loc.asPoint, trg.loc.asPoint); Pen.stroke; Pen.fillColor= Color.red; Pen.fillOval(Rect.aboutRedObject2D(trg)); ...
-
... rad+theta+sin(y*pi)); //func= cos(cnt*2+rad+theta+sin(y*pi)+cos(x+cnt*pi)); //--render img.setPixel(Image.colorToPixel(Color.hsv(func+1/2, 1, 0.75)), i, j); }; }; Pen.drawImage(Rect(0, 0, width, height), img); }; img.interpolation= \smooth; ...
-
... amping, length obj.addForce(world.gravity); obj.update; world.contain(obj); //--render Pen.strokeColor= Color.grey; Pen.line(obj.loc.asPoint, trg.loc.asPoint); Pen.stroke; Pen.fillColor= Color.red; Pen.fillOval(Rect.aboutRedObject2D(trg)); ...
-
... rad+theta+sin(y*pi)); //func= cos(cnt*2+rad+theta+sin(y*pi)+cos(x+cnt*pi)); //--render img.setPixel(Image.colorToPixel(Color.hsv(func+1/2, 1, 0.75)), i, j); }; }; Pen.drawImage(Rect(0, 0, width, height), img); }; img.interpolation= \smooth; ...
-
... Filter: Realtime vs. Non-Realtime Synthesis Basic usage of Score Timed messages Rendering a Score using 'recordNRT' Score files Using system SynthDefs Server instance Server resources Examples Algorithmic generation of Synth messages NRT pr ...
-
... o.addForce(o.gravityForce(oo).neg); }); }); }; o.update; world.contain(o); //--render Pen.fillColor= Color.hsv(0.4, 1-(o.mass/12), 1, o.mass/12); Pen.fillRect(Rect.aboutPoint(o.loc.asPoint, 0.5, 0.5)); }; }; w.play; CmdPeriod.doOnce({w.clo ...
-
... o.addForce(o.gravityForce(oo).neg); }); }); }; o.update; world.contain(o); //--render Pen.fillColor= Color.hsv(0.4, 1-(o.mass/12), 1, o.mass/12); Pen.fillRect(Rect.aboutPoint(o.loc.asPoint, 0.5, 0.5)); }; }; w.play; CmdPeriod.doOnce({w.clo ...
-
... mFile( "score-test" , "test.osc" ); From the command line, the file can then be rendered from within the build directory: ./scsynth -N test.osc _ test.aif 44100 AIFF int16 -o 1 Score also provides methods to do all this more directly: ( var ...