Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mountain Tide 🌊⛰️

An experimental simulation inspired by Liu Cixin’s short sci‑fi story “Mountain” (《山》). It visualizes how a massive celestial body distorts a local ocean surface through Newtonian gravity and a shallow‑water height‑field model. ✨

What it does 🔭

  • Models a local ocean patch with volume conservation and damping.
  • Applies Newtonian gravity from a spherical body (with a smooth transition inside the sphere).
  • Renders a fixed‑view 3D height field on an HTML canvas.

Controls 🎛️

  • Mass: adjust the body’s mass (log scale).
  • Volume: adjust the body’s volume (log scale) and radius.
  • Height: distance from sea level to the sphere’s bottom.
  • Grid size: resolution of the height field.
  • Reset: restore a calm ocean surface.
  • Drag to rotate, scroll to zoom.

Run locally 🚀

No build step required.

# just open the file in a browser
open index.html

Or serve it with any static server:

python3 -m http.server

Then visit http://localhost:8000.

Notes 🧠

  • This is a visual, not scientific simulation. Numbers are stylized for readability.
  • The camera is fixed to a cinematic 45°‑ish view to emphasize the tidal bulge.

License 📄

See LICENSE.

About

受到刘慈欣短篇科幻小说《山》的影响,有感而发

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages