-
( var spring, num; s.waitForBoot{ SynthDef(\part, {|out= 40, x= 0, y= 0, z= 0| var pan= x; var freq= y.linexp(-1, 1, 50, 2000); var amp= z*0.3; var src= SinOscFB.ar(freq, z.abs.lag(1), amp); Out.ar(out, Pan2.ar(src, pan)); }, #[\ir, 0.001, ...
-
... ; //Float classvar <>default_drag= 0.001; //Float var <>particles; //List var <>springs; //List var <>attractions; //List var <>customForces; //List var <>integrator; //TraerIntegrator var <>gravity; //TraerVector3D var <>drag; //Float var ...
-
// this file is part of redUniverse toolkit /redFrik RedSpring { var <>object, <>target, //objects <>stiffness, <>damping, <>length; //floats *new {|object, target, stiffness, damping, length| ^super.newCopyArgs( object, target, stiffness ? ...
-
//chain of springs. //mouse controls red ball (target) ( var width= 300, height= 300, w, world, wgrav, objs, sprs, trg, mp, n= 18; //--world w= RedWindow("chain of springs", Rect(128, 64, width, height)).front; mp= w.mouse; wgrav= RedVector ...
-
//simple spring //mouse controls red ball (target) ( var width= 300, height= 300, w, world, wgrav, obj, trg, mp; //--world w= RedWindow("spring test", Rect(128, 64, width, height)).front; mp= w.mouse; wgrav= RedVector2D[0, 0.98]; world= Red ...
-
... , Rect(0, 0, width, height)); var physics; var particles; var gridSize= 10; var spring_strength= 0.2; var spring_damping= 0.1; var gridStepX, gridStepY; var mp= false, mx= 0, my= 0, px= 0, py= 0; usr.background= Color.white; physics= TraerP ...
-
//more springs. RedSpring is just a simple helper class //mouse controls red ball (target) ( var width= 300, height= 300, w, world, wgrav, objs, sprs, trg, mp, n= 8; //--world w= RedWindow("more springs", Rect(128, 64, width, height)).front ...
-
//spring construction inspired by soda constructor //mouse drags around balls ( var width= 300, height= 300, w, world, wgrav, sprs, over, n= 10; //--world w= RedWindow("soda springs", Rect(128, 64, width, height)).front; wgrav= RedVector2D[ ...
-
//springs double //with mouse controlling mid point //illustrates RedSpring's update2 convenience method for interconnecting two objects with one spring ( var width= 300, height= 300, w, world, wgrav, obj, obj2, trg, mp, spr1, spr2; //--wor ...
-
//springs interconnected2. monster //with mouse controlling mid point //with simple sounds mapped to each object. ( s.waitForBoot{ var width= 640, height= 480, wgrav, w, world, n= 18, objs, sprs, syns, cent= RedVector2D[width/2, height/2]; ...