Read this first to resume. CT54.A6 = CT54.A5 with the movie timing and sharpness fixed, a new science document
for this version only, and option 5 described as an experiment based on the author's observations. The simulation
and every hash are CT54.A1's. Then read CT54.A6.CombinedSwarms_AUDIT.md (how to run it) and
CT54.A6.CombinedSwarms_SCIENCE.md (the science of A6 only, no history).
C:\Users\micha\Downloads\claude\CT54.A5.CombinedSwarms (renamed A5 → A6)._main.js: all A6 edits to the renderer were made by one script applied to A5's _main.js (kept in the
build session, not shipped); the diff is described below.The video continues to be at the wrong speed and the images appear to be soft. I need a document created which is the science of the current version, not the previous versions. The hovering swarm should be described as an experiment based on the observations of the author
_main.js, index.html)tick()): not recording → sim steps = SPEEDS·FPS·wall dt (fractional accumulator stepAcc; wall dt
capped at MAX_WALL_DT 0.25 s), camera springs use FRAME_DT = wall dt (FRAME_DT is now a let). Recording
(filming = recording && recMode && direction≠0) → exactly SPEEDS[speedIdx] steps and FRAME_DT = 1/FPS per frame,
then captureFrame(). pace.frac (screen speed ÷ chosen speed, per second) is shown on the HUD's movie line.Rec): constant frame rate — frame i: timestamp round(i·1e6/30), duration to the next; audio exactly
round((i+1)·48000/30) − written samples (1,600). TIMING, ?timing=, #timingSel removed; resetClock() is a no-op.
Encoder candidates (candidates()): avc1.42E0LL prefer-software quantizer (q = ?q=, default 18) → avc1.42E0LL
software bitrate → avc1.6400LL / 4d00LL / 42E0LL no-preference bitrate → vp09 quantizer → vp09 bitrate; LL = 2a
(≤ 8,704 MBs) else 33. ?encoder=hw puts prefer-hardware first. Each candidate must pass isConfigSupported and
probe() (encode one real frame at the size with the same options, output within 6 s). latencyMode: 'quality'.
Rec.mbps (actual bit rate), Rec.started, Rec.resize(w,h). busy() queue limit 3. Prepare backstop 120 s (each
step has its own limit); the note says "Preparing the movie recorder…" meanwhile.SIZE_MODE 'screen' (default; no ?w/?h) → screenPictureSize() = 16:9 contain-fit of <main>'s box ×
devicePixelRatio, even, ≥ 640×360, ≤ 3840×2160 area. W, H are let; UI_K = H/1080 scales MIN_BEE_PX (3 px),
the close-up's 2.5 px, the PIP margins/border. placePip(). Until Rec.started, resize / fonts.ready / a 1.2 s timer
re-fit the picture (Rec.resize re-checks the encoder); after, a note says the take's size is fixed. #sizeSel:
"Screen — W×H (default)" + 1280×720…3840×2160 (a fixed size reloads with ?w=&h=).OPTIONS[5].name "Hovering ball (experiment)", label "5 · Hovering ball —
EXPERIMENT (author's observation)"; page title plate CT54·A6; card tag "experiment · author's observation";
card text, .note5 box, banner, HUD and Option tooltip reworded. Still documented: false, not the default._SCIENCE.md rewritten from scratch for A6 only (sections 0–11: summary, swarm, scene, bees, shared model,
options 1–4, option 5 experiment, sound, what comes next, time/determinism/movie, tuned-vs-measured, sources).
_AUDIT.md rewritten for A6 (the A2–A5 change logs dropped; history lives here).4fe60707; option 5, 2,000 bees, 40 s = fbbc0818 (unchanged).First, I would rather not run a batch file to get a movie. Second, getting the movie seems to fail. Third the movie that is produced does not have audio. Fourth the movie that is produced is too low resolution. Can any of this be fixed?
(Context: A4's index.html showed nothing for the user; the user's movies so far came from A3's PNG frames, which I
encoded with ffmpeg here: 1280×720, no sound.)
_main.js)checkServer() is called without await; Rec.prepare() has a 2.5 s limit
per isConfigSupported call and 8 s overall. (Suspected cause of A4's blank page: the awaited prepare hung.)FilmSound: a software re-creation of Sound (wavetable bee wave, 10-voice bed with ±25-cent LFOs + LP 1400,
noise BP 260/Q0.9 and BP 5000/Q1.2, 16 nearest-bee voices with Doppler (tmult = SPEEDS·DT·FPS·direction, i.e. film
time) and equal-power pan; the same gains and time constants, smoothed per frame and ramped within it); frame(pos)
returns 1,600 stereo f32-planar samples; ×6 make-up (?moviegain=) + tanh. lastPos (set in renderNow) feeds it.
Sound.vol getter added. Measured −19 dBFS RMS / −7 peak; ~2 ms per frame. window.CT54.filmSound for tests.Rec: VideoEncoder + AudioEncoder (AAC mp4a.40.2, else Opus; 192 kbit/s) → mp4-muxer (video + audio,
firstTimestampBehavior: 'offset'); codec list by size (≤1080p: avc1.640028…; 1440p: 640032…; 4K: 640033…; VP9 last).
MediaRecorder fallback removed. busy() also watches the audio queue.W/H default 1920×1080 (even); #sizeSel (1280×720 / 1920×1080 / 2560×1440 / 3840×2160) reloads with
?w=&h=; bit rate by size 12/20/32/50 Mbit/s.#btnRec shows ● Recording m:ss / ○ Paused m:ss; the note says size, codec and sound._main.js but are dead (no server).TIMING ('live' default, ?timing=film, #timingSel). In Rec.add each frame's duration = real time since the
previous capture (1/120..3 s; first frame and after Rec.resetClock() — called by setDir and the Recording button —
1/FPS). Movie clock tUs; audio gets round(tUs·SR) − aSamples samples per frame: FilmSound.frame(pos, N) now takes
N and smooths with DTF = N/SR; Doppler tmult = SPEEDS·DT·direction / DTF.StreamTarget (chunked, 8 MiB, fastStart false); chunks kept as Blobs and stitched in
Rec.finish() (late writes patch earlier bytes).The audit says that ffmpeg could not be found, to reextract the zip, I did but it still did not work. I need a way to make a movie of this.
On disk, A3's folder held the bundled ffmpeg.exe, and the user had also extracted the zip into it (nested
CT54.A3.CombinedSwarms/CT54.A3.CombinedSwarms/). New frames (18:47) were written by a server rooted in the outer folder,
and the page showed the "not found" note. Most likely the server process was the pre-fix A3 server (started before
bundled_ffmpeg() existed) still holding port 8739; the new launcher could not bind and exited. Not confirmed, but A4
removes the dependency anyway. I made movies from both of the user's A3 takes with the bundled Linux ffmpeg:
CT54.A3.CombinedSwarms_movies/…182003.mp4 (19 s) and …185022.mp4 (4 s).
Rec in _main.js): WebCodecs VideoEncoder (codec picked by isConfigSupported:
avc1.640028 → 4d0028 → 42002a → 42001f → vp09.00.10.08), 12 Mbit/s (?mbps=), keyframe every 2 s; VideoFrame(canvas)
timestamped i/FPS; output → Mp4Muxer.Muxer (ArrayBufferTarget, fastStart in-memory). Backpressure:
encodeQueueSize > 6 skips the tick. Fallback: MediaRecorder on canvas.captureStream(0) + requestFrame().recMode: 'browser' (default), 'server' (?frames=1 + server + ffmpeg: the A3 PNG path), 'none'.finishBrowser()): flush → finalize → Blob; POST to /api/save_movie?name= when served by the launcher
(written to _movies/), else an <a download>; the player shows it with a "save another copy" link./api/save_movie (streams the body to _movies/); at start, if the port is busy it POSTs
/api/shutdown to the old server, retries, then tries the next 19 ports. The page compares /api/status label with
its own and warns about a stale server.CT54.A5.CombinedSwarms_mp4-muxer.5.2.1.js (+ LICENSE, MIT, Vanilagy), loaded before _sim.js.?frames=1 but excluded from the zip (keeps it ~2 MB)._movies/) and from file:// (download); ffprobe:
1280×720, 30 fps, all frames decode (VP9 there; H.264 in Chrome/Edge).Please mark the compact swarm option 2 as the default in a way that is obvious to anyone running this. Right now it comes up with the anomalous hover swarm as the default. Please start with the displays OFF, but a little notice for how to turn them on, maybe a little discreet text that says "Hit D to show displays" or something.
?option=5 left in the
address bar (switching options reloads with ?option=N&intro=0) was honoured. Fix: FRESH = intro !== '0'; a fresh
start forces OPTION = DEFAULT_OPTION (2). Only ?intro=0 reloads (option switches, tests) honour ?option..star badge on option 2 in the card (.opt.def: gold, glowing outline) and in the banner
(#optBanner.def); selector label "★ 2 · Compact — cool, tightly bound — DEFAULT" (OPTIONS[2].label in _sim.js);
gold .defline at the top of the card; Start reads "▶ Start option 2 — Compact (the default)". Non-default: banner
.notdef "not the default · press 2…", #btnDefault "★ Go to the default". .opt.five toned down to grey-rose.showHud = ?panels==='1'; setPanels(on) toggles #hudPlate, #camHelp and the hint
#dHint ("Press D to show displays", dim, lower left of the picture, clickable; placed by placeHelp()). D/H call
setPanels(!showHud).?option=5 → option 2 with all default markings; panels
hidden + hint; D shows them and hides the hint; ?option=5&intro=0 → not-default note + Go-to-default button; no errors.CT54.A5.CombinedSwarms_ffmpeg/: ffmpeg.exe (ffmpeg 7.1 win-x86_64) and ffmpeg-linux
(7.0.2 static), extracted from the imageio-ffmpeg 0.6.0 wheels (BSD-2 wrapper licence copied; the binaries are
GPL static builds). _server.py bundled_ffmpeg() is tried first (chmod +x on Linux if the zip lost it), then the
old search (next to the script, PATH, imageio_ffmpeg).-f concat, duration 1/fps,
-r fps -fps_mode cfr); missing is reported in the JSON, the sidecar and the browser note.CT54.A5.CombinedSwarms_movies/
CT54.A5.CombinedSwarms_movie_seed3906_20261012-182003.mp4 (19.07 s, 1280×720, H.264). The frames could not be deleted
from here; the next run's "new take" clears them. The zip excludes _frames/ and _movies/.clamp(10px, .45vw+.6vh, 16px); #card is position:fixed over the whole window
(max 96vh, z 50); fitCard() in _main.js shrinks font-size by 0.5 px until .fx-in doesn't overflow (on open,
resize, fonts ready). Tags scale (.68em), the ★ DEFAULT star sits in the title line, descriptions span both columns.
Measured: 1920×1080 → 15.1 px, 1600×1000 → 13.2 px, 1366×768 → 10.8 px, no overflow.This is the same as CT54.A1.CombinedSwarm Except that it should make clear that item 5 is an anomaly and it should default to one of the more common swarms, a tightly bound one. Also there should be a keystroke to make the displays that take up so much space in the upper left and lower left go away (perhaps 'D') It should also make clear in the herald that the simulation takes minutes to resolve.
_main.js OPTION = … : 2. The card's option 2 reads
"Compact · default", its description says "The default … tightly bound … one of the commonest shapes"; the banner
and HUD add "default"; the selector label is "2 · Compact — cool, tightly bound (default)" (OPTIONS in _sim.js).
optionOf() in the sim still falls back to 1 for unknown names (kept so the sim API is unchanged).OPTIONS[5].name "Hovering ball (anomaly)", label "… ANOMALY: observed, NOT in the
literature"; card tag "anomaly · not in the literature"; description starts "AN ANOMALY … Seen once; no study
describes it."; the red note is headed "Option 5 is an anomaly"; banner/HUD "ANOMALY — observed in the wild, NOT
documented in the literature". Labels only — the sim's numbers and hashes are unchanged.#hudPlate (upper left) and #camHelp (lower left); a line "D — hide these
panels" was added to the camera help and the footer key list; a short note in the footer confirms it..wait box at the top of the option card, the title-art
caption line, and the card footer.b525ef4c (same as A1). Headless Chromium from file://: default
loads option 2; card shows the wait box, default and anomaly badges; D hides/shows both panels; option 5 banner reads
anomaly; no console errors.(File names below were renamed A1 → A2 in this folder.)
Combine CT39 and CT52 into one combined swarm structure. Make it clear which of the 5 options one is picking. There should be one index.html file Make it clear that option #5 was observed (hovering in air) but not documented in the literature. At the top level have an audit .md and .html file to describe how to run this application and what the science is behind it.
| # | key | sim settings | from | status |
|---|---|---|---|---|
| 1 | beard | weather mild (22 °C), stem | CT39.C8 | documented |
| 2 | compact | weather cool (11 °C), stem | CT39.C8 | documented |
| 3 | broad | weather hot (32 °C), stem | CT39.C8 | documented |
| 4 | windy ("Swaying") | weather windy (18 °C, gusts), stem | CT39.C8 | documented |
| 5 | hover ("Hovering ball") | hover: true, 20 °C, still air, queenSettle 20 s, support irrelevant |
CT52.A2 | observed, NOT documented |
The 5 options are the four CT39.C7/C8 Weather presets plus the CT52 ball. "Hangs from" (stem / flat beam) is kept as a secondary setting for 1–4 and shows "nothing — the queen hovers" (disabled) for 5.
CT54.A5.CombinedSwarms_sim.js)P.hover, which is set by
opts.option === 5:hover: false;_buildBall / _sampleBall (the bee-density grid), _ballStep (mode 3), _diffuse (field diffusion split out),
the separate queen-pheromone grid qfield (allocated only for option 5, checkpointed);_stepOnce: the hovering queen's controller, mode 3, the CT52 version of "attracted" flight (lose the scent,
fly at the queen within visRange, join the ball), and the under-the-beam approach rule switched off — each behind
hover;_slow, the pole in _stone (only when this.pole exists), requestMove /
clearMoves / stationNow / _movesDone, ballShape(), and the option-5 census.OPTIONS table (1–5: key, weather, hover, documented, name, labels) and optionOf() exported in
window.CT54Sim (was CT39Sim / CT52Sim). The constructor takes { option }; an explicit weather still works
for 1–4.index.html, CT54.A5.CombinedSwarms_main.js)?option=1…5 (or names) chooses; HOVER in _main.js switches option-5 parts on: the pole, ballBox() framing
(CT52's settledBox), close-up elevation −0.18 rad (1–4: −0.55), aims queen/ball centre, phase text, HUD ball line,
odometers In ball / Milling / Scenting, scent slice through the station, Move queen (G) and Follow (L). Hidden for 5:
Chains, Grips, Load. Hidden for 1–4: Move, Follow.#card, the C8 help card reworked): "Choose one of five swarms" — five big numbered keys with a
description and a badge (green documented / red observed · not in the literature), the current one outlined, a
red note explaining option 5, and Start. Shown after the title, and again from ? Options or the banner.#optStrip / #optBanner, a strip between the controls and the picture): "N · OPTION N OF 5 · NAME"
plus the badge; red-edged for 5. The HUD's second line says the same.chooseOption()): the Option selector, keys 1–5, or a card key reload with ?option=N&intro=0. The bee
count resets to the option's default (7,500 for 1–4, 5,000 for 5) when crossing between hanging and hovering.window.CT54._AUDIT.md / .html); the title line and the footer link to it.| option | 60 s | 90 s | 120 s | 150 s | hash at 150 s |
|---|---|---|---|---|---|
| 1 | 29.4 % settled | 99.6 % | 99.9 % | 9.6 × 4.3 in | f96fb561 |
| 2 | 15.5 % | 76.4 % | 99.9 % | 6.8 × 4.4 in | b525ef4c |
| 3 | 29.6 % | 94.5 % | 100 % | 7.2 × 5.9 in | 84fc612a |
| 4 | 18.5 % | 64.7 % | 94.9 % | 4.9 × 5.3 in | 6c48c567 |
| 5 | 17.6 % in ball | 61.4 % | 96.5 % | ball ≈ 15 in (rms-equiv. 14.3 in) | 96e1ecbd |
(1–4: length × width of the settled bees from clusterShape().)
(File names below are the CT39.C8 names; in CT54 the prefix is CT54.A1.CombinedSwarms and the About file is the Audit.)
?intro=0).#card in index.html (the C2-era Zoltar style); openHelp() and runIntro() in _main.js.
The sim is unchanged from C7.Browser simulation (WebGL + three.js r186, vendored; works from disk) of a honeybee reproductive swarm. The bees mill
around, then cluster under an old, broken wooden arbor at the brink of a summit high above the Adriatic, just
before dawn. Open index.html (or run CT39.C8.Swarm_start.bat / .sh to record movies).
CT39.C8.Swarm_SCIENCE.md §6.7 (the C7 model) and the header of _sim.js.Real clusters don't show loose, dangling strands of bees on the outside. The chains are hidden under a smooth, tightly packed outer layer. Cover the cluster with a dense outer shell of bees, with the chains inside it. Add a Weather or Support setting that changes the shape: warm and calm on a thin branch gives the beard, while cold, wind, or a flat surface gives a compact ball. Also remove the text from the start of the simulation, just put a reference to an MD or whatever file that describes the situation.
(Background: the user's friend Craig Reynolds disputed the beard shape; a report that morning found that both shapes occur, depending on conditions.)
_sim.js)?shell=0 = the C6 model). The cluster's outline is a shape of
revolution around the queen (_envG, _envelope, _contain), its volume set by the settled bees and the packing.
Bees outside are drawn in each pass; inside, a light gravity (sagShell 0.0005 ft/tick) and 2 + 3 packing passes.
The shell (outer 2.2 contact distances; _findShell) packs at 0.62 and is drawn facing up.gripSoft 0). They are still taken and tracked (chains, loads, N view); stretched ones
are re-taken (_regripStretched). Why: with ropes alone, a narrow support gave a thin curtain and bees under a
shared hold crushed together (median neighbour distance fell to 0.3–0.5 of contact). With the envelope it is ~0.84.CONDITIONS):_stemAxisY); bees grip its lower half, and nothing climbs above its axis._inFootprint). Two bark-holders that
overlap may shuffle apart along the bark.1279a438 (before the late preset tweaks; recheck with window.CT39.sim.hash()).index.html, _main.js)CT39.C8.Swarm_ABOUT.html; the C6 captions are gone.
The footer has an ⓘ About link.?weather=mild|cool|hot|windy and ?support=branch|beam.| weather / support | depth × width (in) | shape |
|---|---|---|
| mild / branch | 7.8 × 3.8 | beard |
| cool / branch | 5.3 × 3.9 | compact |
| hot / branch | 5.6 × 5.1 | broad (volume ~2×) |
| windy / branch | ~4.2 × 4.5 | broad, sways ~0.7 in |
| mild / beam | 5.6 × 4.7 | compact mound |
| windy / beam | 4.1 × 4.9 | short, broad |
The following title cards will replace the one you wrote, with these 4, they will just be type overlays on top of the 3D environment but before any bees are present. Each card, so-called, fades in and then out. After the final card, the queen and the bees appear in the space and the audio begins. 1. "The following is a simulation of what is apparently considered a typical bee reproductive swarm." 2. "In this case, when the hive gets overcrowded, the old queen and some number of drones and workers are ejected from the hive, and the original hive grows new queens." 3. "In the mean time, the old queen and some loyal workers, attach themselves to a branch or some other handy surface, while scouts go out to find a place for the new hive." 4. "So this is a simulation of the queen and workers, having been ejected, as they create a temporary home. The bees are literally hanging from each other in long chains of bees."
The captions are used word for word. Only one stray comma is dropped, in card 3 ("loyal workers, attach" → "loyal workers attach").
Pending from the conversation (not in C6): the user saw a real swarm, a ~10 ft sphere of bees contracting to a 12–18 in ball that seemed unattached and not gripping. They will describe it, and a "hovering ball" mode can be built from that later.
runIntro() in _main.js; #caption in the page)swarm 3) for 15 s, as in C4.beesHidden hides the five bee meshes and the chain lines; the close-up window is not drawn.
* The HUD and the camera help are faded out (body.intro).
* The simulation stays paused at t = 0, so the scene is a still dawn.max(5, 2 + 0.33 × words) s, so about 7 s for card 1 and about 12 s for cards 2–4.
The whole sequence is about 75 s.
* Hint line: a small "Click to turn on the sound · Space to go on" sits under the text.URL options:
* ?intro=0 skips everything.
* ?title=<s> sets the title's time.
* ?captions=<x> scales the captions' hold times.
Removed: the C2 Zoltar-style card (#card) is gone from the page. Its CSS remains, unused.
Simulation: unchanged. The hash is the same as C5.
beesHidden = true and the sim step is 0.There should be some text with camera instructions, probably on the lower left of the main viewscreen window. It should probably advise the user to use the mouse to change the camera pov and the scroll wheel to move in or out. I think the wide viewscreen is pointing at the queen at the top of the cluster, but it would be nice if there was some more flexibility to change the camera pov to get a better idea of the structure of the swarm as it is being built. The close in viewscreen could be closer as long as it keeps the entire "settled, hanging" swarm in window.
_main.js "C5:", CT39.C6.Swarm.html)#camHelp)A small translucent plate in gold monospace type: * Drag: orbit around the swarm. * Wheel: move in / out. * Right-drag or Shift-drag: pan the view. * T: aim at the queen · centre · tip. * Double-click: re-centre. * A: auto camera.
Placement and behaviour:
* placeHelp() puts it in the corner of the rendered picture, not the window: the canvas is letterboxed, and the
plate follows on resize.
* It is not part of the WebGL canvas, so it never appears in recorded movies.
* H hides it together with the HUD.
settledBox(), recomputed every frame from
the displayed positions);?aim=centre|tip sets it from the URL.Simulation: unchanged. The hash is the same as C4 (seed 3906, 7,500 bees, 200 s: 648fafb6).
Please change the opening splash graphic to "swarm 3.webp" as found in the folder "C:\Users\micha\Downloads\claude\CT39.artwork"
The rest of the message repeated the earlier specs and lists, all already in place.
swarm 3.webp, copied unchanged as CT39.C6.Swarm_title.webp.swarm 9.webp.The rendering should default at the start to "shadows off".
The rest of the message repeated the C1 spec and the B2, B3 and C2 lists, all already in place.
_main.js: shadowsOn = qs.get('shadows') === '1'). Q or the Shadows button turns them
on, and ?shadows=1 starts with them on.648fafb6).shaded·reflect·crystal.shaded·shadows·reflect·crystal, and the shadows render.There appears to be some sort of repeating pattern, visible artifact on the ocean seen at a distance that looks bad. I think we should rewrite the text explanation used at the beginning of the simulation, to explain what is going on in more concise, less arcane language. Among other things it should explain that we are using the scent model of bee organization, and that the bees are organized in chains with the top bee gripping the surface of whatever material it is hanging from.
The rest of the message repeated the C1 spec and the B2 and B3 lists. These were handled as in C1 (see below).
_main.js, "C2: the waves")The cause. Since B3 the sea's ripples were a 256-px canvas normal map tiled 900 times across the 200,000-ft plane, so the pattern repeated every ~220 ft. Far out, the tiles and their mip levels lined up into a visible regular grid and moiré.
The fix: the waves are computed per pixel from the world position (seaMat.onBeforeCompile). There is no
texture any more.
* Wave trains: 13 of them, with incommensurate wavelengths from 1.7 to 173 ft and directions spread around a
wind direction, so the sum never repeats. The long ones are kept gentle (slope ≤ 0.013) so they never read as
stripes; a first try with a stronger 309-ft swell drew parallel bands.
* Irregular chop: the gradient of value noise at 5, 13 and 31 ft.
* Patchiness: a slow noise (260 and 900 ft scales) varies the wave strength across the sea.
* No aliasing: every wave train and noise octave fades out once it is finer than about a pixel. The fade is
computed from the pixel's footprint on the water, fwidth(world xz).
* Far sea: the detail that fades away is replaced by extra roughness (up to +0.33). The far sea goes smoothly to a
soft mirror, and the glitter path widens the way real sub-pixel chop widens it.
* Settings: base roughness 0.12, metalness 0.85, customProgramCacheKey 'sea-c2'.
CT39.C6.Swarm.html, #card)The card is rewritten in plain language, in the same CT46-style frame and fonts. * Heading: "The Exiled Queen and Her Swarm", with the kicker "The Swarm · What you are watching". * Three short paragraphs: 1. why a hive swarms: the old queen leaves with about half the workers and some drones, and they wait while scouts search for a new home; 2. the scent model: the queen, then each settled bee, gives off a scent that drifts through the air; every bee flies toward it and steers by its neighbours; 3. chains: a bee lands where it touches the cluster; the top bee of each chain grips the wood of the arbor and every bee below holds on to the bees above; a new bee starts a chain or joins one. * Styling: the drop cap is on the first paragraph only, and the key terms are in gold. * Footer: "Click to turn on the sound · Space to continue".
Simulation: unchanged. The hashes are the same as C1 (seed 3906, 7,500 bees, 200 s: 648fafb6, in Chromium and
Node).
An ancient site, possibly the Adriatic, at altitude, just before dawn; the sky lightening, the moon visible. We are overlooking the ocean from a high place. There is an old wooden arbor here, in bad shape. That is what the queen attaches herself to. Natural lighting, diffusely lit, occasionally backlit. Metal bees with narrow black and broad gold stripes, crystal wings, five red eyes, outline rendered. UI toggles for shaded/wireframe, shadows and reflection mapping. Title 'swarm 9' for 15 s, then the arcane card. Scent, neighbours, land on contact. Two viewports. Gold status type. Bee audio.
The B2 and B3 lists were repeated with it.
How the repeated lists were read: * Kept from B3: the distant Adriatic, no outlines on the stone, a degraded surface, and only one or two stars. * Stars: B2 asked for Rigel, Betelgeuse, the Pleiades and three planets; B3, the later request, asked to remove all but one or two. B3 wins: Venus and Jupiter and the crescent moon. * Gone with the stone: the B2/B3 items that only applied to the arch and ruins (a thin arch without gaps, crepidoma, stones) no longer apply. * Unchanged: 7,500 bees, outline off by default (U turns it on), the close-up placed low and looking up, and the compact HUD.
_main.js, "C1: THE ARBOR"; _sim.js, arborBoxes())Its bad shape:
* Sag. Both beams sag 0.18 ft at mid-span, a parabola that is lowest where the queen hangs.
* The fallen rafter still hooks on the back beam and its other end lies in the grass behind.
* A loose brace has come away and lies against the front-left post.
* Splintered ends on the back beam, on the rafters and on one slat.
* Offcuts lie in the grass.
* A dead vine: a gnarled stem winds up the front-left post and along the top of the front beam, and dry
tendrils hang from the rafters.
* A few bare rocks lie about the summit.
2. Weathered timber (woodBox()). Each piece is a finely subdivided box pushed into the wood by grain-aligned
noise, stretched along the length:
* raised grain;
* long checks (splits);
* rounded, crumbled arrises;
* rot at the post feet and the beam ends;
* optional splintered ends, where each "fibre" stops at a different length.
Surface and material:
* Vertex colours: silver-grey wood, dark in the cracks and the rot, damp-dark toward the ground, lichen on
the upper faces.
* Texture: a generated canvas with grain lines, knots and checks.
* Material: roughness 1 and almost no reflection (envMapIntensity 0.08): a dull, dry surface.
* Where the bees hang: weathering of the front beam's underside is capped at 0.02 ft into the wood, and it
follows the sim's sag.
* Wire look: the arbor uses a faint, translucent wireframe.
3. The sim and the picture use the same boxes. Swarm.arborBoxes() lists every solid part (posts, beams,
rafters, slats) as an axis-aligned box. The renderer builds the timber from exactly these boxes, and the sim keeps
flying bees out of all of them (_stone(), which now pushes out through the nearest box face).
* Cosmetic only: the fallen rafter, the brace, the vine and the rocks are not solid.
4. Attachment.
* _soffitY(x) is now the underside of the sagging front beam: attachY + beamSag·min(1, (dx/arborHalf)²), with
attachY 9.0 ft.
* _underArch keeps footholds 0.05 ft inside the beam's edges and 0.55 ft clear of the posts.
* Steering: a bee arriving above the beam flies out past its front or back face and comes in from below, as
it did for the arch.
5. The high place. The summit is now a polar mesh, fine near the arbor and coarse far away. 16–23 ft beyond the
arbor, on the sea side, it breaks off at a ragged brink and drops in cliffs toward the Adriatic ~1,400 ft
below. Steep ground is coloured as bare rock.
* From the default view (the camera on the landward side): the arbor is seen against the sea and the
brightening east, so the swarm is diffusely lit by the sky and backlit by the dawn.
6. Text.
* Card: the queen alights "upon the grey and broken timbers of a forsaken bower high above the sea".
* HUD: it now speaks of the arbor and the beam.
_sim.js, Swarm.RING)The foothold search pattern introduced in B1 was built with Math.cos / Math.sin. Those are not bit-identical
between JavaScript engines, and in B1–B3 the browser's runs differed from Node's (each was self-consistent, so
rewinds still matched). The pattern is now built from exact 30°/60° values and sqrt(3), plus two literal constants.
Browser and Node now give the same hash.
| t (s) | flying / attracted / settled / fanning | cluster (deep × along the beam) | bees gripping the beam | longest chain | hash |
|---|---|---|---|---|---|
| 60 | 5,557 / 461 / 1,482 / 191 | 4.4 × 5.1 in | — | 12 | 04cf6a44 |
| 120 | 0 / 4 / 7,496 / 1,130 | 5.4 × 8.2 in | 911 | 16 | e08b22d8 |
| 200 | 0 / 5 / 7,495 / 1,060 | 5.1 × 8.3 in | 1,053 | 13 | 648fafb6 |
| 250 | 0 / 2 / 7,498 / 978 | 4.9 × 8.2 in | 1,061 | 13 | 49061889 |
e08b22d8;648fafb6, the same as Node;a3ff60d6 at step 1180, the same as a fresh Node run.q=low). A real GPU shows the full dawn
gradient.Off in the distance is the adriatic · Remove all outlines from the stone · Remove most of the stones, except for the arch and some of the crepidoma · All stones should be severely degraded, both in terms of geometry and surface reflectivity · Remove all but one or two stars
"Outlines" is taken to mean B2's glowing symbol tracery on the stones. The bee outline switch (U, off by default) is unchanged.
_main.js)CT39.C6.Swarm_symbols.js is no
longer shipped; the artwork stays in CT39.artwork.erodedBox()). Every stone is a finely subdivided box whose vertices are pushed into
the stone by:
- fine pitting;
- rounded and chipped edges;
- missing chunks (large-scale noise).The push direction depends only on position, so faces stay joined. For the ring, the eroded box is bent into the half-annulus. - Surface: vertex colours put dirt in the hollows, darken toward the ground, add lichen patches and streaks. The material is fully rough and matte (roughness 1, no reflections, strong bump): no sheen at all. - Where the bees hang: soffit erosion is capped at 0.025 ft, always upward into the stone, so the sim's circle stays where the bees grip. The sim now keeps footholds 0.18 ft from the soffit's chipped edges and 0.35 ft from the springing (B2: 0.03 / 0.25). - Joints: the ring's feet run 0.35 ft down into the piers, so there is no gap at the springing. - Wire look: the ruins use a wireframe material, as the terrain does (no edge-line twins). 5. Sky. Only Venus (low over the sea, brilliant) and Jupiter (high south-east) remain, with the crescent moon. Orion, the Pleiades, Sirius, Mars and the background star field are removed.
Sim: only the foothold margins changed. With seed 3906 and 7,500 bees the results are identical to B2 (hash at
250 s 0d03ec0f; ~2,030 bees grip the stone, ~2.8 bee-weights each; the cluster is 4.2 × 11.5 in), because the cluster
never reaches the edges.
Browser simulation (WebGL + three.js r186, vendored; works from disk) of a honeybee reproductive swarm. The bees mill around, then hang from the stone underside of an arch at a ruined mountain-top sanctuary above the Adriatic, just before dawn.
CT39.C6.Swarm_SCIENCE.md (+ .html). New for B2: §4e The sky before dawn, and B2 results in
§4d.Stars: Rigel, Betergeuse, Pleiades · Planets visible: venus, jupiter, mars · Crescent moon visible · No columns or partial columns · The arch can be much thinner, with no visible gaps between stones · Much more outlines visible on all flat stones, the outlines can be self illuminating · The close in viewport should have the camera lower, looking up · Start with more bees, 7500 · Start with outline off · The text viewport should take up less space, fewer lines by half
(The B1 request text was repeated above it unchanged.)
skyDir(), SKY_OBJ, updateSkyObjects() in _main.js).
- Positions: real altitude and azimuth at 41.7° N (Monte Gargano), sidereal time 7.0 h (sun ~9° below the
horizon), rotated so the sun's azimuth lies on the scene's eastern glow.
- Objects: Betelgeuse (orange) and Rigel (blue-white) with the rest of Orion (Bellatrix, the belt, Saiph); the
Pleiades (7 stars at catalogue positions); Sirius; Venus (low east, brilliant), Jupiter (high south-east) and
Mars (reddish).
- Crescent moon: recomputed from the same table, ~24° up near Venus.
- Drawing: additive glow sprites, fixed size on screen.
- Dawn fade: each object fades on its own schedule, Venus last.
- Background: the procedural stars are fewer and fainter, so the named ones stand out; the moon's halo is
smaller.
- Accuracy: the planets' positions are plausible, not an ephemeris for a particular date (SCIENCE §4e).archDepth 1.8, archRing 0.75, pierW 1.3.carve() tiles gold tracery over the faces of every worked block: arch piers and plinths, altar,
platform steps (tops and risers), wall blocks, fallen and scattered stones. Each face gets up to 6 × 4 symbols, up
to 3 ft each, picked at random from the four, top faces in random quarter turns.
- The arch: 10 symbols follow the curve of each face of the ring, plus one on the keystone and a 7-ft plate in
the temple floor.
- Count: ~600 decals in total, merged into 4 meshes, one per symbol: 4 draw calls.
- Material: metal gold, plus self-illuminated gold emission (1.7 in the dark, falling to 0.9 as dawn
comes).
- Blending: alpha-blended rather than alpha-tested, and the masks are thickened (3×3 max filter), so the fine
lines fade softly with distance instead of vanishing.
- Wire look: the symbols are drawn in both looks.?outline=1 or U turns it on). Shaded, shadows, reflections and crystal wings stay
on.| t | settled | cluster (deep × wide) | gripping the stone | load on each top bee (bee-weights) | longest chain |
|---|---|---|---|---|---|
| 60 s | 1,596 | 4.1 × 5.7 in | 289 | 4.7 | 10 |
| 90 s | 6,144 | 5.4 × 9.2 in | 1,047 | 5.1 | 18 |
| 150 s | 7,496 | 4.3 × 11.4 in | 1,935 | 3.0 | 15 |
| 250 s | 7,497 | 4.2 × 11.5 in | 2,030 | 2.8 | 14 |
0d03ec0f, the same after a re-seek.B series, first version. Browser simulation (WebGL + three.js r186, vendored locally; works from disk) of a honeybee reproductive swarm: the bees dash around madly, then gather and hang as a living cluster under the stone arch of a ruined mountain-top sanctuary above the Adriatic, just before dawn.
Harness: Claude harness v2 (2026-09-27). Built 2026-10-06. Built on CT39.A12.Swarm, the highest A version, which
lives at C:\Users\micha\Downloads\claude\CT39.A12.Swarm\.
* Kept from the A series:
- the deterministic simulation (scent field, each bee's own decisions, landing on contact, hanging chains with grip
loads, strands);
- the sound;
- the two views (wide shot plus a small close-up), the camera that always aims at the queen, with drag to orbit and
the wheel for distance;
- the metal-plate UI with gold status type, rewind and recording.
* Replaced: the world, the look of the bees, and the opening.
* Science: CT39.C6.Swarm_SCIENCE.md (+ .html). New for B1: §4d (the stone arch, the climbing rule, a dawn
note, sacred bees) and §5b (the metal bees).
CT39.B1.Swarm. … the 3D environment and visual design has changed. The locale is … an ancient setting, possibly the adriatic, at an abandoned sacred site, at altitude. It is just before dawn, the sky is lightening, and the moon is still visible. There are the remains of an ancient stone altar and some ruins of a temple … there is an arch that would provide a base for the queen to attach to and for the swarm to form around. The illumination is all natural … the swarm is diffusely lit from the sky and is occasionally backlit. The ruins, the altar and the foundation have embedded in them designs and hieroglyphs barely visible that contains esoteric symbology … a cult of mechanical and divine swarms. Artwork … "swarm outline 2-5" … This symbology and the bees themselves are made of metal. The honeybees … metallic, with alternating narrow stripes of black and broader stripes of gold. The wings are … very thin and semi-transparent crystal. The five eyes of the bee are red. The outline of the bee is also rendered … The user interface should make it possible to turn on shading vs wireframe, turn on or off shadows, and other shading elements, such as the reflectivity (reflection mapping) of the metal. By default, shading, shadows, reflectance mapping and bee outlines should be enabled. … The web program begins with the title card artwork, which holds for 15 seconds, and then fades to the text that describes in arcane language the nature of the reproductive swarm, the deposed queen, and the loyal drones. … Bees land wherever they touch the growing cluster and either start a new chain or add themselves to an existing chain. There are two viewports … The camera is always pointed at the queen … mouse to orbit … scrollwheel … The second viewport is much smaller and is a closeup … The status … in gold type … audio … The opening splash / title card should be "swarm 9.webp" …
The request gives the title 15 s in one place and "about 10 seconds" in another; 15 s is used.
CT39.C6.Swarm_title.webp (copy of CT39.artwork\swarm 9.webp, 816×1456) fades in and holds
15 s.?intro=0, ?title=, ?card=._main.js, "B1: an abandoned sacred site")Everything is generated in code except the inlaid symbols.
* Sky. A shader dome: deep-blue twilight, a warm glow along the eastern horizon (over the sea, a little left of
behind the arch from the default view), a rose band above it, and stars that fade as it brightens.
- Dawn follows simulation time: from 0 (sun 12° below the horizon) to 1 (1° below) over 300 sim-seconds
(?dawn=). Movies are therefore identical on any PC, and rewinding darkens the sky again.
- Moon: a waning crescent ~12° up just south of the glow, its lit limb toward the hidden sun, with a faint
earthshine disc and a halo.
* Light (all natural):
- sky light (hemisphere, bluish, growing with dawn);
- the glow of the east: a warm directional light from 5–8° above the eastern horizon. It casts soft shadows
(4096² map, PCF radius 4) and is the light that backlights the swarm from the default view;
- faint moonlight.
- ACES tone mapping, exposure 1.45, and exponential fog whose colour follows the dawn.
* Reflections. The sky alone, plus a dark ground, is pre-filtered into a PMREM environment map. It is rebuilt each
time dawn advances 3 %, and every metal reflects it (bees, inlays, crystal wings, sea).
* Land.
- A summit plateau of thin turf and rock, flat at the shrine, falling away beyond ~180 ft.
- Two rings of ridges: the near one below eye level, far inland mountains to the west, north and south a few
degrees above it. Both open to the east.
- The sea far below to the east, catching the glow.
* Ruins (rough limestone, procedural texture with bump, soft lichen, cracks):
- The arch: two ashlar piers with plinths and impost mouldings, and a ring of 15 voussoirs with a proud
keystone. Its two attic blocks have fallen to its feet.
- The arch's stone is exactly the sim's: soffit radius archR 4 ft about (siteX, attachY − archR), crown 11 ft
up, depth 2.2 ft, ring 1.7 ft, piers 2.2 ft wide. The voussoirs' undersides are true arcs.
- The altar: a moulded block (base, die, cornice, cracked top slab) 11 ft in front of the arch, with a few fallen
offerings.
- The temple behind the arch:
- a three-step stylobate with fluted column stumps;
- four standing columns with capitals, an architrave on two of them and a beam askew on a third;
- fallen drums, a fragment of the cella wall, and scattered ashlar.
* Inlaid symbols (CT39.B2.Swarm_symbols.js, data URIs):
- Masks are made from "swarm outline 2–5.webp": the engraved gold lines of each plate are extracted (high-pass
on brightness and warmth), de-speckled, and stored as 512² greyscale.
- They are drawn as thin gold metal tracery set into the stone: alpha-tested decals, metalness 1, roughness
0.42, extra reflection.
- Placed on both faces of both piers, the keystone, the altar's front, sides and top, six small plates along the
stylobate riser, and a large plate in the temple floor.
- Barely visible by design: dark in shadow, catching glints of the sky when Reflections are on.
- (CT39.artwork also holds "swarm outline 1" and "swarm 1–10"; only 2–5 and 9 are used, as asked.)
_sim.js; STRIDE 23 unchanged)_soffitY(x) (semicircle) and _underArch(x, z) (inside the soffit's footprint, 0.03 ft margin from the faces,
0.25 ft from the springing);_branchGap is the distance below the soffit;_stone() tests the ring and the piers and pushes a bee out through the
nearest face, reflecting its heading. A scent-following bee (or the settling queen) above the arch flies out past a
face and comes in from below.climbReach = 1.6 body lengths
(A7–A10: 1.0), trying the spot above it and then two rings of nearby spots (Swarm.RING). Without this only ~1 % of
bees gripped the flat stone.attachY 11, branchRadius 0, archR 4, archDepth 2.2, archRing 1.7, pierW 2.2,
climbReach 1.6 (?climb=). A10's wire parameters are removed.1dd99bd5, also after
rewind and pause in the browser. 4,000 bees at 250 s → 908190b3._main.js, "B1: metal honeybees")?outlinew=).look=wire, shadows=0, reflect=0, outline=0, crystal=0, dawn=<s>, climb=, shadow=<map
size>, q=low, pip=0, bees=, seed=, intro=0, title=, card=, cam=orbit&dist=.q=low): forward ×16, backward, then pause gives hash 1dd99bd5, the same as a
fresh Node run; Finish & Make Movie wrote the MP4 and deleted all 28 frames.?climb=.There should be a button to toggle between wireframe & shaded. There should be a button to turn shadows on or off. I would like to start with fewer bees and see if it affects performance substantially. There should be lest debris, sofas, whatever in the empty lot. If shaders are working it would be nice to render the bees with an outline shader.
"lest debris, sofas, whatever" could be read as less or as lots. Because it names sofas, which the lot didn't have, I read it as more, and made the amount switchable so both readings are covered.
?look=shaded). Wireframe (A11) is the default.
- Every prop has both forms. Each solid keeps its shaded mesh and gets an edge-line twin; applyLook() shows one
set. The shaded look brings back A10's textured ground and oil stains, the sun, sky light, streetlight spot,
metal reflections and filmic tone mapping. The wire look shows A11's dark ground and grid.
- Bees:?wingfill=0/1 forces it off or on).?shadows=0). The sun's 4096² shadow map, redrawn for each view. They only appear in
the shaded look, so the button is dimmed in wire. Off means no shadow passes at all.?bees=N, skips the opening, and keeps the look, shadows, outline and junk settings.
- FPS odometer (new, first in the row) and a HUD line: the look in use, 1 or 2 views, the junk setting, frames
drawn per second (the loop is capped at 30, the film rate, so 30 = full speed), and the average milliseconds
to prepare and submit a frame.?junk=lots|some|none; default lots).
- some = A10's set: the car hulk, tyres, oil drums, pallets, refrigerator, cinder blocks and scrap heap.
- lots adds:?outline=0; ?outlinew= sets the width, default 0.035 body lengths). It is an
"inverted hull": the bee body drawn a second time in black, back faces only, pushed out along its normals in the
vertex shader. That gives a black rim around each bee's silhouette. It shares the bees' instance matrices, so it
costs one extra pass of the bee bodies. It is drawn in the shaded look only.The legend / fortune card before the simulation starts should hold longer. The type that describes the status should be larger and the color should be metallic gold. The camera of the window that is close up on the swarm should be further away from the queen. The color scheme of the bees should be striped black and red. The renderer should be wireframe as we need a better frame rate.
?card=<s> still overrides it, and Space / Enter / Esc or a second click
still pass on.?wingfill=1 brings back the faint membrane.
- The strand-contrast view (N) scales how bright each strand's red is; the chains view lights the longest chains
in bright red.
- Real honeybees are amber and black, not red (SCIENCE §5a).shadow= and lampshadow=.?q=low (fewer segments), ?pip=0 (no close-up), or fewer bees (?bees=6000).When the program starts, the main title card is displayed for about 10 seconds, then it fades and is replaced by a card in the style of CT46 Zoltar that says in arcane language that refugees from a hive have been expelled from the home that they had built and, with their deposed and exiled leader, their queen have embarked on a journey to find a place for a new home. This card also fades and the audio sound of the bees becomes audible, and the 3D background becomes visible, an empty lot with one streetlight, such as you might find in a junk yard a power line, sagging, that runs across the lot. This power line is the anchor to which the bees will follow the scent and create a temporary home. At this point the simulation begins. Instead of using color to reveal the chains of living bees, perhaps we can use contrast or varying intensity to outline the chains. There are two windows, one containing a wide shot of all the bees, and one a much smaller window which is close up on the emerging swarm architecture. The bees are represented by a simple geometry of a main body, a head, two eyes and two wings. The wings are transparent or perhaps just an outline of the geometry. The rest of the bee body appears to be made out of iron. The bridge, metal arch, whatever can go away. The rendering should be shaded and cast shadows.
The A9 prompt's cut-off line turned out to be: "The bees themselves should be luminous, like a mystical life form that is self illuminated." A10's iron bodies take precedence; the luminous idea survives as self-lit eyes.
runIntro in _main.js, #title / #card in the page)CT39.B1.Swarm_hive_title.webp (unchanged) fades in, drifts very slightly larger for 10 s, then
fades out. It no longer docks in the corner.CT39.C6.Swarm_fonts/Metamorphous-Regular.ttf, SIL OFL);?intro=0 skips it; ?title=<s> and ?card=<s> set the times.Everything is generated in code; there are no model or texture files. It is a junk-yard lot, monochrome.
* Ground. Packed dirt and gravel (a canvas noise texture) with oil stains.
* Fence. Chain-link at the back and sides, alpha-tested so it casts a lattice shadow.
* Junk. A stripped car hulk on its sills, a tyre stack and loose tyres, oil drums (one on its side), a stack of
pallets, a dumped refrigerator, cinder blocks and a scrap heap.
* The hive they left, ~100 ft off.
* The streetlight. Tapered steel pole, curved arm, cobra-head lamp with a lit glass and halo, and a spotlight on the
ground below. It casts no shadow by default; ?lampshadow=1 turns it on.
* The power line. Wooden poles with crossarms, braces, porcelain pin insulators, and a transformer can on the
right-hand pole. Two conductors run 84 ft between poles, with an extra span each side, and sag 12 ft: 24 ft up at the
insulators, 12 ft at mid-span over the lot. The swarm hangs from the front conductor (0.72 in across) at the
bottom of the sag.
* Light.
- Low late-afternoon sun: a directional light that casts the shadows (4096² map over ±55 ft; ?shadow= sets the
size).
- Sky fill from a hemisphere light; a grey sky dome brighter toward the sun.
- ACES tone mapping and fog.
- Metals (bees, conductors, steel) reflect a generated, pre-filtered grey environment; dirt, wood and stone don't.
* Removed: the arch, the A4–A9 wireframe grid and the black void.
_sim.js; STRIDE 23 unchanged)DEFAULTS: attachY 12.0, branchRadius 0.03, poleX 42, poleWireY 24, wireA 73.5._axisY(x) = attachY + r + dx²/(2·wireA), a parabola standing in for the catenary.beeBody, beeEyes, beeWingRim, beeWingFill in _main.js)aFold: 0 = spread … 1 = folded over the abdomen;aFlap: stroke angle.MIN_BEE_PX); the HUD shows
the factor. The close-up is at true size unless a bee would be under 2.5 px.?q=low halves the sphere segments for slower GPUs.?strands=contrast|chains|off sets the starting view.
* contrast (default): each strand's iron gets one of 5 brightness levels (×0.12, 0.38, 0.75, 1.2, 1.8), chosen by a
golden-ratio sequence of its top bee, so neighbouring curtains differ. Eye glow follows the level; the queen's strand
is brightest.
* chains: the 16 longest chains are bright iron with white lines along them; all other hanging bees go dark and
shrink to 40 %.
* off: plain iron.
* G grips are drawn in grey at the strand's level. K load and C caste shading are still available.
?pip=0 starts with it off.| t | settled | cluster (long × wide) | strands |
|---|---|---|---|
| 45 s | 508 | 4.7 × 2.3 in | 40 |
| 60 s | 2,055 | 6.8 × 3.1 in | 87 |
| 75 s | 5,622 | 8.4 × 4.1 in | 119 |
| 90 s | 10,920 | 7.8 × 5.1 in | 157 |
| 150 s | 11,999 | 5.0 × 6.0 in | 168 |
265a5747; 2,000 bees, step 924 → c8aaea1a.q=low):c8aaea1a, the same as a fresh Node run;?q=low, ?shadow=2048, ?pip=0, or fewer bees (?bees=).The swarm should hang from a cast iron arch, such as might have been used to build a bridge in England in the 19th century. The text should appear to be mechanical, and made of metal. It would be nice if the individual strands of bees could be more clearly visible, possibly through a color per strand? Th…
(The request ended mid-word at "Th"; whatever came next was not received.)
bridge in _main.js, geometry parameters in the sim's DEFAULTS.
* The bridge. A Telford-style road bridge modelled on the type of Cantlop Bridge, Shropshire, 1818 (SCIENCE §4b):
- one 31-ft segmental span, rise 6 ft, intrados radius 23 ft;
- 4 lattice ribs, 4 ft apart, each with bottom and top chords and an X-lattice web, cast in 5 segments with bolted
flange joints (none at the crown);
- 5 transverse members, X-braced between the ribs;
- ring spandrels with vertical standards and a deck bearer;
- cambered cast-iron deck plates;
- railings with a top rail, dog-rail, dog-bars, posts and end balusters;
- sandstone ashlar abutments with a string course, cast-iron skewbacks and road embankments.
* Where the swarm hangs. Under the crown of the front rib, which faces the camera. The bees grip its half-round
bottom bead (radius 0.09 ft).
* Sim changes (STRIDE unchanged at 23):
- _axisY(x): the bead's centre line, a circle of radius archR.
- _branchGap, _branchFree, the grip pass, the solid-iron pass and the climb onto free iron all use the local
height of the bead at each bee's x. A8 used a straight branch.
- Flying bees collide with the deck slab and the two abutments: pushed out of the nearest face, heading reflected.
The lattice ribs and spandrels are open; only the front bead is solid.
- A scent-following bee above the deck flies out past the front edge and drops below it before going in.
- New DEFAULTS: archR 23, archSpan 31, ribDepth 1, ribs 4, ribPitch 4, deckThick 0.35, deckOver 0.25,
deckCamber 0.0044, abutOut 22, deckEdge 0.7.
* Looks: T / Arch button cycles three modes:
- wire (default): hidden-line wireframe, with a black fill so the ironwork hides what is behind it, grey edges and
masonry joint lines;
- iron: shaded grey cast iron and sandstone, lit by a hemisphere light, a sun and a fill light;
- off: hidden.
- URL: ?arch=wire|iron|off.
sim.strands(root, parent, depth) is derived, never written to the state. Each hanging bee is
followed up its highest hold (fewest links to the iron) to the bee at the top of its strand that grips the iron; a
strand is everything hanging from that one foothold.?strands=colour|chains|off.CT39.B1.Swarm.html)CT39.C6.Swarm_fonts/ (woff2), no internet: Cinzel 400/700/900 and Share Tech Mono, both under
the SIL Open Font Licence (licences included). Taken from the @fontsource npm packages 5.3.0..woff2 MIME type.| t | settled | cluster (long × wide) | strands | longest chain |
|---|---|---|---|---|
| 45 s | 828 | 4.6 × 2.9 in | 102 | 12 |
| 60 s | 3,390 | 6.7 × 4.2 in | 226 | 18 |
| 75 s | 8,410 | 8.2 × 5.3 in | 349 | 25 |
| 90 s | 11,970 | 7.3 × 6.0 in | 427 | 21 |
| 150 s | 11,998 | 4.8 × 6.0 in | 442 | 13 |
be42b5b6; 3,000 bees, step 1440 → 3aa6d977. A fresh run and a re-seek give identical hashes.3aa6d977, the same as a
fresh Node run;When in auto mode, the camera should aim for the queen, and should not constantly jiggle around. When not in auto mode … the camera will orbit around the swarm/queen. The user should be able to adjust the distance from the queen/swarm. The program should begin by displaying the artwork hive_title.webp … then repositioning to the lower left, at which point the simulation begins. There should be audio that is the sound of the bees.
?cam=orbit&dist=20.CT39.B1.Swarm_hive_title.webp (copy of CT39.artwork\hive_title.webp, 816×1456 portrait) fades in
filling the view on black, holds 3.2 s, then glides (1.6 s, CSS transition) to the lower-left corner at 24 % of
the view height while the black backdrop fades; then the simulation starts (it is paused during the title).
Click or any key skips ahead. I hides/shows the corner logo. ?intro=0 skips the title. The logo is HTML, like
the HUD, so it is not in recorded movies.Sound module in _main.js, Web Audio, synthesised — no sound files, no internet). Details and sources
in SCIENCE §7b. Cloud chorus (10 buzz tones 196–256 Hz) + band-passed wing noise (260 Hz) + faint 5 kHz hiss,
level (√flying + 0.35√settled)/distance; 16 voices on the nearest flying bees (pitch by caste/size, 1/d loudness,
stereo by screen side, Doppler from velocity × sim speed × direction). Silent while paused; fades on Finish.
Browsers block audio until a click/key: the first click or key anywhere starts it (the button says
"Sound (click page)" until then). M / Sound button mutes; Vol slider. ?sound=0 starts muted..webp MIME type added. HUD: a camera line (mode, distance, bearing, elevation).?cam=orbit&dist=3 close-up of the hanging cluster at t = 100 s.this.wgt[i] is the bee's weight in mean-worker units, by volume.
- Grips live in the state, so checkpoints, seek and the hash cover them.barkBand 1 = up to the axis), one bee per spot (0.9 contact),
or settled bees above it.
- holdBelow −0.1: the held bee must be at least 0.1 link higher.
- A bee can be held by at most maxHeldBy 4 others, counted from the state by _holderCount (determinism).
- A landing bee that can't take any hold doesn't land (_settle returns false) and keeps flying.linkBody (≈ 13 mm). Searches use ±2 cells of the 0.035-ft hash.
Contact-length links collapsed the network into a crust.P.relaxEvery (RELAX_EVERY export = 16):_topology(): BFS from bark-holders gives depth and order; loads are passed up, shared equally among supporting holds;sag 0.016 ft per tick) plus a slow sideways crawl toward the queen;_branchFree allows a new bark spot only while the cluster is founding (< 40 bees),
or next to bark-holders carrying > barkComfort (0.25) × their grip strength.clusterShape().load carries the stats.climbRatio > 0, giving a sleeve);letGoBelow small, causing cascades);"The queen and the first settlers give off a scent that spreads through the air; each bee follows the scent toward its
source and steers by reacting to its neighbours; bees land wherever they touch the growing cluster." All three done —
nothing is scripted any more (no join times, no pre-assigned slots, no prescribed cluster shape or size):
1. Scent field: 64×28×64 grid of 1-ft cells around the site; explicit finite-difference diffusion (2 ft²/s) + decay
(0.08/s) every 1/30 s; ground reflects. Sources: queen (0.35 flying, 1.0 settled), fanning surface bees (0.03 each,
35 % of surface bees, emitted 1 ft outward = fanning away from the queen, Nguyen et al. 2021 PNAS). S shows a slice.
2. Each bee: own threshold (threshold × (0.3 + 5.7u²), threshold 0.05); above it → attracted → turns up the
trilinear scent gradient (gain 9); within 1.5 ft of the cluster edge flies at it. Neighbours: separation < 3 in
(1-ft hash of flying bees), cohesion to the centre of mass of bees within a ~12-ft block (4-ft density cells), and
stay-with-the-swarm turn-back beyond 0.7 × cloud radius around the flying centroid; radius ∝ cbrt(flying/total).
3. Landing on contact: fine hash (0.035-ft cells) of settled bees; attracted bee lands touching the first settled bee it
meets (contact = (ri+rj)·spacing, spacing = cbrt(0.6/packing)). Queen mills to 12 s, then alights under the branch.
4. Cluster physics (every 1/15 s): crawl toward the queen (0.25/s sideways, 0.0085/s vertical, ≤0.02 ft/s), two Jacobi
overlap-resolution passes (queen anchored), branch collision, surface detection (neighbours < 0.7 × mean) → fanning;
surface bees re-launch with p = 0.0004 per tick and may not re-land for 2–6 s (a few dozen bees always flying).
- Results (seed 3906, 12,000 bees, 20 °C): settled 9 % at 45 s, 33 % at 60 s, 94 % at 90 s, 99.6 % at 150 s;
cluster ≈ 8.3 in long × 4.5 in wide, measured packing ≈ 0.6; cloud ≈ 35–40 ft across while milling.
- Removed: ?shape=sphere, ?dia=, ?gather= (nothing to set — it emerges). Added: ?threshold=, ?fan=, ?temp=.
- Performance: ≈ 4–6 ms per 1/120-s step for 12,000 bees in Node (≈ 20–25 ms per film frame at x1) — about real time
on a normal PC; recording is frame-locked so movies are unaffected. Optimisations kept: staggered (1-in-4) smell /
cohesion / separation checks, face-aware neighbour cells, cache-friendly symmetric pair loop for the cluster, relaxation at 15 Hz.
- Determinism: checkpoints now also store the scent field (+ surface flags); the cluster hash is rebuilt after every
relaxation (index order) — required for exact backward seeking (verified: re-seek and fresh-run hashes identical).
- Renderer: HUD shows census (milling / following scent / settled / fanning), emerged cluster size; branch always on
(T toggles); shading and auto-zoom use the live cluster; S scent slice (grey dots, brightness ∝ (c/max)^¼).
Node: full run 0–180 s (numbers above), determinism (re-seek + fresh). Headless Chromium from file://: t = 1, 45 (+ scent slice), 90, 150 s — no console errors; through the server: forward, backward (rewind cache), pause → hash equals a fresh simulation; Finish & Make Movie wrote an MP4 and deleted the frames.
Tuned (not measured) emission/threshold/gain values; time still compressed ~8×; smooth scent (no turbulence/wind); queen's landing spot given; settled bees slide as spheres (no hanging chains); no thermoregulation, scouts or lift-off.
The "foot across" came from the user's own prompt ("perhaps a foot in diameter"), not from research. Checked against the
literature it is too big for a normal swarm, and real clusters hang as a beard, they do not hover. A5 does all three fixes:
1. Beard hanging from a branch (default). Branch shown by default (T still toggles it); the limb's underside is at
attachY = 8.6 ft. Profile: clings along the branch at 0.75 of its greatest width, widest 30 % down, tapers to a blunt
tip; cross-section 1.1 × 0.9 (along × across the branch); length = 1.6 × width (beardAspect). Grows from the queen's
spot just under the branch outward/downward. ?shape=sphere restores the hovering ball (centred 8 ft up).
2. Size computed from the bees: cluster volume = Σ(equal-volume bee spheres) ÷ packing fraction. Packing from
Ocko & Mahadevan 2014 (0.2–0.8) and Heinrich's ~2× volume change 15→30 °C: packing = 0.6 at 15 °C → 0.3 at 30 °C
(clamped). ?temp= sets the air temperature (default 20 °C → 0.50). ?dia= still forces a sphere of a given size
(HUD then shows the resulting packing, e.g. 0.10 for 1 ft — implausibly loose).
3. Typical size by default: 12,000 bees (≈1.4 kg, Seeley's ~1.5 kg swarm) at 20 °C → 3.0 L: beard ≈ 9.8 in long ×
6.1 in wide (sphere mode ≈ 7.0 in). 12 °C → 8.9 × 5.6 in; 30 °C → 11.6 × 7.2 in.
- HUD shows shape, dimensions, litres, packing, temperature and kg of bees.
- Sim changes: _geometry() (size/shape/centroid; P.siteY becomes the centroid so the cloud and swirl centre on it),
deterministic cbrt() (Newton, + − × ÷ only — Math.cbrt is not guaranteed bit-identical across engines),
beardProfile(u), castes are now drawn in a first pass and positions in a second → different swarm than A4 for the
same seed (still deterministic: repeat runs give identical hashes, e.g. seed 3903/12,000 bees at t=150 s → ce17be0a).
- Renderer: branch placed from sim.cluster.attachY; ball shading and the auto-zoom limit use the cluster's own width/length.
Node: 12,000 bees to t = 150 s → 11,756 clustered + 244 fliers, cluster bees between y 7.88 and 8.61 ft (hanging under
the 8.6 ft branch); repeat run identical hash. Browser from file://: t = 1, 85, 150 s (beard) and ?shape=sphere at 150 s;
no console errors. Recording/rewind code unchanged since A3.
?size=length) switches back to A3's body-length spheres.
Simulation (CT39.A6.Swarm_sim.js) is unchanged from A3 — same seed gives the same swarm and the same state hash.file:// at DPR 1 and 1.5, 10,000 bees: screenshots at t = 1, 62, 85, 150 s (wide wire cloud over the grid → shaded wire ball at ~400 mm); C / T / Z / L toggles; no console errors. Sim, rewind and recording code paths are unchanged from A3 (verified there: exact resume hash, MP4 made, frames deleted).
C:\Users\micha\Downloads\claude\CT39.A1.Swarm\CT39.A1.Swarm\): 300 bees milling inside an
8 ft sphere resting on the ground, head-height camera, schematic trees, sphere+arrow glyphs; deterministic sim core
(fixed step, mulberry32, only + − × ÷ √, exact checkpoints), Forward/Backward/Pause/speed controls, frame recording
through a local Python server and "Finish & Make Movie" (ffmpeg MP4, frames deleted after a verified encode).Downloads\claude, Downloads\claude\zips) or in past chats. If it exists
elsewhere, point a later chat at it.CT39.B1.Swarm.html (works from disk — classic scripts, no modules). Recording is off.CT39.C6.Swarm_start.bat (Windows; needs Python 3, and ffmpeg for the MP4) or run
./CT39.C6.Swarm_start.sh (macOS/Linux/WSL). It serves http://127.0.0.1:8739/ and opens the page; every frame
while running is saved; Finish & Make Movie encodes CT39.B1.Swarm_movies/CT39.B1.Swarm_movie_seed<seed>_<time>.mp4
(+ _info.json) and deletes the frames. ffmpeg: winget install ffmpeg, or drop ffmpeg.exe next to the server.look=wire|shaded, shadows=0|1, outline=0|1, outlinew=, junk=lots|some|none; default bees is now 4000; A11 added wingfill=1 and removes shadow=/lampshadow=; A10 added intro=0, title=, card=, strands=contrast|chains|off, pip=0, q=low, shadow=, lampshadow=1; A9 added arch=wire|iron|off, strands=colour|chains|off; A8: cam=orbit, dist=, intro=0, sound=0; A5): ?seed=3903&bees=12000&w=1280&h=720&gather=55&shape=beard|sphere&temp=20&dia=
(gather = mean seconds for workers to join after the queen; temp = air °C → packing; dia = force a sphere of that diameter in ft).| Key / button | Action |
|---|---|
| F / → · B / ← · Space | forward · backward · pause |
| + / ↑ · − / ↓ | faster / slower (x¼ … x16; x1 = real time) |
| R | reset to t = 0 |
| Z | auto-zoom lens on/off (off = fixed 60°) |
| E | visible-size exaggeration on/off (off = every bee at true size, sub-pixel when zoomed out) |
| C | caste shades (A4: greys — queen white, drones bright, workers dim) |
| N | chains: strands by contrast / 16 longest chains lit / off (A10; A9 used colour) |
| P | close-up window on / off (A10) |
| H | hide/show the HUD (the HUD is HTML, never in the movie) |
| A | camera AUTO (6 ft up, aimed at the queen) ↔ ORBIT (A8) |
| drag · wheel · [ ] | orbit · distance · distance (A8; switches to ORBIT) |
| O | slow automatic orbit (A8) |
| M · Vol slider | sound on/off · volume (A8; first click/key enables audio) |
| ● Recording / ■ Finish & Make Movie | as A1 (server only) |
| Sim time | Phase (shown in HUD) |
|---|---|
| 0–12 s | Milling cloud ~37 ft wide, 16 ft tall; bees swerve erratically at 4–24.6 ft/s. Lens ~32°. |
| 12 s | Queen alights at the site (8 ft up, 40 ft from the camera). |
| ~20–110 s | Condensing: workers peel off and spiral in; the ball grows from the centre out along an S-curve; the cloud shrinks; the lens zooms in. |
| ~110 s → | Clustered: ~98 % in the 1-ft ball (true-size spheres, ~400 mm telephoto); ~2 % keep circling. |
Real clustering takes 10–20 min; it is compressed ~8× (flight itself is real-time). Use ?gather= to change. |
| File | Purpose |
|---|---|
CT39.B1.Swarm_hive_title.webp |
A8 title artwork (from C:\Users\micha\Downloads\claude\CT39.artwork\hive_title.webp). |
CT39.B1.Swarm.html |
Page, buttons, HUD; loads the three scripts below. Canvas renders at a fixed W×H (movie size) and is scaled to the window with object-fit: contain (DPR-safe). |
CT39.C6.Swarm_sim.js |
Deterministic simulation core (window.CT39Sim; also require()-able in Node for testing). All parameters in DEFAULTS with their sources. |
CT39.C6.Swarm_main.js |
Scene, bees (one InstancedMesh of icosphere spheres), auto-framing camera, rewind cache, controls, frame capture. |
CT39.C6.Swarm_server.py |
A1's server (label changed): static files, /api/frame, /api/new_take, /api/finish (ffmpeg), Range requests for playback. |
CT39.C6.Swarm_start.bat / .sh |
Launchers. |
CT39.C6.Swarm_lib/CT39.B1.Swarm_three.r186.min.js |
three.js r186 as a classic script (window.THREE), esbuild IIFE bundle (same build as CT46). MIT licence alongside. |
CT39.C6.Swarm_SCIENCE.md / .html |
The biology, sources, and the model-vs-nature table. |
CT39.B1.Swarm.md / .md.html |
This context file. |
sim.seek() → determinism intact (verified: same hash as a fresh run).settle frames) — important for software-GPU testing.file:// at DPR 1 and 1.5: no console errors; screenshots at t = 1, 62, 85, 110, 150 s show cloud → condensing → ball.(File names below are the CT52.A2 names.)
This is a browser simulation (WebGL and three.js r186, bundled locally, so it works from disk) of a honeybee swarm. It does not hang from anything. The queen hovers in the open, and about 5,000 bees fly in a close ball around her, ~15 in across. New in A2: * a Move queen button sends her slowly 10 ft to the right, next to a 10-ft measuring pole, and a second press sends her back; * a Follow switch picks how the bees keep with her: by sight or by her scent alone.
CT52.A2.SphereSwarm_SCIENCE.md (plus .html). §9.6 is new: the move.index.html, or run the _start.bat / _start.sh launcher (needed for recording movies).(The A1 request was repeated above it and is quoted in the A1 section below.)
In this version there should be a button, that when clicked, causes the queen to move 10 feet or so to the right (or whatever). There should be a pole near to that new position, vertical, maybe 10 feet high, 1 inch in diameter, and with a band every foot that could be used to estimate height and size. When the button is clicked, the queen should move in the designated direction reasonably slowly and we will see what the other bees do. FWIW Many years ago, I observed the original large swarm, I observed a sphere of dense bees, and I observed a similar sphere in a different position. I did not see the swarm move, nor did I see the smaller sphere coalesce.
moveSpeed = 0.8 ft/s (~0.25 m/s), so the trip takes ~13 s. ?movespeed= changes it (0.1–8
ft/s).requestMove() writes an event (the step at which she is told) into
sim.moves. Her current station is A or B by the parity of the events already passed (stationNow()).poleR 1/24 ft) and 10 ft above the ground._stone() pushes them out radially).?follow=)this.ball, the centroid of mode 3),
and drifts up the gradient of her own pheromone at scentDrift 5 ft/s².qfield; same diffusion and decay; checkpointed). It is
diffused only in this mode.The ball is measured about its own centre, so a ball lagging behind the queen is not counted as "big".
| t (s) | queen x (ft) | sight: ball centre to queen | sight: 90 % within (of the centre) | scent: ball centre to queen | scent: 90 % within (of the centre) |
|---|---|---|---|---|---|
| 150 (press) | 0.0 | 0 in | 7.8 in | 10 in | 7.4 in |
| 154 | 2.9 | 1 in | 7.7 in | 20 in | 7.4 in |
| 158 | 6.1 | 1 in | 7.7 in | 28 in | 7.2 in |
| 162 | 9.3 | 1 in | 7.6 in | 30 in | 7.1 in |
| 164 (arrived) | 10.0 | 0 in | 7.7 in | 23 in | 7.5 in |
| 166 | 10.0 | 0 in | 7.7 in | 10 in | 7.3 in |
| 170–180 | 10.0 | 0 in | 7.7 in | 7–8 in | 7.4–7.6 in |
What this shows: * The ball keeps its size and shape in both modes: ~15 in across (90 % of its bees within 7.1–7.8 in of its centre). Its 5–95 % extent is 10–11 in along and across the path. It does not stretch out. * By sight: the ball goes with her as one body. The bees are pulled toward her far harder than her slow move needs, so it lags about an inch. * By scent: * At rest: she sits near the edge of the ball (7–10 in from its centre). The 1-ft air grid places the scent peak a little off her. * When she moves: her pheromone reaches the bees with a delay and their drift up its gradient is limited, so she flies out of the ball. * During the trip: the intact ball follows ~2.5 ft behind her (30 in at most). It closes to ~10 in 2 s after she stops, and to its resting 7–8 in after ~6 s. * Almost no bee is lost in either mode: about 50 are following and 30–50 milling at any time, as before the move. Fewer than 5 are within 2 ft of the old spot 6 s after she leaves. * Hashes (move at step 18000):
| follow | 150 s | 158 s | 200 s | 210 s |
|---|---|---|---|---|
| sight | 96e1ecbd |
9181e82b |
aa725396 |
d3bc1040 |
| scent | 31098197 |
1a27e969 |
f1dd1d4b (A1: 9503df3c), because the
pole deflects a few milling bees.This is a browser simulation (WebGL and three.js r186, bundled locally, so it works straight from disk) of a honeybee reproductive swarm. It does not hang from anything. The queen flies with the milling cloud for a while, then holds a point in the open and hovers there. The bees that pick up her scent gather around her and keep flying in a close ball, about 15 inches across.
C:\Users\micha\Downloads\claude\CT39.C6.Swarm.zip. The A12–C6 context is not repeated here:
read CT39.C6.Swarm.md in that zip. The scene, the bees' look, the UI, the sound, recording and rewind all come
from C6 unchanged unless noted below.CT52.A1.SphereSwarm_SCIENCE.md (plus .html). §9 is new: the flying ball and the evidence for
it. §1–8 are the CT39 science and still apply to the milling and scent parts.index.html (works from disk), or run CT52.A1.SphereSwarm_start.bat (Windows) or
CT52.A1.SphereSwarm_start.sh (WSL / Linux). The launcher starts the local frame server, which is needed for
recording movies.This is a variation on the latest CT39.Cx.Swarm simulations. The geometry used can be the same. As with the previous version(s) there is no wind, as if it were in a courtyard or other protected environment. Instead of the queen moving off to attach itself to some horizontal geometry, after flying around in the swarm for a while, the queen should position herself in the swarm somewhere and hold a mostly static position for the first phase of this simulation. When the bees sense the scent, they should fly reasonably close to queen and continue to fly around her in a reasonably close formation to the extent they continue to sense the organizing scent. If it makes sense to have other bees use their wings to beat the sense around, that is ok, otherwise, presumably the scent is diffused in a gradient around the queen. It is hoped that the bees will begin to form a "close in" shape around the queen, while still flying. When observed in the wild, the "close in" swarm of bees was roughly spherical and perhaps 12-18 " in diameter. No initial splash page or descriptive text is necessary at this time. The initial number of bees can be about 5,000 The rest of the user interface can stay the same. The simulation will run for several minutes, total time unknown. In a later version, after several minutes, the queen will fly to a location about 10-20 feet away, in a tree, but not attached to the tree. We want to see what is involved with the close in swarm following the queen.
The user once watched a real swarm: a sphere of bees about 10 ft across that contracted to a 12–18 in ball. The ball seemed unattached and the bees did not seem to be gripping anything. In C6 this was noted as a possible "hovering ball" mode for later. CT52 is that mode.
| t (s) | milling | following the scent | in the ball | scenting in flight | ball: 90 % within (in) | half within (in) |
|---|---|---|---|---|---|---|
| 10 | 5,000 | 0 | 0 | 0 | — | — |
| 30 | 4,944 | 3 | 53 | 11 | 8.1 | 3.5 |
| 60 | 4,206 | 22 | 772 | 149 | 6.9 | 3.8 |
| 90 | 2,290 | 43 | 2,667 | 526 | 7.5 | 4.5 |
| 120 | 353 | 66 | 4,581 | 925 | 7.7 | 4.9 |
| 150 | 42 | 56 | 4,902 | 988 | 7.6 | 5.0 |
| 300 | 26 | 44 | 4,930 | 992 | 7.6 | 5.0 |
What happens:
* 0–20 s: the milling cloud, as in CT39. The queen flies among the bees, slower and calmer than the workers.
* About 20–28 s: the queen flies to her station and holds it. The station is 7 ft up and 4 ft in front of the
arbor's front beam, toward the camera: in the open, inside the arbor's frame from the default view. She hovers there,
drifting a few inches (rms 0.08 ft).
* From about 28 s: her scent spreads. The bees that smell it fly to her and join the ball. Scenting bees in the
ball add their own scent, so the gathering speeds up.
* By about 140 s: 98 % of the bees are in the ball. About 50 bees are on their way in or out at any time, and
about 30 still mill.
* The steady ball:
* Size: 90 % of its bees are within 7.6–7.8 in of the queen, so it is about 15 in across. Half are within
5 in. The rms-equivalent diameter is 14.2 in.
* Speed: the bees fly at about 2.1 ft/s (0.65 m/s) on average, in all directions.
* The queen: she stays at its centre.
* Bee count changes the size:
* 1,500 bees: 90 % within ~7 in. Gathering is slower (less scent), and about half still mill at 240 s.
* 15,000 bees: 90 % within 8.6–10 in, so about 17–20 in across.
* Hashes:
* at 10 s: e671b582;
* at 60 s: 9503df3c;
* at 25 s (3,000 steps): 2a31c95c, the same after seeking back from 60 s;
* at 300 s: a2158f5e.
_sim.js; STRIDE 23 unchanged)New mode 3, "in the ball". The modes are now: * 0: milling. * 1: following the scent. * 3: flying in the ball.
Mode 2 ("settled") is never used in A1. The hanging-chain machinery (grips, loads, strands, _relax) is kept but
unused.
The queen (bee 0):
* Before queenSettle (20 s): she mills.
* After that: a velocity controller flies her to the station. Her cruising speed is 6 ft/s, slowing as she nears
it, and her acceleration is capped at 25 ft/s².
* Hovering: her drift is a slow Ornstein–Uhlenbeck (OU) offset kept in her otherwise unused grip slots 18–20, so
it is part of the saved state.
* At the station: within 0.5 ft of it, she becomes mode 3. She emits queenEmit (1.0/s); while flying she emits
queenFlyingEmit (0.35/s).
* When she turns: with almost no speed she slowly turns about the vertical, so her body orientation is defined.
Following the scent (mode 1):
* Becoming attracted: as in CT39, when the scent passes the bee's own threshold.
* Giving up (new): a bee goes back to milling if the scent falls below loseScent (0.5) × its threshold. This is
"to the extent they continue to sense the scent".
* Steering:
* within visRange (6 ft) of the queen it flies straight at her;
* otherwise it flies up the scent gradient;
* it slows as it nears her.
* Joining: within ballJoin (1.6 ft) it joins the ball (mode 3). A share scentFrac (20 %) of the joiners become
in-flight scenters.
* Landing and the C1 under-the-beam approach rule: both are switched off.
The ball (mode 3, _ballStep): each bee carries a velocity and feels four things.
1. A pull toward the queen: ballPull 24 ft/s², plus ballPullOut 80 ft/s² per ft beyond ballEdge 0.35 ft.
2. Personal space: a push down the gradient of the local density of ball bees.
* The density comes from a 40³ grid of 0.12-ft cells that follows the queen. It is rebuilt at 30 Hz, with each bee
spread over its 8 nearest grid points (cloud-in-cell).
* Strength: ballPress (2.2 ft²/s²) × ∇n / n0, stiffening as (n/n0)² once the density n passes n0.
* n0 = 1 / (ballSpacing × worker length)³, with a spacing of 1.35 body lengths (17 mm). That is ~5,500 bees/ft³.
3. Erratic flight: OU wander, at 0.55 of the milling wander strength.
4. Speed and drag: its own slow speed (ballSpeed 1.6 ft/s × the bee's OU speed factor, 0.7–4 ft/s; response 8/s)
and drag (3/s).
The size is not set anywhere. It comes from the bees' speed against the pull (a kinetic "temperature") plus personal space against crowding.
Other rules in the ball:
* Leaving: a ball bee goes back to mode 1 if it is flung beyond ballLeave (5 ft), or to mode 0 if it loses the
scent.
* Excursions: a ball bee darts out for 1–3 s at a rate of ballExcursion 0.004 per second, then comes back. This
keeps the edge alive.
* In-flight scenting: each scenter emits flightScentEmit (0.015/s) where it flies.
* The timber is solid for ball bees too.
* The milling neighbour hash and the cloud centroid use only modes 0 and 1. The ball would otherwise make the
separation loop quadratic and pull the cloud's "stay together" centre.
API:
* census() returns [milling, following, in the ball incl. the queen, scenting in the ball].
* ballShape() returns {n, cx, cy, cz, diameter (rms-equivalent), queenHolding, station}.
* window.CT52Sim is the sim's global.
Determinism: as in CT39, the sim uses only + − × ÷ and sqrt, a fixed step (1/120 s), and integer RNG. Checkpoints carry the whole state, so rewinding is exact.
Cost: about 0.35 s of CPU per simulated second at 5,000 bees (Node), so 1× runs comfortably in real time. At 15,000 bees it takes about 1 s per simulated second.
_main.js, index.html)?run=0 opens it paused (used for testing).settledBox()) is the 2nd–98th percentile box of the ball bees, so darting bees don't swing
it. While rewinding, it uses the bees within 5 ft of the queen.window.CT52 (was window.CT39).index.html).A2 or later: after several minutes, the queen flies 10–20 ft to a spot in a tree, but does not attach to it, and
the ball follows her. Much of this is already in place:
* the station is a parameter (stationDX/Y/Z);
* she flies to it with a velocity controller;
* the ball's density grid follows her.
What is needed: * a tree in the scene (the arbor scene has none); * a time for the move; * a choice of how the ball travels. A1's bees would follow her pull directly. Real swarms are steered by a few fast "streakers" (SCIENCE §9).