# greenhouse: a mesh for the world to draw in 3D. A flying greenhouse: nose toward -y, the envelope's centre at 0, the deck at z -19; the domes are glass (kind 2), the plants inside them; flies, so no ground.
# greenhouse.mesh: magic CBMESH1, uint32 vertices, uint32 indices; per vertex 40 B: float32 pos xyz (m, z up,
#   the footprint's centre on the ground at 0), float32 normal xyz, float32 uv, uint8 rgb (display sRGB),
#   uint8 kind (0 painted, 1 metal, 2 glass, 3 lamp), uint8 texture (0 none, else a row below), 3 pad;
#   then uint32 indices, 3 per triangle. A textured face: colour and alpha from the texture, cut under 0.5.
front -y
vertices 10223
triangles 11492
bytes 546840
# moving parts. spin <file> x y z ax ay az rev_s: a propeller mesh (built round its origin, spinning about its +Y)
#   placed at x y z (m, this file's frame) with its +Y turned onto the axis ax ay az, rev_s turns a second.
# u v carry the bending (texture 0 on every face, so a reader that ignores them draws the craft at rest):
#   v = 0 static; v = c + p: channel c, p in [0, 1) the strand's phase; u: the weight along the strand, 0 at its
#   root (fixed) .. 1 at its tip. channel <c> <name> amp <m> period <s> wave <cycles along> [bulge gulp lift]:
#   with a = 2 pi (t / period - wave * u + p + P), P the instance's own phase (0 for a single craft),
#   1 hang:    x y += amp * u^1.5 * ((cos a, sin a) + 0.35 (sin (0.37 a + 2), cos (0.29 a)))
#   2 hose:    as hang, and a gulp: the point moves out along its normal by bulge * exp (-((u - (1 - g)) / 0.035)^2),
#              g = fract (t / gulp + p): a bump running from the tip (u 1) up to the root (u 0) every gulp seconds
#   3 trail:   a towed train: x += amp * u * sin a, z += amp / 3 * u * sin (1.3 a + 1)
#   4 pulse:   a bell about the Z axis: c = the contraction, 0..1 (k = fract (t / period + P): c = sin (pi/2 k / 0.35)
#              while k < 0.35, then 0.5 + 0.5 cos (pi (k - 0.35) / 0.65)); x y *= 1 - amp * c * u, z -= lift * c * u
#              (u 0 at the apex, 1 at the rim)
#   5 tendril: as hang (u along it, p its sway phase), and x y *= 1 - amp4 * c (the full pulse of channel 4: it
#              hangs from the rim)
#   6 trail line: moves as trail (its own amp period wave), a thin line (the tow cable, net and load lines)
#   7 line:    does not move: a thin line (rails, cables, ribs)
#   radius <m> on a strand's channel (1 2 5 6 7): its typical thickness, so a far strand can be drawn at least a
#   pixel wide (pushed out along its normals, and as much more transparent) instead of blinking
spin greenhouse_prop.mesh -9.000 29.900 -19.600 0.0000 1.0000 0.0000 -2.600
spin greenhouse_prop.mesh 9.000 29.900 -19.600 0.0000 1.0000 0.0000 2.600
channel 7 line radius 0.08
# hard sphere x y z r | hard capsule x0 y0 z0 x1 y1 z1 r [moves <channel> <u>]: the solid parts (hulls, envelopes,
#   gondolas, balloons and their loads, a bell) as simple shapes round them, metres, this file's frame; the world
#   keeps these out of the ship. Hoses, tentacles, arms, cables and lines are soft and left out: they may brush by.
#   moves: the shape rides that bending channel at weight u (a towed balloon swings with its train).
hard capsule 0.00 -17.00 0.00 0.00 17.00 0.00 8.20
hard capsule 0.00 12.00 0.00 0.00 23.00 0.00 11.00
hard capsule 0.00 -14.00 -14.00 0.00 14.00 -14.00 16.00
hard capsule 0.00 -28.50 -21.60 0.00 -17.00 -21.60 2.00
hard capsule -9.00 26.30 -19.60 -9.00 29.90 -19.60 2.40
hard capsule 9.00 26.30 -19.60 9.00 29.90 -19.60 2.40
