[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Billiards-devel] Comparing billiards to other simulators

From: Dimitris Papavasiliou
Subject: Re: [Billiards-devel] Comparing billiards to other simulators
Date: Thu, 1 Apr 2010 12:17:06 +0300


> My goal is to eventually compare billiards to other simulators (actually
> it's only to poolfiz for the moment), and I think this should be
> achieved by running a main program that runs the different simulators
> depending on the options that the user chooses.
> This approach seems kind of complicated to me although it would
> ultimately be the most rewarding for side to side comparison. The thing
> is, if I want to run billiards simulations through another application,
> it will require a quite different approach from what billiards is made
> to allow. I see two potential ways of doing it, and I'd like advice on
> their feasibility.

It shouldn't be very complicated but in order to give a better reply
I'd have to have some knowledge of poolfiz's interface.  Is there some
sort of manual available?

> 1rst possibility: maybe I could start techne -c billiards.lua with
> special options to specify the table configuration and shot parameters,
> and maybe hook off the graphical output, either through invoking techne
> methods with my C++ code or through a script that's called from my
> application and then gives me the results...
> 2nd possibility: maybe I could run billiards separately and my
> application could exchange information and commands through billiards'
> http server.
> What do you think?

First, can you explain in some more detail exactly what you're trying
to achieve?  I mean, do you just want a way of specifying to Billiards
a shot, in terms of table parameters, ball situation, cue attitude,
elevation and english and cue impact speed, then let Billiards
simulate the shot and finally get the end positions of the balls?  Are
you interested in the full path?

If that is what you need more or less then I have the following
suggestion to make: first to set Billiards parameters in real time an
http page can be used.  You can specify parameters to change via a
query with something like this:


This page actually already exists but it might prove useful to be able
to specify parameter queries like this:


Then the server would respond with a plain-text page containing:


or even just:


which can then be easily parsed.  You'd have to find a way of making
HTTP queries and reading responses easily from your host program but
that shouldn't be very tricky.  I suppose there must be libraries that
handle that sort of stuff.

Now in order to get the results the best option would be this:
There's a recorder built into Billiards right now that keeps track of
the positions of the balls at various instances in order to draw the
paths in the SVG illustrations.  The recorder chooses the instances to
record a ball by examining path curvature and velocity changes but it
could be modified to perform sampling at uniform time intervals too.
It could also be modified to keep track of ball velocity, spin and
orientation as we as position.  All we need then is an http page that
returns this log of the shot in plain parseable text.

What do you think of all this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]