Attached is some source code I've been playing with. I'm trying to come up with
an approximate simulation of gravity between a very massive (but inertia-less)
mouse cursor and a handful of semi-massless circles.
For a test, I'm only simulating a single body. This world program will render
the f
> On Apr 10, 2016, at 8:19 AM, Wesley Bitomski
> wrote:
>
> Attached is some source code I've been playing with. I'm trying to come up
> with an approximate simulation of gravity between a very massive (but
> inertia-less) mouse cursor and a handful of semi-massless circles.
>
> For a test,
Hi Wesley
Some tips:
1. Your use of random with two args is incorrect: create a (random-range
a b) function to express your intent.
2. The slow-down is because you're using unlimited precision arithmetic.
Try using 1.0 instead of 1 to get floating point.
3. Instrument your
Thanks for the advice all!
I did re-read the code and realized that it's really not all that
descriptive. So I tore through it, made better data definitions, commented
the code and profiled it (basically seeing how much time it took to execute
each statement); and discovered that my simulation was
I had just remembered that I forgotten the attachment. After further
messing about, I figured that 100 cars provided the best balance of
ridiculousness and smoothness.
Enjoy!
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from t
5 matches
Mail list logo