Skip to content

Add a rotatable 3-D globe and a tectonic-plates layer toggle - #3

Merged
veillette merged 1 commit into
mainfrom
claude/3d-earth-plate-tectonics-2f8aoh
Aug 5, 2026
Merged

Add a rotatable 3-D globe and a tectonic-plates layer toggle#3
veillette merged 1 commit into
mainfrom
claude/3d-earth-plate-tectonics-2f8aoh

Conversation

@veillette

Copy link
Copy Markdown
Contributor

The global map can now be drawn as an orthographic globe the user turns by
dragging (or with the arrow keys), and the per-plate colour wash has its own
checkbox alongside the other layers.

Both global views draw the same datasets in the same order and colours:
EarthCanvasNode owns everything they share, and each subclass supplies only
what depends on the shape of the world — the clip, the base map, and how a
polyline of lon/lat becomes a canvas path. Anything that draws geography,
including the plate labels and motion arrows, goes through the new
EarthProjection interface, whose project() reports whether a point is visible
as well as where it goes.

Three hazards are peculiar to the globe and are handled in GlobeCanvasNode:

  • The limb. Polylines are cut where they cross it; filled outlines detour to
    a ring outside the disc and skirt round to where they reappear, which the
    disc clip trims into a clean edge.
  • Long segments. The data was shaped for a flat map, where a straight line
    between vertices is right — the Pacific plate's eastern edge climbs 66° of
    latitude in one step, which on a globe is a chord straight through the
    Earth. Segments are now sampled along their great circle every 5°.
  • Dataset seams. Plates that straddle ±180° are stored slit open along it,
    and polar plates closed off along the pole. Invisible at the edge of a flat
    map; bright lines up the Pacific on a globe, so they are filled but not
    stroked.

The relief raster is equirectangular, so the globe un-projects each pixel of
the disc and samples it into a texture, rebuilt only when the camera moves.

The globe's camera lives in the view and is reset by Reset All; the choice of
globe or flat map is model state, so the screen summary describes it.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_013LZwLXenFAnHm6QiVYK8Ld

The global map can now be drawn as an orthographic globe the user turns by
dragging (or with the arrow keys), and the per-plate colour wash has its own
checkbox alongside the other layers.

Both global views draw the same datasets in the same order and colours:
EarthCanvasNode owns everything they share, and each subclass supplies only
what depends on the shape of the world — the clip, the base map, and how a
polyline of lon/lat becomes a canvas path. Anything that draws geography,
including the plate labels and motion arrows, goes through the new
EarthProjection interface, whose project() reports whether a point is visible
as well as where it goes.

Three hazards are peculiar to the globe and are handled in GlobeCanvasNode:

  - The limb. Polylines are cut where they cross it; filled outlines detour to
    a ring outside the disc and skirt round to where they reappear, which the
    disc clip trims into a clean edge.
  - Long segments. The data was shaped for a flat map, where a straight line
    between vertices is right — the Pacific plate's eastern edge climbs 66° of
    latitude in one step, which on a globe is a chord straight through the
    Earth. Segments are now sampled along their great circle every 5°.
  - Dataset seams. Plates that straddle ±180° are stored slit open along it,
    and polar plates closed off along the pole. Invisible at the edge of a flat
    map; bright lines up the Pacific on a globe, so they are filled but not
    stroked.

The relief raster is equirectangular, so the globe un-projects each pixel of
the disc and samples it into a texture, rebuilt only when the camera moves.

The globe's camera lives in the view and is reset by Reset All; the choice of
globe or flat map is model state, so the screen summary describes it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013LZwLXenFAnHm6QiVYK8Ld
@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@veillette
veillette merged commit b7aa2da into main Aug 5, 2026
5 of 7 checks passed
@veillette
veillette deleted the claude/3d-earth-plate-tectonics-2f8aoh branch August 5, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants