Skip to content

Eclipses and ring shadows #53

@electronicsbyjulie

Description

@electronicsbyjulie

Planets and moons should leave shadows on each other when an eclipse is in progress. Note that moons can eclipse moons too, as often happens with the Galilean moons. This should affect their visibility when zoomed in from Earth and other solar system objects.

Planets that have rings should display ring shadows.

There is a Point::get_distance_to_line() function that can be used to find whether an object eclipses another object, and whether a point on an object's surface is shaded by another object or a ring. If the shadow-casting object is within its own radius of a line connecting the surface point with the light center, it is producing an eclipse.

Note that the light center is not always the local cenobj, for example in multiple star systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions