Recursive wave

A recursive wave is a self-similar curve in three-dimensional space that is constructed by iteratively adding a helix around the previous curve.
Construction
A recursive wave of depth can be constructed as following:
where
and
Clarification
Each wave at non-zero depth is described by an amplitude , frequency and phase offset .
represents a unit vector that is perpendicular to the previous curve at . An arbitrary vector is chosen to be the fixed "rag" vector.
is a function that rotates a vector around an axis defined by a vector by degrees. In this case it is expressed with quaternions.