# Task: procedural Gaussian splat diorama

Write `generate.mjs`, a Node.js script (no npm packages, Node built-ins only) that, when run with `node generate.mjs`, writes `scene.ply`: a 3D Gaussian Splatting scene in the standard binary PLY format used by the original 3DGS paper (graphdeco-inria).

The scene: **a small floating island diorama at golden hour.**
- A grassy top surface, roughly round, about 6 units across, its top around y = 0.
- A rocky underside that tapers down to a point (an upside-down cone/stalactite shape), darker stone colours.
- A small wooden cabin with a red pitched roof.
- One pine tree (dark green conical layers on a brown trunk).
- A small pond of blue water on the top surface.
- A light stone path from the cabin door to the pond.
- A waterfall pouring off one edge of the island, falling down past the rock.
- A few small white clouds floating near the island.

## File format (must match exactly)
`ply` / `format binary_little_endian 1.0` / `element vertex N` / one `property float <name>` line per property / `end_header`, then N records of little-endian float32 in property order.
Required properties: `x y z nx ny nz f_dc_0 f_dc_1 f_dc_2 opacity scale_0 scale_1 scale_2 rot_0 rot_1 rot_2 rot_3` (normals may be 0; no other properties needed).
- Colour: `f_dc_k = (c_k - 0.5) / 0.28209479177387814` where c_k is the linear 0..1 colour channel.
- `opacity` is a logit: the renderer applies sigmoid(opacity).
- `scale_k` are natural logs of the Gaussian's standard deviation along each local axis.
- `rot_0..rot_3` is a quaternion (w, x, y, z); it does not need to be normalized but must not be zero.
- Y is up. The viewer camera orbits at radius 9.5, height 5.2, looking at (0, -0.4, 0).

## Constraints
- Between 100,000 and 500,000 Gaussians.
- Every centre within |x| ≤ 4.5, |z| ≤ 4.5, -4.5 ≤ y ≤ 4.5. No NaN or Infinity anywhere.
- No Gaussian larger than 1.0 (exp(scale) ≤ 1 on every axis). Use flat, oriented splats for surfaces (one small scale along the normal) so they look solid, not fuzzy.
- `node generate.mjs` must finish within 60 seconds and be deterministic (use a seeded PRNG).

## How it is judged
`node check.mjs` runs your generator and validates the file (format, count, bounds, sizes). It does not judge looks.
A hidden judge renders scene.ply in `viewer.html` (Spark renderer) from four angles and scores how clearly each listed element reads and how good the whole diorama looks. You cannot see the renders, so reason carefully about shapes, colours, splat sizes and opacity.

Work only in this directory. When done, reply with one short paragraph describing the scene you built.
