-
//springs coupled ( var width= 300, height= 300, w, world, leftWall, rightWall, leftSpr, rightSpr, list= List.new; //--world w= RedWindow("spring coupled", Rect(128, 64, width, height)).front; world= RedWorld1(RedVector2D[width, height]); / ...
-
... false); var usr= UserView(win, Rect(0, 0, width, height)); var physics, anchor, springs; usr.background= Color.red; physics= TraerParticleSystem(0.1, 0.2, 0.3, 0.9); num.do{physics.makeParticle(1.5.rand+0.5, width.rand, height.rand, 0)}; an ...
-
... false); var usr= UserView(win, Rect(0, 0, width, height)); var physics, anchor, springs; usr.background= Color.red; physics= TraerParticleSystem(0.2.rand2, 0.2.rand2, 0, 0.4); num.do{physics.makeParticle(1, width.rand, height.rand, 0)}; anc ...
-
... false); var usr= UserView(win, Rect(0, 0, width, height)); var physics, anchor, springs; usr.background= Color.red; physics= TraerParticleSystem(0.1, 0.2, 0.3, 0.1); num.do{|i| physics.makeParticle(0.5, width.rand, height.rand, 0)}; anchor= ...
-
... ods setIntegrator setGravity setDrag tick clear makeParticle removeParticle makeSpring removeSpring makeAttraction removeAttraction Inherited instance methods Classes (extension) | TraerPhysics TraerParticleSystem Extension takes care of gr ...
-
... age.div(10).rand.do{|i| var q= physics.particles.choose; if(p!=q, { physics.makeSpring(p, q, 0.1.rand, 0.25.rand, 10.rand+10); }); }; }; usr.mouseMoveAction= usr.mouseDownAction; usr.drawFunc= { var dead= List.new; physics.particles.do{|p, ...
-
... Force viscosityForce contains containsLoc collide world loc vel accel mass size spring barycenter Inherited instance methods Examples Classes (extension) | Red > redUniverse'>redUniverse RedObject Extension fundamental object in the redUniv ...
-
... ~ps.makeParticle(1, x, y, 0); //create a particle at mouse location s= ~ps.makeSpring(p, mouse, diff.x*0.01, diff.y*0.01, delta); if(objects.size<500, { objects.add(( particle: p, spring: s, synth: Synth(\part, [\out, 40, \x, x, \y, y]), d ...
-
... age.div(10).rand.do{|i| var q= physics.particles.choose; if(p!=q, { physics.makeSpring(p, q, 0.1.rand, 0.25.rand, 100.rand+10); }); }; }; usr.mouseMoveAction= usr.mouseDownAction; usr.drawFunc= { var dead= List.new; physics.particles.do{|p, ...
-
... tion(a, b, k, distanceMin) - act on two particles (a and b, k is strength) TraerSpring TraerSpring(a, b, ks, d, r) - act on two particles (a and b, ks is spring constant, d is damping and r rest length) TraerVector3D TraerVector3D(x, y, z) ...