Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

In the coco.py, some doubts about the objects' relationships #8

Description

@hawkwater

In the coco.py, line 337-348

if sx0 < ox0 and sx1 > ox1 and sy0 < oy0 and sy1 > oy1:
        p = 'surrounding'
elif sx0 > ox0 and sx1 < ox1 and sy0 > oy0 and sy1 < oy1:
        p = 'inside'
elif theta >= 3 * math.pi / 4 or theta <= -3 * math.pi / 4:
        p = 'left of'
elif -3 * math.pi / 4 <= theta < -math.pi / 4:
        p = 'above'
elif -math.pi / 4 <= theta < math.pi / 4:
        p = 'right of'
elif math.pi / 4 <= theta < 3 * math.pi / 4:
        p = 'below'

I have some doubts about the 'above' and 'below', i think they should be exchanged and the code is

elif -3 * math.pi / 4 <= theta < -math.pi / 4:
        p = 'below'
elif math.pi / 4 <= theta < 3 * math.pi / 4:
        p = 'above'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions