PackCircles: PackCircles

Description Usage Arguments Details Value

Description

Simple circle packing algorithm based on inverse size weighted repulsion

Usage

1
PackCircles(config, extent, edge_buffered, max_iter, overlap)

Arguments

config

matrix with two cols: radius, n

extent

extent of bounding rectangle: c(x_min, x_max, y_min,y_max). Default is (0, 10000, 0, 10000).

edge_buffer

distance from edge of extent that circle center's must be placed

max_iter

maximum number of iterations to try

overlap

allowable overlap expressed as proportion of joint radii

plot

logical, whether or not to draw a plot

Details

Original code from: http://www.r-bloggers.com/circle-packing-with-r Slight modifications were made for code consistency and additional functionality.

Value

A dataframe of points


Blakemassey/gisr documentation built on Aug. 30, 2020, 12:14 a.m.