-
... f(aMosca.graphicpath.notNil){ var gwidth, gheight; aMosca.graphicImage = Image.open(aMosca.graphicpath); gwidth = aMosca.graphicImage.width; gheight = aMosca.graphicImage.height; aMosca.graphicOrigin = Point((gwidth / -2), (gheight / -2)); ...
-
... an get when playing with MouseX and MouseY in supercollider. To show what is happening, the squiggles are also visualized while they are being generated. Increase the ~allPoints array size to get a longer visualization tail. ( s.waitForBoo ...
-
... e(obj[\particle]); obj[\synth].set(\gate, 0); objects.remove(obj); }; ~ps.tick; Pen.fillColor= Color.black; objects.do{|obj| var age= obj[\particle].age; var delta= obj[\delta]; var size= age.linlin(0, maxAge, 100, 0)*obj[\particle].mass; v ...
-
... e(obj[\particle]); obj[\synth].set(\gate, 0); objects.remove(obj); }; ~ps.tick; Pen.fillColor= Color.black; objects.do{|obj| var age= obj[\particle].age; var delta= obj[\delta]; var size= age.linlin(0, maxAge, 100, 0)*obj[\particle].mass; v ...
-
... Hook = { n.do { |x| n.do { |y| var z = field[x][y]; z = f.(z); field[x][y] = z; Pen .color = Color .gray(z.rho.linlin(-100, 100, 1, 0)); Pen .addRect( Rect (x * dx, y * dy, dx, dy) ); Pen .fill } } }; fork({ 6.do { w.refresh; 2.wait } }, Ap ...
-
... var barheight = 20; var ampscaled = amp.explin(0.01,0.03,0,1); Pen.alpha = 27; degrees.do({ | item, i | Pen.fillColor = colors[(degrees[i] % 12)]; Pen.addRect(Rect(0, degrees[i].linlin(-1,12,height, 0) ...
-
... ts.do{|o, i| o.addForce(world.gravity); o.update; world.contain(o)}; //--render Pen.fillColor= Color.green(1, 0.4); world.objects.do{|o, i| Pen.fillRect(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... ts.do{|o, i| o.addForce(world.gravity); o.update; world.contain(o)}; //--render Pen.fillColor= Color.green(1, 0.4); world.objects.do{|o, i| Pen.fillRect(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); )
-
... bject in it. draw to be used inside a drawHook or drawFunc; draws the object. asPenFunction returns a function for drawing asGUICode ( penClass ) returns GUI.pen style code as a compile string. penClass can be a Class or a String ( default ...
-
... ge .new(20,20); j.draw({ arg image; var lozenge; lozenge = Rect (3, 3, 16, 16); Pen .addOval(lozenge); Pen .fillAxialGradient(1@1, 19@19, Color .new255(255, 165, 0), Color .new255(238, 232, 170)); Pen .width = 1; Pen .strokeColor = Color .b ...