pooltool.objects.cue.datatypes#
Overview#
Classes#
- class pooltool.objects.cue.datatypes.CueSpecs(brand: str = 'Predator', M: float = 0.567, length: float = 1.4732, tip_radius: float = 0.007, butt_radius: float = 0.02)[source]#
Cue stick specifications
All units are SI.
Methods:
- class pooltool.objects.cue.datatypes.Cue(id: str = 'cue_stick', V0: float = 2.0, phi: float = 0.0, theta: float = 0.0, a: float = 0.0, b: float = 0.25, cue_ball_id: str = 'cue', specs: CueSpecs = CueSpecs.default)[source]#
A cue stick
- V0#
The impact speed.
Units are m/s.
Warning: This is the speed of the cue stick upon impact, not the speed of the ball upon impact.
- Type:
- phi#
The directional strike angle.
The horizontal direction of the cue’s orientation relative to the table layout. Specified in degrees.
If you imagine facing from the head rail (where the cue is positioned for a break shot) towards the foot rail (where the balls are racked),
\(\phi = 0\) corresponds to striking the cue ball to the right
\(\phi = 90\) corresponds to striking the cue ball towards the foot rail
\(\phi = 180\) corresponds to striking the cue ball to the left
\(\phi = 270\) corresponds to striking the cue ball towards the head rail
\(\phi = 360\) corresponds to striking the cue ball to the right
- Type:
- theta#
The cue inclination angle.
The vertical angle of the cue stick relative to the table surface. Specified in degrees.
\(\theta = 0\) corresponds to striking the cue ball parallel with the table (no massé)
\(\theta = 90\) corresponds to striking the cue ball downwards into the table (max massé)
- Type:
- a#
The amount and direction of side spin.
\(a = -1\) is the rightmost side of ball
\(a = +1\) is the leftmost side of the ball
- Type:
- b#
The amount of top/bottom spin.
\(b = -1\) is the bottom-most side of the ball
\(b = +1\) is the top-most side of the ball
- Type:
- specs#
The cue specs.
Methods:
- copy() Cue[source]#
Create a copy
Note
specsis shared betweenselfand the copy, but that’s ok because it’s frozen and has no mutable attributes.- Return type:
- set_state(V0: float | None = None, phi: float | None = None, theta: float | None = None, a: float | None = None, b: float | None = None, cue_ball_id: str | None = None) None[source]#
Set the cueing parameters
- Parameters:
If any arguments are
None, they will be left untouched--they will not be set to None.