-
... 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 ...
-
... xample * 200131 - added lsystem grow example * 180226 - added linked and double pendulum examples * 180103 - unified RedWindow and removed RedJWindow and RedQWindow. checked and updated all examples (mostly formatting). new markdown readme ...
-
//gui example with userview / pen graphics ( var board= CytonSerial("/dev/tty.usbserial-DM00DRM0", initAction: {|b| b.start}); //edit here to match your board //var board= CytonWifi(NetAddr("OpenBCI_WifiShieldOSC.local", 13999), initAction: ...
-
... n= x position \beat, (1-(o.loc[1]/height)*400) //freq= y position ); //--render Pen.fillColor= Color.grey(o.state[\cell]*0.85+0.15, 0.5); Pen.fillOval(Rect.aboutRedObject2D(o)); }; }; w.play; CmdPeriod.doOnce({w.close}); w.onClose= {synths. ...
-
... nstrument..."), GridLayout.rows( *images.collect{|x| UserView().drawFunc_{|usr| Pen.stringAtPoint(x.key.asString.drop(1), 50@50, Font(SGUI.font.name, 64))} .setBackgroundImage(x.value, 10).mouseUpAction_{SInstruments.toFront(x.key.asString) ...
-
... ); var xCoords = (numCycle * 2).collect({|cnt| cnt * xApart; }) + (xApart / 2); Pen.color = argFColor.value; Pen.width = rrand(0.4, 0.6); xCoords.do ({|coord| Pen.addArc(coord@(argBounds.height / 2), xApart / 2, *angs[curAng]); curAng = 1 - ...
-
... ; udefController.remove; if( chain.isKindOf( MassEditUChain ) ) { chain.removeDependantFromChains( massEditController ); }; this.removeFromAll; if( composite == vw && { current == this } ) { current = nil } }; // startbutton views[ \startBu ...
-
... Ins = numItems[0]; var numOuts = numItems[1]; var font = Font("Monaco", 10); // Pen.font_(Font("", 12)); zone.resize_(5); nameView = StaticText(zone, Rect(0,0, 50, 20)) .font_(font).string_("weights"); inNameView = UserView(zone, Rect(0,0, ...
-
... Ins = numItems[0]; var numOuts = numItems[1]; var font = Font("Monaco", 10); // Pen.font_(Font("", 12)); zone.resize_(5); nameView = StaticText(zone, Rect(0,0, 50, 20)) .font_(font).string_("weights"); inNameView = UserView(zone, Rect(0,0, ...