recurSplit: Recursively split a line segment.

Description Usage Arguments Details Value Author(s) Examples

Description

Create a random fractal line by recursive splitting of segments.

Usage

1
recurSplit(x0, y0, x1, y1, n, ...)

Arguments

x0

x coordinate of start point

y0

y coordinate of start point

x1

x coordinate of finish point

y1

y coordinate of finish point

n

number of recursive divisions

...

arguments to be passed to the underlying splitting algorithm - currently not used.

Details

Call slpitSegMid to get a midpoint and generate two segments. Then call splitSegMid again on those. Repeat n times.

Value

A two-column matrix of coordinates. The first and last will be the input coordinates.

Author(s)

Barry Rowlingson

Examples

1
recurSplit(0,0,1,1,3)

fakeplace documentation built on May 2, 2019, 4:43 p.m.