Skip to Content

Judo randori

Two judoka bow, loosen up and square off, and one throws the other with a shoulder throw.

Loading the take.

Each person is a chain of typed actions from @automovie/motions. This is what an agent writes for the scene; Composing motion explains the parts.

import type { IAutoMovieMotionHumanBody, IAutoMovieMotionHumanPerformance } from "@automovie/interface";
import { HumanChain, HumanCoupled, HumanObject, HumanPerformance, grapple } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const mat_0_0 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_0_0At = { at: { x: -0.6096, y: -0.0127, z: -0.65 }, yaw: 0, fixed: true };
const mat_0_1 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_0_1At = { at: { x: -0.6096, y: -0.0127, z: 1.22 }, yaw: 0, fixed: true };
const mat_1_0 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_1_0At = { at: { x: 0, y: -0.0127, z: -0.65 }, yaw: 0, fixed: true };
const mat_1_1 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_1_1At = { at: { x: 0, y: -0.0127, z: 1.22 }, yaw: 0, fixed: true };
const mat_2_0 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_2_0At = { at: { x: 0.6096, y: -0.0127, z: -0.65 }, yaw: 0, fixed: true };
const mat_2_1 = archetypes.createExerciseMat({ length: 1.87, width: 0.6096, kind: "gym" });
const mat_2_1At = { at: { x: 0.6096, y: -0.0127, z: 1.22 }, yaw: 0, fixed: true };

// tor: body m2, at (0, -0.27) m, facing 8°, trained
const tor = HumanChain.subject("tor")
  .act("gesture", { kind: "bow", depth: 30 })
  .act("selfAction", { kind: "shoulderRoll" })
  .act("selfAction", { kind: "neckRoll" })
  .act("gesture", { kind: "squareShoulders" })
  .act("stand", { seconds: 1.5, sway: 0 });

// uke: body m1, at (0.09, 0.27) m, facing 188°, trained
const uke = HumanChain.subject("uke")
  .act("gesture", { kind: "bow", depth: 30 })
  .act("selfAction", { kind: "neckRoll" })
  .act("selfAction", { kind: "shoulderRoll" })
  .act("gesture", { kind: "squareShoulders" })
  .act("stand", { seconds: 1.5, sway: 0 });

const scene = tor.with(uke).next(
  HumanChain.mutual(
    HumanCoupled.grappling,
    { initiator: HumanChain.subject("tor"), receiver: HumanChain.subject("uke") },
    { kind: "seoiNage", outcome: "complete", side: "right" },
  ),
);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [grapple];

const props = [
  HumanObject.prop("mat-0-0", mat_0_0, mat_0_0At),
  HumanObject.prop("mat-0-1", mat_0_1, mat_0_1At),
  HumanObject.prop("mat-1-0", mat_1_0, mat_1_0At),
  HumanObject.prop("mat-1-1", mat_1_1, mat_1_1At),
  HumanObject.prop("mat-2-0", mat_2_0, mat_2_0At),
  HumanObject.prop("mat-2-1", mat_2_1, mat_2_1At),
];

// Each body id's motion body, prepared from the site's measures.
declare const bodies: Record<string, IAutoMovieMotionHumanBody>;

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "judo",
  performers: [
    { subject: "tor", body: bodies["m2"]!, at: { x: 0, y: 0, z: -0.27 }, yaw: 8, proficiency: { level: "trained" } },
    { subject: "uke", body: bodies["m1"]!, at: { x: 0.09, y: 0, z: 0.27 }, yaw: 188, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);