Vulcan #10

Scroll
April 11, 2026
Download

Saw function with `min` and rotation.

The generating code:

var z = pixel.point;
z *= new Complex(0.7,0.7);
var a = saw(z.Real);
var b = saw(z.Imaginary);
pixel.value = Math.Min(a,b);

Here the pixel is set to the minimum value; the previous post, Vulcan #9, used the maximum. Also, the complex numbers are back — notice the multiplication on the second line.`*=` is shorthand for “multiply the left side by the right side, then assign the result back to the left side.”

Recall that these are all repeating patterns. The multiplication serves to rotate the pattern, in this case by 45°.