Skip to content

[support-3d] A2. 3D ball-linear-cushion detection #303

@ekiefl

Description

@ekiefl

Category: Detection

Currently a stub: pooltool/evolution/event_based/detect/ball_cushion.py:70.

Relevant quote:

The main thing I do to avoid that giant equation is to shift the 3d-parabola-3d-cylinder problem into a 2d-parabola-circle problem. I ignore the component of the 3d-parabola along the axis of the cylinder.

The top of Simulator::predict_ball_rail_nose_collision is where that happens.

I establish a rotated Z-axis that is parallel to the cushion nose axis. I rotate both the cushion nose positions and the ball position polynomial to this new frame, then I do the parabola-circle intersection in the XY-plane.
And if you just want collision with a line, you can use a radius of 0 and it should work fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    support-3d3D simulation support — physics, architecture, rendering, and tests, behind the is_3d feature flag

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions