Learn R Programming

TaoTeProgramming (version 1.0)

polyhull: Draw Irregular Convex Polygons

Description

Creates a random montage of convex polygons.

Usage

polyhull(num = 100, lambda = 20, size = 0.05, color = grep("^gray", colors(), value = TRUE), seed = NULL) quadtile(dims = c(10, 10), color = grep("^gray", colors(), value = TRUE), seed = NULL)

Arguments

num
number of polygons.
dims
dimensions for a certain matrix.
lambda
control for the random number of sides to the polygons.
size
the maximum radius of a polygon.
color
vector of colors for the polygons.
seed
an integer giving the argument for set.seed.

Value

nothing useful.

Side effects

create a plot on the current graphics device, and modify the random seed.

References

http://www.burns-stat.com/documents/books/tao-te-programming/

See Also

canvas, set.seed.

Examples

Run this code
polyhull(color=grep("red", colors(), value=TRUE))

polysort(color=grep("green", colors(), value=TRUE))

polytile(color=grep("purple", colors(), value=TRUE))

quadtile(color=grep("orange", colors(), value=TRUE))
quadtile(color=grep("orange", colors(), value=TRUE),
   dims=c(2,20))
   
quadtilebalance(color=grep("turquoise", colors(), value=TRUE))

tritile(color=grep("sea", colors(), value=TRUE))

Run the code above in your browser using DataLab