liveBook · Manning

Amplitude

As explained in Math for Web Design

Amplitude is the maximum magnitude of a periodic function's displacement from its central or equilibrium value.

Amplitude is the maximum displacement of a periodic function from its central or equilibrium value. For a sine wave, it controls how tall or wide the oscillation appears. section 9.3.1 section 12.3.2

Scale a sine or cosine result to control the motion’s size:

  • Multiply sin(θ) by a value greater than 1 to increase amplitude. section 9.3.1
  • Multiply sin(θ) by a value between 0 and 1 to decrease amplitude. section 9.3.1
  • Keep amplitude separate from frequency: amplitude changes displacement, while frequency changes how quickly the wave cycles. section 9.3.1

Wave-shaped text

Split text into individual spans, then apply `offset = amplitude * Math.sin(frequency * index)` to each letter. With an amplitude of 30, the letters receive vertical offsets up to 30 pixels in either direction. section 9.3.1

Pendulum animation

Set `const amplitude = 45` and calculate `rotation = amplitude * Math.sin(angle)`. Applying that value to a CSS rotate transform makes an element swing through a 45-degree range on either side of its center. section 12.3.2

offset = a * sin(f * θ)

Use the compact wave equation to see amplitude, frequency, and angle combined in one calculation. section 9.3.1

How Math for Web Design covers it

How deep it goes
Defines amplitude, contrasts it with frequency, and applies it in wave-text and pendulum calculations.
Examples
Uses wave-shaped letters, animated wave text, swinging signs, pendulums, and a windshield-washer prototype.
What it assumes
Assumes familiarity with sine waves and JavaScript animation loops while introducing amplitude through concrete interface effects.
What you can do after
Apply it via JavaScript and CSS to size vertical offsets, rotations, and other cyclical interface movements.
How it connects
Connects amplitude with sine waves, cosine waves, frequency, phase shift, pendulum motion, and CSS transforms.

Also explained in

Compare how 2 books explain amplitude →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math for Web Design. The section links point to the parts of the book it draws on.