From: Anders Vinjar
Subject: modelling physics
Date: 
Message-ID: <copirr4lvzq.fsf@olivier.localdomain>
Hello.

Im trying to build up an environment to experiment with virtual
mechanics.  Physical objects, laws, various types of interaction
between physical objects, gravity, friction, push/pull etc.

Q: does anyone here know of lisp-based libraries or packages
doing modelling of physical things already available for download
somewhere?

I need geometrical objects - size, position, state, velocity,
acceleration etc, and ways of interacting with them, connecting
them together etc.

Thanks for any hints.

-anders

From: Luke J Crook
Subject: Re: modelling physics
Date: 
Message-ID: <7b2dnZJUxMjnt2LeRVn-uw@giganews.com>
Anders Vinjar wrote:
> Hello.
> 
> Im trying to build up an environment to experiment with virtual
> mechanics.  Physical objects, laws, various types of interaction
> between physical objects, gravity, friction, push/pull etc.
> 

Sounds like ODE ( www.ode.org ) will do the trick. I have made complete 
Lispworks bindings to ODE, and I'm busy converting these to CFFI for the 
lispbuider project.

ODE works well. As a test I created ~800 cubes and dropped these onto 
the 'ground' under the effects of gravity. They bounce and smash into 
each other quite realistically.

-Luke
From: Anders Vinjar
Subject: Re: modelling physics
Date: 
Message-ID: <cop8xrwvlt5.fsf@olivier.localdomain>
Ive built ODE (and Fluxus), and they seem to get close.  Havent
found ways of combining fluxus with other scheme/lisp based apps
yet, but i guess its possible.

But i see theres already a cl-ode project at
http://common-lisp.net/cl-ode/ , it builds and runs in sbcl here.
Will your bindings differ in any way?

Thanks for help.

-anders


>>> "L" == Luke J Crook <Luke> writes:
L> 
L> Anders Vinjar wrote:
>> Hello.
>> Im trying to build up an environment to experiment with virtual
>> mechanics.  Physical objects, laws, various types of interaction
>> between physical objects, gravity, friction, push/pull etc.
>> 
L> 
L> Sounds like ODE ( www.ode.org ) will do the trick. I have made
L> complete Lispworks bindings to ODE, and I'm busy converting these to
L> CFFI for the lispbuider project.
L> 
L> ODE works well. As a test I created ~800 cubes and dropped these onto
L> the 'ground' under the effects of gravity. They bounce and smash into
L> each other quite realistically.
L> 
L> -Luke
From: Tomcat
Subject: Re: modelling physics
Date: 
Message-ID: <1141083528.889653.143700@e56g2000cwe.googlegroups.com>
Anders Vinjar wrote:
> Ive built ODE (and Fluxus), and they seem to get close.  Havent
> found ways of combining fluxus with other scheme/lisp based apps
> yet, but i guess its possible.
>
> But i see theres already a cl-ode project at
> http://common-lisp.net/cl-ode/ , it builds and runs in sbcl here.
> Will your bindings differ in any way?
>
> Thanks for help.
>
> -anders

Those are my bindings :)

They probably need more documentation and I know they more testing,
e.g. different lisps.

I haven't put up announcement because I wanted to add some info the the
website. I'm happy to hear that it builds and runs, could you send
some info (e.g.OS/Processor/Did you use asdf-install?). If you want to
follow development sign up to cl-old-devel, otherwise could you send it
to foobarbazqux at gmail dot com

