-
... ules; // do them all with two loops // move AFTER we've calculated what will happen boidList.do{|boid| boid.moveBoid(targets, obstacles); // tell the boid to calculate and move it's position }; func.(this); // evaluate the function while pa ...
-
... oltip", rect, resizable: false, border: false) .alwaysOnTop_(true) .drawFunc_({ Pen.fillColor = Color.red; Pen.fillRect(rect); }); tooltipWindow.view.mouseEnterAction = { tooltipClosable = false; }; tooltipWindow.view.mouseLeaveAction = { t ...
-
... But, ) ) ); sfv }.dup(numPlayers); backgroundImage= Image(500, 500).draw({|img| Pen.fillColor= Color.yellow(0.3, 0.15); 100.do{|i| Pen.fillOval(Rect(400.linrand, 400.linrand, 50, 50)); }; }); win.view.setBackgroundImage(backgroundImage, 10, ...
-
... awAtPoint((i+1 * 20)@0, Font("Courier", 9), Color.black); }); }; d.drawFunc = { Pen.use({ Pen.translate(0, 5); drawFunc.value; }); Pen.translate(15, 0).rotate(0.5pi); drawFunc.value; }; e.drawFunc = { Pen.translate(40, 0).rotate(0.5pi); dra ...
-
... .amp/2+0.5*height; o.size= o.delta.abs*40+4; }; //--render world.objects.do{|o| Pen.fillColor= Color.grey((o.delta.abs*10+0.25).min(1), 0.8); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); ~world= world; ...
-
... .amp/2+0.5*height; o.size= o.delta.abs*40+4; }; //--render world.objects.do{|o| Pen.fillColor= Color.grey((o.delta.abs*10+0.25).min(1), 0.8); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); ~world= world; ...
-
Image: Filter: Description Class methods new color open openSVG openURL fromImage fromWindow closeAllPlotWindows colorToPixel pixelToColor Class variables and attributes formats compositingOperations interpolations resizeModes allPlotWindow ...
-
... ules; // do them all with two loops // move AFTER we've calculated what will happen boidList.do{|boid| boid.moveBoid(targets, obstacles); // tell the boid to calculate and move it's position }; func.(this); // evaluate the function while pa ...
-
... distance (Ballerini, M et al. "Interaction ruling animal collective behavior depends on topological rather than metric distance: Evidence from a field study" (2008)) [neighbors[j].at(\pos), neighbors[j].at(\vel)]; }; nearestNeighbors = nea ...
-
... ; }; }); newStates.do({ |item| if(item.includesKey(\svg)) { item[\img] = Image.openSVG(item[\svg]); item[\svgSize] = Point( item[\img].width, item[\img].height ); }; }); thisStates = newStates; thisCurrentState = 0; this.prResizeSVGs; } sta ...