This content has been marked as final. Show 5 replies
here's a billard table simulation i made for another poster. the only differences between this simulation and your simulation are the starting conditions and you'll probably want to add some rolling friction so the xVector and yVector decrease in absolute value with each time increment.
the sim i made starts with a given number of balls on the table all at random locations moving at random speeds in random directions. you'll start with some other initial conditions. in particular all balls, except one, will have zero speed.
*Sings* tra la la la la, la la la la... . Wow, you know way too much stuff... Is there anything that is simpler then that? I'm not worried about friction or reducing speed when the ball hits a rail, or just natural friction of the table, but is there any code that may be simple like this?:
VX = //something
VY = //something
Stretch -= 0.5
... I would love to base some stuff on your code, if I was smart . But, thank you very much still!
i don't think so.
the minimum you'll need, to give some appearence of realism, would be for the balls to interact with the sides of the table and for the balls to interact with each other. and that's all that's in the above code after the borderA = [boxtop, boxright, boxbottom, boxleft]; line.