Tom
From: ········@extern.uio.no
Subject: Re: modelling physics
Date: 
Message-ID: <m3k6bfsy58.fsf@notam.uio.no>
>>> "T" == Tomcat  <············@gmail.com> writes:
T> 
T> Anders Vinjar wrote:
>> Ive built ODE (and Fluxus), and they seem to get close.  Havent
>> found ways of combining fluxus with other scheme/lisp based apps
>> yet, but i guess its possible.
>> 
>> But i see theres already a cl-ode project at
>> http://common-lisp.net/cl-ode/ , it builds and runs in sbcl here.
>> Will your bindings differ in any way?
>> 
>> Thanks for help.
>> 
>> -anders
T> 
T> Those are my bindings :)
T> 
T> They probably need more documentation and I know they more testing,
T> e.g. different lisps.
T> 
T> I haven't put up announcement because I wanted to add some info the the
T> website. I'm happy to hear that it builds and runs, could you send
T> some info (e.g.OS/Processor/Did you use asdf-install?).

That was fc3 from planetccrma, with a 2.6.10 kernel, SBCL
0.9.9.16.  Some recent cffi from cvs.  Just booted sbcl and
(use-system :sbcl).  Ive only tried the test included, which gave
sensible output.

I tried first with cmucl, but it seemed to hang while loading the
.so library.  Im not too sure about this, just aborted and tried
with sbcl.
From: ········@extern.uio.no
Subject: Re: modelling physics
Date: 
Message-ID: <m3oe0qha4o.fsf@notam.uio.no>
>>> "T" == Tomcat <············@gmail.com> writes:
T> Those are my bindings :)
T> 
T> They probably need more documentation and I know they more
T> testing, e.g. different lisps.
T> 
T> I haven't put up announcement because I wanted to add some
T> info the the website. I'm happy to hear that it builds and
T> runs, could you send some info (e.g.OS/Processor/Did you use
T> asdf-install?).

>>> "a" == andersvi  <········@extern.uio.no> writes:
a> That was fc3 from planetccrma, with a 2.6.10 kernel, SBCL
a> 0.9.9.16.  Some recent cffi from cvs.  Just booted sbcl and
a> (use-system :sbcl).  Ive only tried the test included, which
a> gave sensible output.
a> 
a> I tried first with cmucl, but it seemed to hang while loading
a> the .so library.  Im not too sure about this, just aborted and
a> tried with sbcl.

cl-ode loads and runs in cmucl as well, just restart cmucl after
doing the make-building of the .so lib.
From: Sashank Varma
Subject: Re: modelling physics
Date: 
Message-ID: <1140801830.084886.294730@z34g2000cwc.googlegroups.com>
Anders Vinjar wrote:
> Im trying to build up an environment to experiment with virtual
> mechanics.  Physical objects, laws, various types of interaction
> between physical objects, gravity, friction, push/pull etc.

http://mitpress.mit.edu/SICM/book.html

Not quite what you're looking for, but interesting nonetheless.

Sashank
From: Oyvin Halfdan Thuv
Subject: Re: modelling physics
Date: 
Message-ID: <slrndvu8do.idn.oyvinht@apollo.orakel.ntnu.no>
In article <···············@olivier.localdomain>, Anders Vinjar wrote:
> Hello.
> 
> Im trying to build up an environment to experiment with virtual
> mechanics.  Physical objects, laws, various types of interaction
> between physical objects, gravity, friction, push/pull etc.
> 
> Q: does anyone here know of lisp-based libraries or packages
> doing modelling of physical things already available for download
> somewhere?
> 
> I need geometrical objects - size, position, state, velocity,
> acceleration etc, and ways of interacting with them, connecting
> them together etc.

