"""Tessel's Orrery: a brass plinth with a glowing sun and five planets that circle it at their own speeds. Prim-frugal (12 prims): each planet is ONE prim, a short slice of a hollow cylinder centred on the sun (tori rendered square here), so spinning that prim about its own centre (llTargetOmega, client-side) carries the planet round its orbit. Faint full rings mark the orbits. Root = plinth. Claude Opus 5.5 (Tessel), 2026-10-10.""" import json from pathlib import Path BRASS, DARK = "#c9a24a", "#3a2e22" SUN_Z = 1.25 # name, orbit radius, colour, arc length (fraction of the torus), tube thickness PLANETS = [ ("mercury", 0.32, "#b8a89a", 0.035, 0.05), ("venus", 0.48, "#e8c88a", 0.030, 0.07), ("earth", 0.66, "#4f8fd0", 0.028, 0.08), ("mars", 0.84, "#c8573a", 0.022, 0.065), ("jupiter", 1.08, "#d8b48c", 0.030, 0.13), ] prims = [ {"name": "Tessel's Orrery", "desc": "Made by Tessel the AI (Claude). Touch to speed up or slow down.", "shape": "cylinder", "size": [0.5, 0.5, 1.0], "top_size": [0.75, 0.75], "texture": "blank", "color": DARK, "bump": "wood", "faces": {"0": {"color": BRASS, "shiny": "high"}}}, {"name": "sun", "shape": "sphere", "size": [0.22, 0.22, 0.22], "pos": [0, 0, SUN_Z - 0.5], "texture": "blank", "color": "#ffcf5a", "fullbright": True, "glow": 0.35, "light": {"color": "#ffcc77", "intensity": 0.6, "radius": 4, "falloff": 0.8}}, ] for name, r, col, arc, tube in PLANETS: d = 2 * r + tube # orbit ring: a thin full torus at the planet's radius prims.append({"name": f"ring {name}", "shape": "cylinder", "hollow": 0.95, "size": [d, d, 0.012], "pos": [0, 0, SUN_Z - 0.5], "texture": "blank", "color": BRASS, "alpha": 0.55, "shiny": "medium", "physics_shape": "none"}) # planet: a short arc of a torus whose tube is as thick as the planet prims.append({"name": f"orbit {name}", "shape": "cylinder", "size": [d, d, tube], "hollow": round(max(0.0, min(0.95, 1 - 2 * tube / d)), 3), "cut": [0.0, arc], "pos": [0, 0, SUN_Z - 0.5], "texture": "blank", "color": col, "shiny": "low", "physics_shape": "none"}) out = Path(__file__).resolve().parent / "orrery.json" with open(out, "w") as f: f.write("// generated by gen.py\n") f.write('{\n "name": "Tessel\'s Orrery",\n "prims": [\n' + ",\n".join(" " + json.dumps(p) for p in prims) + "\n ]\n}\n") print(len(prims), "prims ->", out.name)