I’m proud to announce that Clisk now supports **Tau**.

If you care about elegance in your fundamental mathematical constants, then you should too.

In honour of Tau I’ve implemented the new “radial” effect, which can take any image and wrap it around the origin. Along with a “:repeat” keyword argument, this can create some nice patterns reminiscent of stars and flowers. The radial function itself was naturally expressed using the constant TAU:

(defn radial
"Wraps an image around origin in a radial fashion in the x-y plane"
[src & {:keys [repeat]
:or {repeat 1.0}}]
(warp [(vfrac (v* repeat (vdivide theta TAU))) , radius]
src))

Obligatory example usage:

(show (viewport [-1 -1] [1 1]
(clisk.effects/radial
vplasma
:repeat 12)))

**Pi** is maintained for backwards compatibility purposes.

### Like this:

Like Loading...

*Related*

In addition to backward-compatibility ;), it’s handy to have constants for various fractions of tau – not only pi, but pi/2 and sometimes smaller fractions. Where there are angles, there’s code like

`(+ theta pi/2)`

or`(clamp theta (- pi) pi)`

or`(sin (* (/ x period) tau))`

, so they save quite a bit of distracting division.Nice idea Arcane!

It’s a shame that Clojure doesn’t allow the `pi/2` notation – since “/” is reserved as a namespace delimiter. Any ideas for a good alternative? PI-DIVIDED-BY-TWO doesn’t seem like much of a win over (/ PI 2). Maybe HALF-PI?