Color Plot

Enter mathematical functions for each color channel to generate an image.

Example Functions

Circular Pattern

R: sin(sqrt(x*x + y*y))

G: sin(x) * cos(y)

B: cos(sqrt(x*x + y*y))

Checkerboard

R: sin(PI * x) * sin(PI * y)

G: sin(PI * x) * sin(PI * y)

B: sin(PI * x) * sin(PI * y)

Spiral

R: sin(sqrt(x*x + y*y) - atan2(y, x))

G: sin(sqrt(x*x + y*y) + atan2(y, x))

B: sin(3 * atan2(y, x))

Available Functions Reference

Basic Functions

  • x, y - Coordinates
  • +, -, *, / - Basic arithmetic
  • ^ or ** - Power (e.g., x^2)
  • % - Modulo (remainder)
  • abs(x) - Absolute value
  • sqrt(x) - Square root
  • cbrt(x) - Cube root
  • exp(x) - Exponential (e^x)
  • log(x), log10(x) - Logarithms

Trigonometric Functions

  • sin(x), cos(x), tan(x) - Basic trig
  • asin(x), acos(x), atan(x) - Inverse trig
  • atan2(y, x) - Angle from origin to point
  • sinh(x), cosh(x), tanh(x) - Hyperbolic

Constants

  • PI - π (3.14159...)
  • E - Euler's number (2.71828...)
  • i - Imaginary unit
  • Infinity - ∞

Special Functions

  • floor(x) - Round down
  • ceil(x) - Round up
  • round(x) - Round to nearest integer
  • sign(x) - Sign of x (-1, 0, or 1)
  • max(a, b), min(a, b) - Maximum/minimum
  • random() - Random number between 0-1

Note: Functions return values in the range [-1, 1] for best results. Values are automatically normalized to the [0, 1] range for color channels.