Vulcan #8
Next I introduce the saw (for sawtooth) function defined as
var saw = (double a) => Math.Abs(2*frac(a)-1);
This function rises smoothly from 0 to 1, then decreases smoothly back down to 0. Today’s image is defined by
var a = saw(x);
pixel.value = a;
You can see the smooth transition from dark to bright and then back to dark.
I checked with Google, and sometimes the sawtooth function is defined the same as the frac function — a sharp, discontinuous drop from 1 back to 0. In other contexts, the saw function is called the triangle function. So, in the unlikely event that you encounter these functions elsewhere, be sure to check the definitions.