Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Virtual Tennis Tutorial #461

Draft
wants to merge 13 commits into
base: canon
Choose a base branch
from

Update docs/tutorials/virtual-tennis/index.rst

8fd6133
Select commit
Loading
Failed to load commit list.
Draft

Adds Virtual Tennis Tutorial #461

Update docs/tutorials/virtual-tennis/index.rst
8fd6133
Select commit
Loading
Failed to load commit list.
Cirrus CI / Linux python:3.10-slim failed Dec 10, 2023 in 1m 0s

Task Summary

Instruction main failed in 00:31

Details

✅ 00:00 clone
✅ 00:27 install
❌ 00:31 main

        assume(cam.left != cam.right)
        assume(cam.top != cam.bottom)
    
        note(f"point: {point}")
    
        point_frame = cam.translate_point_to_screen(point)
        note(f"point->frame: {point_frame}")
        point_viewport = cam.translate_point_to_game_space(point_frame)
        note(f"point->frame->viewport: {point_viewport}")
        assert point_viewport.isclose(point, rel_tol=1e-5, rel_to=[cam.position])
    
        point_viewport = cam.translate_point_to_game_space(point)
        note(f"point->viewport: {point_viewport}")
        point_frame = cam.translate_point_to_screen(point_viewport)
        note(f"point->viewport->frame: {point_frame}")
>       assert point_frame.isclose(point, rel_tol=1e-5, rel_to=[cam.position])
E       assert False
E        +  where False = <bound method Vector.isclose of Vector(0.0, 0.5000066757202148)>(Vector(0.0, 0.5), rel_tol=1e-05, rel_to=[Vector(0.0, 0.0)])
E        +    where <bound method Vector.isclose of Vector(0.0, 0.5000066757202148)> = Vector(0.0, 0.5000066757202148).isclose
E       Falsifying example: test_transformation_roundtrip(
E           vp_width=120,
E           vp_height=128849018881,
E           target_width=1.0,
E           cam_pos=Vector(0.0, 0.0),
E           point=Vector(0.0, 0.5),
E       )
E       frame: (-0.5, -536870912.0041667) -> (0.5, 536870912.0041667)
E       point: Vector(0.0, 0.5)
E       point->frame: Vector(60.0, 64424509380.50001)
E       point->frame->viewport: Vector(0.0, 0.5)
E       point->viewport: Vector(-0.5, 536870912.0)
E       point->viewport->frame: Vector(0.0, 0.5000066757202148)
E       
E       You can reproduce this example by temporarily adding @reproduce_failure('6.92.0', b'AXicY2B4x8zIwMBgw4ACGBmIAAegNABS4AHw') as a decorator on your test case

tests/test_camera.py:179: AssertionError
=========================== short test summary info ============================
FAILED tests/test_camera.py::test_transformation_roundtrip - assert False
 +  where False = <bound method Vector.isclose of Vector(0.0, 0.5000066757202148)>(Vector(0.0, 0.5), rel_tol=1e-05, rel_to=[Vector(0.0, 0.0)])
 +    where <bound method Vector.isclose of Vector(0.0, 0.5000066757202148)> = Vector(0.0, 0.5000066757202148).isclose
Falsifying example: test_transformation_roundtrip(
    vp_width=120,
    vp_height=128849018881,
    target_width=1.0,
    cam_pos=Vector(0.0, 0.0),
    point=Vector(0.0, 0.5),
)
frame: (-0.5, -536870912.0041667) -> (0.5, 536870912.0041667)
point: Vector(0.0, 0.5)
point->frame: Vector(60.0, 64424509380.50001)
point->frame->viewport: Vector(0.0, 0.5)
point->viewport: Vector(-0.5, 536870912.0)
point->viewport->frame: Vector(0.0, 0.5000066757202148)

You can reproduce this example by temporarily adding @reproduce_failure('6.92.0', b'AXicY2B4x8zIwMBgw4ACGBmIAAegNABS4AHw') as a decorator on your test case
======================== 1 failed, 388 passed in 30.24s ========================