-
... or); if(thisFillShape) { this.prFillShape; }; // Draw beat if(thisBeat != -1) { Pen.fillColor_(super.beatColor); if(super.orientation == \horizontal) { Pen.fillRect( Rect( super.interactionRect.left + (thisBeat * (super.interactionRect.widt ...
-
... mouse input trg.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; }; objs.do{|obj| obj.addForce(world.gravity); obj.update; wor ...
-
... mouse input trg.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; }; objs.do{|obj| obj.addForce(world.gravity); obj.update; wor ...
-
... |o, i| var index= kmeans.classifications[i]; var cent= kmeans.centroids[index]; Pen.strokeColor= colors[index]; Pen.line(o.loc.asPoint, cent.asPoint); Pen.stroke; Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedVector2D(o.loc, o.s ...
-
... |o, i| var index= kmeans.classifications[i]; var cent= kmeans.centroids[index]; Pen.strokeColor= colors[index]; Pen.line(o.loc.asPoint, cent.asPoint); Pen.stroke; Pen.strokeColor= Color.white; Pen.strokeRect(Rect.aboutRedVector2D(o.loc, o.s ...
-
... 1, cogInsideShape[0])*inner, Point(1, cogInsideShape[1])*inner ]*radius; Pen.strokeOval(Rect.aboutPoint(Point(0, 0), center*radius, center*radius)); numCogs.do{ Pen.moveTo(cogs[0]); Pen.lineTo(cogs[1]); cogs= cogs.collect{ ...
-
... the function used to draw the custom input_view: input_view.drawFunc = { Pen.width = stroke_size; // First, draw the background frame: Pen.addRect( Rect(0,0, input_view.bounds.width,input_view.bounds.height) ); Pen.fillAxi ...
-
//simple pendulum in a world with gravity ( var width= 300, height= 100, w, wgrav, world, n= 1, ploc; //--world w= RedWindow("pendulum test 1d", Rect(128, 64, width, height)).front; wgrav= RedVector[0.5]; world= RedWorld(RedVector[width], w ...
-
//simple pendulum in a world with gravity ( var width= 300, height= 100, w, wgrav, world, n= 1, ploc; //--world w= RedWindow("pendulum test 1d", Rect(128, 64, width, height)).front; wgrav= RedVector[0.5]; world= RedWorld(RedVector[width], w ...
-
... eight, width; height = this.bounds.height; width = this.bounds.width.asInteger; Pen.moveTo( 0 @ history[pos].linlin(0,1,height,0) ); (history.size).do({ |item, i| Pen.lineTo( (i+1) @ history.wrapAt(pos+i).linlin(0,1,height,0) ); }); Pen.lin ...