PartCAD
The first package manager for CAD files
Simulate procedurally generated alien landscapes under real stars and exoplanets. Physically computed sky, regolith and vegetation colours, with spectrum and pigment absorption charts, exportable as P
DesignJavaScript · CSSGitHub @eagnespuertoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
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.
Taken from the repository README
Loading the full README.
Read the full 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.