Opus Motion ★ Star on GitHub

Data · pythagoras-rearrange

Pythagoras proof by rearrangement

A square of side a+b draws on; four right triangles pop in around a tilted c-square, then three of them slide into two rectangles, uncovering the a-square and the b-square, and a² + b² = c² writes itself below.

A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Pythagoras proof by rearrangement: three frames of the animated chart, start, middle and end
Pythagoras proof by rearrangement — start, middle and end of the 7.3-second motion.

What Pythagoras proof by rearrangement is for

Maths lessons, geometry explainers, "the proof in 7 seconds" shorts, and any "same pieces, new arrangement" idea.

  • math
  • maths
  • geometry
  • pythagoras
  • pythagorean theorem
  • proof
  • triangle
  • square
  • education
  • explainer
  • rearrange
  • area
  • teaching

Details

Category
Animated charts & data visualisation
Length
7.3 s (220 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
title
Colour props
background ink triangleColor cColor aColor bColor
Mood
3d
Roles
subject

Use Pythagoras proof by rearrangement in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add pythagoras-rearrange --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render pythagoras-rearrange --props '{"title":"Why a² + b² = c²","background":"#F4EFE6","ink":"#1F2A44","triangleColor":"#F2B33D","cColor":"#5B8DEF","aColor":"#E2584D","bColor":"#43A57A"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export pythagoras-rearrange --as mp4 --props '{"title":"Why a² + b² = c²","background":"#F4EFE6","ink":"#1F2A44","triangleColor":"#F2B33D","cColor":"#5B8DEF","aColor":"#E2584D","bColor":"#43A57A"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="pythagoras-rearrange"
  props={{
    title: 'Why a² + b² = c²',
    background: '#F4EFE6',
    ink: '#1F2A44',
    triangleColor: '#F2B33D',
    cColor: '#5B8DEF',
    aColor: '#E2584D',
    bColor: '#43A57A',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="pythagoras-rearrange"
  props='{"title":"Why a² + b² = c²","background":"#F4EFE6","ink":"#1F2A44","triangleColor":"#F2B33D","cColor":"#5B8DEF","aColor":"#E2584D","bColor":"#43A57A"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "pythagoras-rearrange",
      "props": {
        "title": "Why a² + b² = c²",
        "background": "#F4EFE6",
        "ink": "#1F2A44",
        "triangleColor": "#F2B33D",
        "cColor": "#5B8DEF",
        "aColor": "#E2584D",
        "bColor": "#43A57A"
      }
    }
  ]
}

Pythagoras proof by rearrangement props

10 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
a3short leg length (relative)
b4long leg length (relative)
title"Why a² + b² = c²"caption above the square
showLabelstrueside and area labels (a, b, c, a², b², c²)
background"#F4EFE6"background colour
ink"#1F2A44"outline and text colour
triangleColor"#F2B33D"fill of the four right triangles
cColor"#5B8DEF"c² square / equation colour
aColor"#E2584D"a² square / equation colour
bColor"#43A57A"b² square / equation colour

Notes & credits

Technique sources:

  • original design: classic rearrangement proof of the Pythagorean theorem