Gazebo (URL: http://playerstage.sourceforge.net/index.php?src=gazebo) is a
robot simulator for realistic real-world environments. It is a part of
Player/Stage/Gazebo wich in turn is based on ODE (URL: http://www.ode.org).

The Player part of this three layer package deals with robot control (actually
it is two fold, since Gazebo is a 3D version of Stage). It is possible to 
control the robot and read the sensors using a Common Lisp interface to Player.
The robot, wich may consist of many physical objects, can influence this world
in realistic ways.

The interface is supposed to work with Allergro, MCL, OpenMCL and SBCL[1].

I do not know if this will do what you ask for, but it could be a place to get
started. I suspect that ODE may be sufficient for you, and in that case you
would have to write Common Lisp bindings for ODE (perhaps from ode.h using 
SWIG or similar) yourself.

-- 
�yvin
[1] I have hacked the bindings to make them work for SBCL, but they are not 
heavily tested yet and only works on threaded SBCL (= Linux 2.6). Please e-mail
me if you would like to test them.
From: Anders Vinjar
Subject: Re: modelling physics
Date: 
Message-ID: <copbqwwlq2p.fsf@olivier.localdomain>
>>> "O" == Oyvin Halfdan Thuv <oyvinht<@>-no.spam-orakel.ntnu.no> writes:

O> I do not know if this will do what you ask for, but it could
O> be a place to get started. I suspect that ODE may be
O> sufficient for you, and in that case you would have to write
O> Common Lisp bindings for ODE (perhaps from ode.h using SWIG or
O> similar) yourself.

Thanks.

Problem is i have no clue how to write wrappers like this myself,
so i wont get anywhere if theres no lisp-interface already (my
work is as a composer, using lisp-based tools extensively, but
unfortunately im no real programmer, or physicist...).

My aim with this is to generate topologies to control musical
structures linked to real-world "physical" prosesses.

I know theres a book by Sussman: "Structure and Interpretation of
Classical Mechanics", where scheme is used.  Maybe theres
something there which is not too heavy.
From: Luke Crook
Subject: Re: modelling physics
Date: 
Message-ID: <1140801780.512488.71240@p10g2000cwp.googlegroups.com>
Anders Vinjar wrote:
> >>> "O" == Oyvin Halfdan Thuv <oyvinht<@>-no.spam-orakel.ntnu.no> writes:
>
> My aim with this is to generate topologies to control musical
> structures linked to real-world "physical" prosesses.
>
> I know theres a book by Sussman: "Structure and Interpretation of
> Classical Mechanics", where scheme is used.  Maybe theres
> something there which is not too heavy.

Take a look at fluxus (http://www.pawfal.org/Software/fluxus/ ), (
http://www.pawfal.org/Software/fluxus/docs/index.html ). It has support
for all kinds of 3D rendering of audio weirdness.

-Luke
From: ········@extern.uio.no
Subject: Re: modelling physics
Date: 
Message-ID: <m3lkvzwyh7.fsf@notam.uio.no>
>>> "L" == Luke Crook <····@balooga.com> writes:

L> Take a look at fluxus (http://www.pawfal.org/Software/fluxus/ ), (
L> http://www.pawfal.org/Software/fluxus/docs/index.html ). It has support
L> for all kinds of 3D rendering of audio weirdness.

Thanks alot. ODE and Fluxus seem close.  Ill build it and see
where i get.

I see it uses ODE to do the physics part, and others in the
thread mentioned further wrappers around that library.  I guess
ill just have to dive in.

-anders
From: Tomcat
Subject: Re: modelling physics
Date: 
Message-ID: <1140822294.924494.200450@u72g2000cwu.googlegroups.com>
Anders Vinjar wrote:
> >>> "O" == Oyvin Halfdan Thuv <oyvinht<@>-no.spam-orakel.ntnu.no> writes:
>
> O> I do not know if this will do what you ask for, but it could
> O> be a place to get started. I suspect that ODE may be
> O> sufficient for you, and in that case you would have to write
> O> Common Lisp bindings for ODE (perhaps from ode.h using SWIG or
> O> similar) yourself.
>
> Thanks.
>
> Problem is i have no clue how to write wrappers like this myself,
... Snipped for brevity
I have an ode wrapper that's almost complete.(It works fine, I'm just
working on the installation).  Hopefully I'll release it this weekend.


Tom
From: ········@extern.uio.no
Subject: Re: modelling physics
Date: 
Message-ID: <m3hd6nwyay.fsf@notam.uio.no>
>>> "T" == Tomcat  <············@gmail.com> writes:

T> I have an ode wrapper that's almost complete.(It works fine,
T> I'm just working on the installation).  Hopefully I'll release
T> it this weekend.

If you let us know when its there, id at least be happy to take a
look.

-anders
From: ·······@yahoo.com
Subject: Re: modelling physics
Date: 
Message-ID: <1140991378.606953.100590@i39g2000cwa.googlegroups.com>
Checking out SICM is a good idea.  There is a scheme library designed
to be used with the book, which may be just what you need.  I haven't
used it yet (don't have a linux box right now), but I have browsed the
user manual and it looks quite good for some similar things that I am
interested in.  It was (and may still be) available at

http://www-swiss.ai.mit.edu/~gjs/6946/linux-install.htm

You can also look for a link at

http://mitpress.mit.edu/SICM/

The text and software are used for a graduate class in classical
mechanics.  If you don't know (or don't care about) what a Lagrangian
is, it may be overkill for what you're trying to do.
From: Anders Vinjar
Subject: Re: modelling physics
Date: 
Message-ID: <cop3bi5193q.fsf@olivier.localdomain>
[thread started in comp.lang.lisp, but getting more scheme-biased]

>>> "w" == wgempel  <·······@yahoo.com> writes:
w> 
w> Checking out SICM is a good idea.  There is a scheme library designed
w> to be used with the book, which may be just what you need.  I haven't
w> used it yet (don't have a linux box right now), but I have browsed the
w> user manual and it looks quite good for some similar things that I am
w> interested in.  It was (and may still be) available at
w> 
w> http://www-swiss.ai.mit.edu/~gjs/6946/linux-install.htm
w> 
w> You can also look for a link at
w> 
w> http://mitpress.mit.edu/SICM/
w> 
w> The text and software are used for a graduate class in classical
w> mechanics.  If you don't know (or don't care about) what a Lagrangian
w> is, it may be overkill for what you're trying to do.

Ideal would be to have some physics software tools to get started
with, and develop more through understanding during the years
coming.  If its all lisp going on it would be an ideal playground
to experiment and test "what if..." situations.

I dont know the book SICM apart from peeping upon some
introductory chapters on the web.  Would it be possible to grab
small code-snippets from the book to construct a topology
consisting of say a cluster of point-masses connected with damped
springs of some quality moving around in a certain space?

I tried downloading and running the SICM-package with the
scmutils but it wouldnt run on my linux here (FC3, kernel
2.6.10).  Anybody got it running in such an environment?

-anders
From: H L
Subject: Re: modelling physics
Date: 
Message-ID: <pan.2006.02.28.01.12.40.465191@nospam.net>
In di Sun, 26 Feb 2006 14:02:58 -0800, wgempel pa grafo (vide:
www.glosa.org):

> Checking out SICM is a good idea.  There is a scheme library designed
> to be used with the book, which may be just what you need.  I haven't
> used it yet (don't have a linux box right now), but I have browsed the
> user manual and it looks quite good for some similar things that I am
> interested in.  It was (and may still be) available at
> 
> http://www-swiss.ai.mit.edu/~gjs/6946/linux-install.htm
> 
> You can also look for a link at
> 
> http://mitpress.mit.edu/SICM/
> 
> The text and software are used for a graduate class in classical
> mechanics.  If you don't know (or don't care about) what a Lagrangian
> is, it may be overkill for what you're trying to do.

Since Scheme was mentioned, there's the brand new and complete Simulation
package of DrScheme (code was ported from Common Lisp).

Added benefits of easy install and rich environment (graphics included).
From: ········@extern.uio.no
Subject: Re: modelling physics
Date: 
Message-ID: <m3fym3sxox.fsf@notam.uio.no>
>>> "H" == H L <H> writes:
H> Since Scheme was mentioned, there's the brand new and complete
H> Simulation package of DrScheme (code was ported from Common
H> Lisp).

Where might we find some information about this?

H> Added benefits of easy install and rich environment (graphics included).

Sayings like these gives a very ambivalent response here :)