尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Procedurally generated landscapes under other suns - every colour computed from a spectrum. Star and exoplanet presets, per-spectral-type leaf colours, pigment absorption charts, PNG/JPG/PDF export.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Procedurally generated landscapes under other suns, where every colour on screen is computed from a spectrum rather than chosen by hand.
Pick a star, an exoplanet and an atmosphere, and the page works out what the sky, the ground, the water and — if anything can live there — the vegetation would actually look like. Then it shows you the spectra behind that answer and lets you export the whole thing as a data sheet.
No build step, no dependencies, no network calls. It is a handful of ES modules and a canvas.
Nothing here is art-directed. Each colour is the result of an integral.
The star is treated as a blackbody at its effective temperature. Planck's law gives the emitted spectrum, an atmospheric transmission profile attenuates it, and the result is integrated against the CIE 1931 2° standard observer to get tristimulus XYZ, then converted to sRGB through the D65 primaries and the sRGB transfer function. This path is ported from starlight-filter, which uses the same integral to drive a display's gamma ramp.
Because Beer's law is exponential in path length, a lower star simply means the zenith transmission raised to the air mass. That one relationship is why the same model produces a blue noon and a red sunset without being told about either.
A Rayleigh atmosphere scatters short wavelengths out of the beam, so the sky glows with exactly what the beam lost. Dust and haze absorb rather than scatter, so those skies take the transmitted tint instead of its complement — which is why Mars is butterscotch rather than blue.
Ground colour is the total downwelling light (direct beam plus skylight) times a mineral reflectance curve, integrated the same way. Out-of-gamut results are tone-mapped on luminance with the chromaticity preserved, so a deep Rayleigh sky comes out pale blue instead of clipping to flat white.
Photosynthesis is a quantum process, so the model counts photons, not energy. A reaction-centre pigment is chosen by weighing three things against each other:
1/λ_trap, because
energy above the trap is dumped as heat. This is what stops far-red pigments
winning under every star.Antenna pigments are then layered on, constrained by what can physically attach to what: a chlorophyll photosystem accepts chlorophyll b, carotenoids and phycobiliproteins, while a rhodopsin accepts only a carotenoid and bacteriorhodopsin runs bare. Phycobiliproteins carry a heavy cost penalty because a phycobilisome can run to half a cell's protein — which is why land plants never took that option, and without it the model paints Earth's forests red.
The leaf's reflectance is what survives that absorption, scaled by a structural reflectance term that reproduces the red edge. Its colour is the illuminant times that reflectance. Calibration check: Earth under the Sun comes out green, reflectance peaking near 550 nm with a red edge at ~705 nm, which is what real vegetation does.
This is a worldbuilding and teaching tool, not a radiative-transfer code.
The reasoning behind the leaf-colour model follows Kiang et al. (2007), Spectral signatures of photosynthesis.
There is nothing to install, but the page uses ES modules, so it needs to be served over HTTP rather than opened from the filesystem:
python -m http.server 8123
Then open http://localhost:8123.
| File | What lives there |
|---|---|
src/cie.js | CIE 1931 CMF table, Planck's law, XYZ → sRGB, tone mapping |
src/stars.js | Stellar presets, habitable zone, angular diameter, insolation |
src/planets.js | Atmospheric transmission, exoplanet presets, biome classifier |
src/pigments.js | Pigment spectra, suite selection, leaf reflectance solver |
src/scene.js | Ties it together — every derived quantity and colour |
src/landscape.js | The procedural renderer; shape only, no physics |
src/charts.js | Spectrum, absorption and reflectance charts |
src/exporter.js | Data sheet composition, PNG/JPG, and a hand-rolled PDF writer |
src/noise.js | Seeded PRNG and fBm |
src/main.js | UI wiring |
fonts/ | Atkinson Hyperlegible Next, self-hosted (SIL OFL 1.1, see fonts/OFL.txt) |
Seeds are deterministic: the same seed always redraws the same terrain at any resolution, so an exported sheet can be reproduced exactly.
MIT.