PART 08 / Advanced

Biological vision

How can local temporal signals support motion and looming computations?

Guided illustrated lesson

What you will learn

Build controlled motion stimuli and separate direction, expansion, and brightness responses.

Before you begin: Drosophila: anatomy, circuits & datasets; Computational neuroscience

START WITH A QUESTION

Picture this.

Hold a coin at arm's length, then bring it closer. It occupies more of your view even though the coin has not grown. That simple observation connects geometry, motion-sensitive circuits and an engineering question: when should a machine react?

Looming
Expansion of an object's image, often studied as a cue associated with approach.
Radian
An angle unit defined by arc length divided by radius.
Confounder
An alternative cause that could explain the observed response.

Read for the idea first. Work through the numbers next. Try answering the questions before opening the explanations.

The image contains clues, not direct distances

An approaching object usually expands in the image. An object moving sideways translates. A camera turning also creates motion across the scene. Before building a detector, draw these three cases. A camera measures light projected onto a sensor; distance is something we infer using additional information. A small nearby disk and a larger distant disk can look equally large. This ambiguity is not a software bug. It is a property of the information available in the image.

Build the angle from a triangle

Let a be the radius of a centered disk and z its distance along the viewing axis. Draw a ray to the center and another to the edge. Half the angular diameter has tangent a/z. Inverse tangent, written atan, answers 'which angle has this tangent?' Therefore θ = 2 atan(a/z). The ratio has no units because both lengths use meters. Python returns radians; degrees is only a display conversion. For a small a/z, θ is approximately 2a/z radians, but the exact expression is easy to evaluate.

A biological example becomes an experimental question

T4/T5 motion-selective populations and LPLC2 looming responses provide concrete research cases. Their value here is not a slogan that biology has already solved our engineering problem. They show how to specify stimuli and ask which response pattern a circuit distinguishes. A schematic of outward motion pooling is a hypothesis you can test. Compare expansion with translation, contraction and illumination change before calling a detector expansion-selective. The source papers provide the experimental conditions; our disk calculation is synthetic geometry.

Connect a cue to a decision

An engineered detector might estimate image expansion, filter it across time and compare the result with a threshold. A lower threshold may react earlier but create more false alarms. A higher threshold may miss fast approaches. Measure both reaction time and incorrect decisions. Time to contact requires assumptions about relative motion and object shape; angular size alone does not supply it. In a robot, the useful output is a timely, interpretable cue for a controller, not a claim that image expansion always means collision.

SEE THE RELATIONSHIPS

From structure to behavior.

Fly vision: a labelled conceptual diagram
Figure 8.1 · Fly vision. Original educational diagram; synthetic, not a measured result.
Looming: a labelled conceptual diagram
Figure 8.2 · Looming. Original educational diagram; synthetic, not a measured result.
The reasoning pathLight & contrast then Local motion then Expansion hypothesis then Bounded reflex1. Light & contrast2. Local motion3. Expansion hypothesis4. Bounded reflex
A learning flow for this part. Follow the assumptions through to an observable result.

CHANGE A PARAMETER. TEST YOUR INTUITION.

Why a nearby object looms larger

Move an object with radius 0.1 m closer. The angular size changes nonlinearly; this display is geometry, not a simulation of the fly's neurons.

Apparent size on a schematic visual fieldAt one metre, a 0.1 metre radius object spans about 11.42 degrees.Linear angular scale: 60° across the field

Interactive controls load with JavaScript. The worked example below is available without it.

MAKE THE IDEA PRECISE

The mathematics.

theta = 2 atan(a / z)
Symbols and units
SymbolMeaning
thetaAngular diameter, radians
aObject radius, meters
zDistance along the camera axis, meters
atanInverse tangent

Build the equation, step by step

  1. Draw a line from the observer to the object centre and another to its edge. The right triangle has opposite side a and adjacent side z.
  2. The half-angle satisfies tan(θ/2) = a/z. Apply the inverse tangent and double the result to get angular diameter.
  3. Radians are the natural mathematical unit. Convert to degrees only for display. When a/z is small, θ is approximately 2a/z radians; the approximation degrades for nearby large objects.

WORK THROUGH THE NUMBERS

Worked example

An object of radius 0.5 m at 5 m subtends approximately 11.42 degrees. At 2.5 m it subtends approximately 22.62 degrees. Angular growth is nonlinear; doubling apparent angle is only approximately related to halving distance at small angles.

A small Python experiment.

