Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Play with my balls

1 view
Skip to first unread message

Jon Harrop

unread,
May 17, 2007, 6:43:08 AM5/17/07
to caml...@yquem.inria.fr

Real-time 2D rigid body simulation with OpenGL visualization in under 400
lines of OCaml code:

http://www.ffconsultancy.com/ocaml/balls/

Handles 100 balls with sub-centisecond accuracy on my machine.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
The F#.NET Journal
http://www.ffconsultancy.com/products/fsharp_journal/?e

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Brian Hurt

unread,
May 17, 2007, 8:25:32 AM5/17/07
to Jon Harrop
Jon Harrop wrote:

>Real-time 2D rigid body simulation with OpenGL visualization in under 400
>lines of OCaml code:
>
> http://www.ffconsultancy.com/ocaml/balls/
>
>Handles 100 balls with sub-centisecond accuracy on my machine.
>
>
>

You know, if I hadn't recognized your name, this article would have been
spam filtered *hard* due to it's subject.

:-)

Brian

Vu Ngoc San

unread,
May 18, 2007, 5:02:28 AM5/18/07
to Jon Harrop
Jon Harrop a écrit :

> Real-time 2D rigid body simulation with OpenGL visualization in under 400
> lines of OCaml code:
>
> http://www.ffconsultancy.com/ocaml/balls/
>
> Handles 100 balls with sub-centisecond accuracy on my machine.
>
very nice indeed. Note that balls can cross walls when resizing the
window :-)


San

Ken Rose

unread,
May 18, 2007, 12:13:20 PM5/18/07
to Jon Harrop
Vu Ngoc San wrote:
> Jon Harrop a écrit :
>> Real-time 2D rigid body simulation with OpenGL visualization in under
>> 400 lines of OCaml code:
>>
>> http://www.ffconsultancy.com/ocaml/balls/
>>
>> Handles 100 balls with sub-centisecond accuracy on my machine.
>>
> very nice indeed. Note that balls can cross walls when resizing the
> window :-)

Or in my case, by just falling through them. I'm using a 2GHz AMD64x2,
and getting about 2fps from it. Anybody have any idea what might be
going wrong?

Thanks

- ken

Robert Roessler

unread,
May 18, 2007, 2:47:43 PM5/18/07
to ro...@acm.org
Ken Rose wrote:
> Vu Ngoc San wrote:
>> Jon Harrop a écrit :
>>> Real-time 2D rigid body simulation with OpenGL visualization in under
>>> 400 lines of OCaml code:
>>>
>>> http://www.ffconsultancy.com/ocaml/balls/
>>>
>>> Handles 100 balls with sub-centisecond accuracy on my machine.
>>>
>> very nice indeed. Note that balls can cross walls when resizing the
>> window :-)
>
> Or in my case, by just falling through them. I'm using a 2GHz AMD64x2,
> and getting about 2fps from it. Anybody have any idea what might be
> going wrong?

You don't say anything about your OS or graphics H/W, but as you
appear to be running 64-bit Linux, I will go out on a limb and say you
probably have graphics driver problems... ;)

Generally speaking, these have historically lagged [significantly]
behind Windows drivers performance-wise, as they don't get nearly as
much attention from the graphics chip manufacturers.

Robert Roessler
roes...@rftp.com
http://www.rftp.com

Mathias Kende

unread,
May 18, 2007, 3:44:55 PM5/18/07
to ro...@acm.org
Le vendredi 18 mai 2007 à 09:11 -0700, Ken Rose a écrit :
> Or in my case, by just falling through them. I'm using a 2GHz AMD64x2,
> and getting about 2fps from it. Anybody have any idea what might be
> going wrong?

Contrary to what is (was in fact) written on the web site, you should
compile the software with ocamlopt rather than with ocamlc.
I don't think that it relies heavily on the graphic card's driver.

Mathias

0 new messages