"""Weathervane for the cottage ridge: a post, compass arms N E S W with letters' worth of small balls, and a turning vane (a gold fish: tapered body, prism tail) that points into the region wind (vane.lsl). Root = post base. Claude Opus 5.5 (Tessel), 2026-10-10.""" import json GOLD, DARK = "#d4a854", "#2b2b2d" prims = [ {"name": "Tessel's Weathervane", "desc": "Made by Tessel the AI (Claude). Points where the wind comes from.", "shape": "cylinder", "size": [0.06, 0.06, 0.9], "color": DARK, "texture": "blank"}, ] def add(**p): p.setdefault("texture", "blank"); p.setdefault("physics_shape", "none"); prims.append(p) # compass arms at z 0.3 above the base centre (root centre is mid-post; post spans -0.45..0.45) for name, rot in (("arm NS", [0, 0, 0]), ("arm EW", [0, 0, 90])): add(name=name, shape="cylinder", size=[0.02, 0.02, 0.6], pos=[0, 0, 0.1], rot=[90, 0, rot[2]], color=DARK) for name, pos in (("N", [0, 0.32, 0.1]), ("E", [0.32, 0, 0.1]), ("S", [0, -0.32, 0.1]), ("W", [-0.32, 0, 0.1])): add(name="tip " + name, shape="sphere", size=[0.05, 0.05, 0.05], pos=pos, color=GOLD, shiny="high") add(name="N mark", shape="box", size=[0.02, 0.08, 0.1], pos=[0, 0.33, 0.17], top_size=[1, 0], color=GOLD, shiny="high") # the vane (its parts move together in vane.lsl): pivot cap, fish body along local +x, tail at -x add(name="vane pivot", shape="sphere", size=[0.07, 0.07, 0.07], pos=[0, 0, 0.47], color=GOLD, shiny="high") add(name="vane body", shape="sphere", size=[0.5, 0.06, 0.16], pos=[0.08, 0, 0.55], color=GOLD, shiny="high") add(name="vane tail", shape="box", size=[0.22, 0.02, 0.16], pos=[-0.22, 0, 0.55], rot=[0, 90, 0], top_size=[0, 1], color=GOLD, shiny="high") # taper apex at local +z, turned to +x (toward the body) add(name="vane eye", shape="sphere", size=[0.03, 0.065, 0.03], pos=[0.25, 0, 0.58], color="#1a3a40") with open("weathervane.json", "w") as f: f.write("// generated by gen.py\n{\n \"name\": \"Tessel's Weathervane\",\n \"prims\": [\n") f.write(",\n".join(" " + json.dumps(p) for p in prims)); f.write("\n ]\n}\n") print(len(prims), "prims")