billiards-devel
[Top][All Lists]
Advanced

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

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


From: François Gaumond
Subject: Re: [Billiards-devel] Comparing billiards to other simulators
Date: Thu, 01 Apr 2010 06:21:39 -0400

Hi,

> 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?

Actually I never was able to find pertinent information about poolfiz
online. I got the sources from a colleague. I don't know if there
actually is a manual either. Nevertheless, reading the main header file
should give you a good overview of how it works. I have uploaded it to a
more or less permanent place:

http://cid-81aff2cbc5fc2bc9.skydrive.live.com/self.aspx/Public/Poolfiz/poolfiz.h

We were thinking of using the fizShot save and load methods to read and
write test shots. Basically the file is a dump of the table state (state
and position of each ball) before the events, a list of events from the
cue's collision with the cue ball to the last ball stopping, and the
final state of the table.

> 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?

This looks like it. For the time being I think only the resulting table
state (where the balls are as well as in which pocket they fell if they
were pocketed) should be enough if we want to be able to switch between
simulators for automated tests, but if we set the same coefficients in
poolfiz and billiards and compare the results they yield, then the full
path might get useful to know how the simulation differs.

I like the idea of receiving a plain text, this should be easy to
implement, the only flaw I see in this solution is that I have to start
the billiards server myself instead of from my program (although at
least I could easily ask it to quit). This is not a big issue, but it
would be preferable if I could find a way to start billiards remotely,
so that the host program starts billiards itself but only when it needs
it.

> 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.

I will first add the logging of where the balls are pocketed if this
information is not already taken in account by billiards.
Then I will create http pages that allow to set the table state and shot
parameters, as well as one that allows to get that information, and then
I will create a basic program that translate poolfiz objects to and from
billiards with these http pages. I'll give you an update after that.

Do you have any suggestions for how I could start billiards from the
host program?

Thanks,
Francois Gaumond





reply via email to

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