Skip to Content

Photographing a drop test

One student counts down and drops a remote; the other fires the shutter as it falls.

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 { HumanArchery, HumanBoltAction, HumanChain, HumanEmblem, HumanGestureRows, HumanMusketDrill, HumanObject, HumanPerformance } from "@automovie/motions";
import * as archetypes from "@automovie/archetypes";

const camera_counter = archetypes.createTable({ kind: "counter" });
const camera_counterAt = { at: { x: 0, y: 0, z: 0.53 }, yaw: 180 };
const camera = archetypes.createDevice({ kind: "camera" });
const cameraAt = { at: { x: -0.18, y: 0.914, z: 0.3 }, yaw: 0 };
const shutter = archetypes.createSwitch({ height: 1.065, travel: 0.003, kind: "button" });
const shutterAt = { at: { x: 0, y: 0, z: 0.35 }, yaw: 180 };
const sample_counter = archetypes.createTable({ kind: "counter" });
const sample_counterAt = { at: { x: 0, y: 0, z: 2.5300000000000002 }, yaw: 180 };
const sample = archetypes.createDevice({ kind: "remote" });
const sampleAt = { at: { x: -0.18, y: 0.914, z: 2.3 }, yaw: 0 };

// partner: body f1, at (0, 2) m, facing 0°, trained
const partner = HumanChain.subject("partner")
  .act("look", {
      target: {
        kind: "point",
        at: { x: 0, y: 1.5, z: 0 },
        frame: "world",
      },
      cue: "signal",
      seconds: 1,
    })
  .registered("gestureNod", { count: 1 })
  .registered("seize", { prop: "sample" })
  .act("look", {
      target: {
        kind: "point",
        at: { x: -0.18, y: 1.05, z: 2.3 },
        frame: "world",
      },
      seconds: 1,
    })
  .registered("gestureWave", { side: "left", count: 1 })
  .registered("thumbsUp", { side: "left" })
  .registered("countOne", { side: "left" })
  .registered("countTwo", { side: "left" })
  .registered("countThree", { side: "left" })
  .act("stand", { seconds: 0.8 })
  .over((overlay) =>
    overlay
      .registered("loose", { prop: "sample", hand: "right" }, "dt-drop")
  )
  .act("look", {
      target: {
        kind: "point",
        at: { x: -0.18, y: 0.91, z: 2.3 },
        frame: "world",
      },
      seconds: 1,
    })
  .registered("gestureNod", { count: 1 });

// photographer: body m1, at (0, 0) m, facing 0°, trained
const photographer = HumanChain.subject("photographer")
  .act("look", {
      target: {
        kind: "point",
        at: { x: 0, y: 1.1, z: 2.3 },
        frame: "world",
      },
      seconds: 1.2,
    })
  .registered("thumbsUp", {})
  .registered("pressRelease", {
      mechanism: {
        kind: "button",
        at: { kind: "prop", subject: "shutter", point: "press" },
        travel: 0.001,
      },
    })
  .act("look", {
      target: {
        kind: "point",
        at: { x: -0.18, y: 1, z: 0.3 },
        frame: "world",
      },
      seconds: 1,
    })
  .registered("okSign", {})
  .registered("gestureNod", { count: 1 })
  .act("look", {
      target: {
        kind: "point",
        at: { x: 0, y: 1.1, z: 2.3 },
        frame: "world",
      },
      seconds: 1,
    })
  .act("stand", { seconds: 1.8 })
  .registered("pressRelease", {
      mechanism: {
        kind: "button",
        at: { kind: "prop", subject: "shutter", point: "press" },
        travel: 0.001,
      },
    })
  .sync({
      of: "dt-drop",
      event: "open",
      offset: 0.08,
      align: "stroke",
    })
  .registered("victorySign", {});

const scene = partner.with(photographer);

// The lexicon's laws this scene's rows perform, registered with the performance.
const laws = [HumanGestureRows.gestureNod, HumanMusketDrill.seize, HumanGestureRows.gestureWave, HumanEmblem.thumbsUp, HumanEmblem.countOne, HumanEmblem.countTwo, HumanEmblem.countThree, HumanArchery.loose, HumanBoltAction.pressRelease, HumanEmblem.okSign, HumanEmblem.victorySign];

const props = [
  HumanObject.prop("camera-counter", camera_counter, camera_counterAt),
  HumanObject.prop("camera", camera, cameraAt),
  HumanObject.prop("shutter", shutter, shutterAt),
  HumanObject.prop("sample-counter", sample_counter, sample_counterAt),
  HumanObject.prop("sample", sample, sampleAt),
];

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

const input: IAutoMovieMotionHumanPerformance.IInput = {
  seed: "drop-test",
  performers: [
    { subject: "partner", body: bodies["f1"]!, at: { x: 0, y: 0, z: 2 }, yaw: 0, proficiency: { level: "trained" } },
    { subject: "photographer", body: bodies["m1"]!, at: { x: 0, y: 0, z: 0 }, yaw: 0, proficiency: { level: "trained" } },
  ],
  composition: scene.node,
  props,
  laws,
};
const performance = new HumanPerformance(input);