Locating things to make line segments that have a constant distance between their ends

I don’t know if locating two things/parts that are used to make the ends of line segments that have the same distance (from end to end) is a type of pattern recognition. I’m trying to figure out if the distances should be the same, not because of how far apart the things/parts are from each other, but because the number of units of the distance is a constant variable. I’d like to use part of a ruler with electronic parts on each end to measure absolute (hopefully not relative, unless I have to) positions. The ruler would be attached to part of a tight-fitting sleeve of a dancer’s costume, somewhat parallel to a bone. The dancer would spin.

Instead of the length of the part of the ruler, I wonder if there are video games (that are made out of code that I can use) that use the length of something else, such as one of the following. The following might be used to do something as fast as possible, or while players compete to find out who can do it better.

  • - A wand
  • - A twirled baton
  • - A lacrosse stick
  • - Something juggled
  • - A carving/cutting knife, which might be used to carve a pumpkin
  • - A spatula used, by a child, to flip food through the air as many times as possible, before it lands on the spatula or a pan, and hopefully not on a burner or a floor
  • - Each of the sticks that make up a nunchucks
  • - An oar, used to go down a scenic river
  • - A pool cue stick
  • - A fishing pole
  • - A golf club
  • - A sports racket
  • - Two skates or skis (which would appear on a screen, and be controlled by electronic parts on the front and back of shoes)
  • - A shovel (that is used to dig, as quickly as possible, for a treasure), or something else with a long handle
  • - A small spade that children could use to plant flowers, and a watering wand to water them
  • - A long pole to which is attached a small container or blade, used to get riper fruit up in trees that have more fruit
  • - A pick used in a gold mine
  • - A potter's needle/wire used to shape/decorate clay, such as with a potter's wheel
  • - A chisel/file used to sculpt something, such as a spinning piece of wood
  • - The clapper in a bell that is used to make computer sounds
  • - A drumstick used in a marching band
  • - A handheld flag, pointed towards different directions
  • - A paintbrush used to decorate a thin pillar
  • - A climbing axe used to go up and around (to the left and/or right of a climber) from the bottom of a deep narrow hole, or up and around (to the left and/or right) a thin rock pillar
  • - A flashlight in an unlit underground maze
  • - A wood fire poker
  • - A stick used to roast marshmallows over a fire
  • - A fire hose nozzle, used to put out an apartment fire or a tree fire, without getting hit by falling structures/branches
  • - A short stick used to hold up (or lower) a mask at a party
  • - A balance pole used when pretending to tightrope walk (or use a balance beam) in front of a screen, which might show something far below the wire/rope
  • However, some of those might not be thick enough to make me worry about the line sight problem, like I have to worry about the thickness of body parts. Including when the line of sight is obstructed in one or more places, the distance of two points from each other (each time a computer generates two points that make up a line segment) would always be the same distance (if they were represented in three-dimensional space, which I don’t plan on doing), a distance proportional to the length of the part of the ruler, measured only once. Where should the distance start and end, at different times?

    Thank you.

    I’m not entirely sure how to answer this, but it would largely depend on the parameters set forth by the camera/lens/Field-of-Depth and calibrating all of these measurements based on your particular setup.

    I would suggest getting an AI camera and looking into OpenCV, then begin calibrations after getting a ‘handle’ on the basics