"""B-boy toprock for a viewer (a viewer asked for a breakdance): arms-crossed stance, cross-step right, stance, cross-step left, drop into a crouch freeze with one hand down, back up. 4 s loop. Claude Opus 5.5, 2026-10-11.""" import json from pathlib import Path CROSS = {"mShoulderLeft": [0.35, 0.25, -0.9], "mElbowLeft": [0.35, -1.0, 0.25], "mShoulderRight": [0.35, -0.25, -0.9], "mElbowRight": [0.35, 1.0, 0.35]} OPEN = {"mShoulderLeft": [0.3, 0.9, -0.3], "mElbowLeft": [0.4, 0.7, 0.4], "mShoulderRight": [0.3, -0.9, -0.3], "mElbowRight": [0.4, -0.7, 0.4]} STAND = {"mHipLeft": [0, 0.03, -1], "mKneeLeft": [-0.05, 0.03, -1], "mAnkleLeft": [1, 0, 0], "mHipRight": [0, -0.03, -1], "mKneeRight": [-0.05, -0.03, -1], "mAnkleRight": [1, 0, 0]} def legs(**kw): d = dict(STAND); d.update(kw); return d frames = [ (0.0, CROSS, STAND, 0.0, 0, 8), (0.5, OPEN, legs(mHipRight=[0.45, 0.25, -0.86], mKneeRight=[0.35, 0.3, -0.9]), -0.02, -10, -6), # right crosses over (1.0, CROSS, STAND, -0.03, 0, 8), (1.5, OPEN, legs(mHipLeft=[0.45, -0.25, -0.86], mKneeLeft=[0.35, -0.3, -0.9]), -0.02, 10, -6), # left crosses over (2.0, CROSS, STAND, -0.03, 0, 8), # freeze: deep crouch, right hand planted forward-right, left arm flung up and back (2.5, {"mShoulderRight": [0.55, -0.3, -0.78], "mElbowRight": [0.45, -0.1, -0.9], "mShoulderLeft": [-0.3, 0.6, 0.75], "mElbowLeft": [-0.2, 0.4, 0.9]}, legs(mHipLeft=[0.85, 0.2, -0.45], mKneeLeft=[-0.35, 0.05, -0.94], mHipRight=[0.8, -0.35, -0.45], mKneeRight=[-0.3, -0.1, -0.95]), -0.42, 25, 18), (3.3, {"mShoulderRight": [0.55, -0.3, -0.78], "mElbowRight": [0.45, -0.1, -0.9], "mShoulderLeft": [-0.3, 0.65, 0.7], "mElbowLeft": [-0.2, 0.45, 0.9]}, legs(mHipLeft=[0.85, 0.2, -0.45], mKneeLeft=[-0.35, 0.05, -0.94], mHipRight=[0.8, -0.35, -0.45], mKneeRight=[-0.3, -0.1, -0.95]), -0.42, 25, 18), (4.0, CROSS, STAND, 0.0, 0, 8), ] keys = [] for t, arms, lg, drop, twist, lean in frames: keys.append({"t": t, "pos": {"mPelvis": [0, 0, drop]}, "rot": {"mTorso": [0, lean, twist], "mHead": [0, -lean * 0.6, -twist * 0.5]}, "aim": {**arms, **lg}}) spec = {"name": "tessel toprock", "duration": 4.0, "priority": 4, "loop": True, "loop_in": 0.0, "loop_out": 4.0, "ease_in": 0.3, "ease_out": 0.3, "hand_pose": "fist", "keys": keys} Path(__file__).with_name("toprock.json").write_text("// generated by gen_toprock.py\n" + json.dumps(spec, indent=1))