GIMP Repeat Mode: Sawtooth Wave vs Triangle Wave

In GIMP, the Gradient Tool includes a "Repeat" setting that allows you to tile a color transition across an image or selection to create repeating stripes. When you drag a gradient line shorter than the canvas, this setting dictates how the pattern continues beyond the endpoints. Understanding the difference between the Sawtooth wave and Triangle wave modes is essential for controlling whether your stripes have hard, directional seams or smooth, alternating transitions.

How the Repeat Setting Works

By default, GIMP's Gradient Tool is set to "None," meaning the start and end colors simply extend infinitely past the endpoints of your gradient vector. When you enable a Repeat mode, GIMP treats the distance between your click point and release point as a single cycle, looping that cycle infinitely across the canvas. The choice between Sawtooth wave and Triangle wave alters the mathematical progression of that loop.

Sawtooth Wave: Sharp, Directional Stripes

The Sawtooth wave repeats the gradient linearly from the starting color to the ending color, then immediately jumps back to the starting color to begin the next cycle.

  • Pattern Flow: Start Color \(\rightarrow\) End Color | Start Color \(\rightarrow\) End Color | Start Color \(\rightarrow\) End Color.
  • Visual Result: Every cycle terminates with a hard, sharp edge where the end color abruptly abuts the start color of the next repetition.
  • Best Used For: Creating distinct, directional stripes (such as candy canes or hazard tape), blinds, or any pattern requiring a clearly defined cutoff between repeating segments.

Triangle Wave: Smooth, Mirrored Stripes

The Triangle wave alternates the direction of the gradient on every cycle, moving forward from the start color to the end color, and then reversing from the end color back to the start color.

  • Pattern Flow: Start Color \(\rightarrow\) End Color \(\rightarrow\) Start Color \(\rightarrow\) End Color.
  • Visual Result: The repetitions blend seamlessly without any sharp seams or abrupt breaks. The pattern creates a mirrored, symmetrical oscillation between the colors.
  • Best Used For: Creating smooth, corrugated effects, soft ripples, continuous light-and-shadow waves, or seamless fabric-like textures where visible seam lines would be undesirable.

Summary of Differences

  • Transitions: Sawtooth produces an abrupt edge at the end of each stripe cycle, whereas Triangle produces seamless, mirrored reversals.
  • Symmetry: Sawtooth is asymmetrical and flows in one visual direction; Triangle is symmetrical and mirrors back and forth.
  • Frequency: Because Triangle wave must travel to the end color and back to complete a full symmetry loop, a single dragged distance produces two color slopes per full visual period compared to Sawtooth's single slope.