Image:
 Author: rorziz Group: Default Filesize: 67.95 kB Date added: 2019-11-29 Rating: 6.1 Downloads: 2503 Views: 386 Comments: 1 Ratings: 3 Times favored: 0 Made with: Algodoo v2.1.0 Tags:
|
after a period of time, (starting at 4 seconds and reducing sqrt(2)/2 each circle stops spawing two circles (again radious reducing by sqrt(2)/2 each time,
using an old computer so had to stop at this depth to stop it crashing, the origanal plan was to put tracers on, not a chance on this pc!
heres the code if your interested!;
---
Scene.addCircle {
colorHSVA := [30.26,1,0.2,1];
pos := [0,0];
collideset := 0;
radius := 16;
postStep := (e)=>{sim.time>_delay?{scene.my.ballspawn(pos(0),pos(1),radius,_theta);poststep=(e)=>{};vel=[0,0]}:{}};
_theta= math.pi/2;
_delay= 4;
vel = [0,10];
drawBorder := false;
drawCake := false;
}
scene.my.ballspawn = (px,py,rad,t)=>{
Scene.addCircle {
colorHSVA := [130-rad*6.26,1,0.8-rad*0.03125,1];
pos := [px,py];
collideset := 0;
radius := rad*(2^0.5/2);
postStep := (e)=>{sim.time>_delay?{scene.my.ballspawn(pos(0),pos(1),radius,_theta);poststep=(e)=>{};vel=[0,0]}:{}};
_theta := t+0.523599;
_delay := rad/4*(2^0.5/2)+sim.time;
vel := [10*cos(_theta),10*sin(_theta)];
onSpawn := (e)=>{{radius<1}?{postStep = (e)=>{poststep=(e)=>{sim.time>_delay?{poststep=(e)=>{};vel=[0,0]}:{}}}}:{}};
drawBorder := false;
drawCake := false;
};
Scene.addCircle {
colorHSVA := [130-rad*6.26,1,0.8-rad*0.03125,1];
pos := [px,py];
collideset := 0;
radius := rad*(2^0.5/2);
postStep := (e)=>{sim.time>_delay?{scene.my.ballspawn(pos(0),pos(1),radius,_theta);poststep=(e)=>{};vel=[0,0]}:{}};
_theta := t-0.523599;
_delay := rad/4*(2^0.5/2)+sim.time;
vel := [10*cos(_theta),10*sin(_theta)];
onSpawn := (e)=>{{radius<1}?{postStep = (e)=>{poststep=(e)=>{sim.time>_delay?{poststep=(e)=>{};vel=[0,0]}:{}}}}:{}};
drawBorder := false;
drawCake := false;
}
} |