Image Toy

Write functions to calculate the RGB of each pixel

Your function has access to the following variables: x, y, w, h, cx, cy, t, PI, TAU, PI1_2, PI1_3, E, LN2, LN10, LOG2E, LOG10E, SQRT1_2, SQRT2

Your functions also have access to the following functions: sq(n), n2(x,y), n3(x,y,z), n4(x,y,z,w), abs(n), acos(n),

Each function should return a number between 0 and 255.

Function for red:

Function for green:

Function for blue:

Inspired by this Code Golf post: Tweetable Mathematical Art.