mirror: Mirror Fractals

Description Usage Arguments Value Examples

View source: R/mirror.R

Description

Flip fractals horizontally or vertically.

Usage

1
2
3
4
5
6
7
mirror(fractal, direction)

## Default S3 method:
mirror(fractal, direction = c("horizontal", "vertical"))

## S3 method for class 'dragon_curve'
mirror(fractal, direction = c("horizontal", "vertical"))

Arguments

fractal

A fractal object to be mirrored.

direction

The direction of the mirroring, either "horizontal" or "vertical". Can be abbreviated.

Value

The mirrored fractal.

Examples

1
2
3
4
5
6
d <- dragon_curve(10)
d_h <- mirror(d, "horizontal")
d_v <- mirror(d, "vertical")
plot(d)
plot(d_h)
plot(d_v)

BastiHz/fractalplotr documentation built on Sept. 9, 2021, 4:46 a.m.