Python 3 · Standard library only · Synthetic educational example. Run this in your own notebook or a local file.

from math import atan, degrees
a = 0.5
for z in [5.0, 2.5]:
    print(f"{degrees(2*atan(a/z)):.2f} degrees")

Read the code as a story

The code keeps physical radius fixed while changing distance. atan calculates the half-angle in radians; multiplication by two gives angular diameter; degrees converts it for reading. Do not feed a degree value into a function expecting radians. The two outputs are close to a doubling, but not exactly double because the geometry is nonlinear.

Expected output

11.42 degrees
22.62 degrees

Change one quantity, predict the result, and then run the code again. Explain any difference before adding complexity.

Test your understanding.

Try it: Keep distance fixed and increase physical radius. Explain why expansion is not proof of approach.

Self-check: Can angular size alone reveal distance?

Not without information about physical size or another cue. A small nearby object and a larger distant object can subtend the same angle. Changes over time provide additional information, but require assumptions about object shape and relative motion.

Where this model stops: Angular size alone does not determine depth or collision risk.

A research question: Can an expansion detector reject self-rotation and illumination changes without excessive delay?

Record evidence in your mastery worksheet →

PREDICT / TRY / EXPLAIN

Design a detector's trick questions

Use paper, a calculator or the Python example. Write your prediction before checking the result.

  1. Calculate angles for radius 0.5 m at distances 5 m and 2.5 m.
  2. Keep distance at 5 m but double the radius. Compare with the previous near-object result.
  3. Draw four short image sequences: approach, sideways translation, physical expansion at fixed distance, and camera rotation. Write which should or should not trigger your proposed detector.
Compare with a worked solution

The first angles are about 11.42° and 22.62°. A radius of 1 m at 5 m also gives 22.62°, because a/z is identical. A detector based only on size cannot distinguish the two situations. Your test set must include plausible confounders, not only easy approaches.

CLOSE YOUR NOTES

Can you explain it back?

These questions test the reasoning, not just a remembered phrase. Say your answer out loud or write a sentence first.

01What happens to θ if both a and z double?

Reveal the reasoning for question 1

Nothing: a/z stays the same, so the angular diameter stays the same. This is a useful geometry sanity check.

02A detector always responds during approach. Is that enough?

Reveal the reasoning for question 2

No. It might respond to every kind of motion or brightness change. Measure its responses to negative controls and count false alarms as well as detections.

TAKE THE IDEA WITH YOU

Three things to remember.

  • Image size mixes object size and distance.
  • Geometry makes assumptions visible before learning begins.
  • Useful detectors need negative controls and timing measurements.

Next we change the sensor representation: instead of full images arriving at fixed intervals, what if each pixel reports a change when it happens?

Continue to Part 9 →

THE NEXT LAYER

Chapter depth map.

This introduction provides a first model. The following chapters are outlines for deeper future editions; their full treatments have not yet been published.

From light to motion

8.1 Signals before objects · Outline
  1. 8.1.1 Photons and photoreceptor transduction
  2. 8.1.2 Local contrast and adaptation
  3. 8.1.3 Spatial sampling and temporal filtering
  4. 8.1.4 ON and OFF information
  5. 8.1.5 Compare the fly visual front end with engineered cameras
8.2 Direction-selective circuits · Outline
  1. 8.2.1 Delayed correlation and motion-energy intuition
  2. 8.2.2 T4/T5 tuning and pathway distinctions
  3. 8.2.3 Optic flow from self-motion and object motion
  4. 8.2.4 Aperture ambiguity and contrast dependence
  5. 8.2.5 Compare circuit models with optical flow and CNNs

Approach, escape and evaluation

8.3 Looming as geometry and computation · Outline
  1. 8.3.1 Angular size and expansion rate
  2. 8.3.2 Time-to-contact under explicit motion assumptions
  3. 8.3.3 LPLC2 and radial motion opponency
  4. 8.3.4 Distinguish looming, translation and luminance change
  5. 8.3.5 Circuit evidence versus an engineered detector
8.4 From visual signal to reflex · Outline
  1. 8.4.1 Visual projection and descending pathways
  2. 8.4.2 Escape and collision-avoidance hypotheses
  3. 8.4.3 Stimulus sweeps and negative controls
  4. 8.4.4 Noise, occlusion and background motion
  5. 8.4.5 Evaluate robotics relevance in simulation

Read with the original sources.

These readings support the concepts and deeper investigation. The worked numbers and illustrations above are teaching examples.

Complete source register →

Where next?