This function paints functions with random parameters on a canvas.

```
canvas_function(
colors,
background = "#fafafa",
by = 0.01,
polar = TRUE,
formula = NULL
)
```

## Arguments

- colors
a string specifying the color used for the artwork.

- background
a character specifying the color used for the background.

- by
a value specifying the step size between consecutive points.

- polar
logical. Whether to draw the function with polar coordinates.

- formula
optional, a named list with 'x' and 'y' as structured in the example. If `NULL`

(default), chooses a function with random parameters.

## Value

A `ggplot`

object containing the artwork.

## Examples

```
# \donttest{
set.seed(10)
# Simple example
canvas_function(colors = colorPalette("tuscany1"))
# Advanced example
formula <- list(
x = quote(x_i^2 - sin(y_i^2)),
y = quote(y_i^3 - cos(x_i^2))
)
canvas_function(colors = "firebrick", formula = formula)
# }
```