generate_string_waves: Generate string waves

View source: R/string_waves.R

generate_string_wavesR Documentation

Generate string waves

Description

Generate string waves

Usage

generate_string_waves(
  num_waves,
  num_colors,
  wobbliness,
  frequency,
  stability_n,
  stability_sd,
  loess_span,
  anchor = F,
  frame = "square",
  seed
)

Arguments

num_waves

an integer value >=1, the number of waves desired

num_colors

an integer value >=1, the number of colors desired

wobbliness

an integer value >=1, higher values will make the waves more wobbly (i.e. having peaks a trough of variable height); technically this is the number if individual sine functions that are summed together to get the final wave function

frequency

a numberic value >= 0, higher values will increase the frequency of the wave function; technically this is the passed to the frequency argument of the apply_random_sine_wave() function (see apply_random_sine_wave() for details)

stability_n

an integer value >=1, higher values will make the waves more stable; technically, this is the number of data points sampled to generate each wave

stability_sd

a numeric value >=0, lower values will make the waves more stable; technically, this is the standard deviation of the error applied to the output of each wave function

loess_span

a numeric value between 0-1, lower numbers will make each wave more "wiggly" when fitting the underlying points, values < 0.3 seem to throw an error

anchor

a boolean value, set to true to make the waves converge to anchor points

frame

'points', 'circle', 'square', or 'none'; specifies the frame desired for each artwork

seed

a numeric value, the seed to initialize psuedo-randomness

Value

a random work of art as a ggplot object


christopher-rowe/StochasticArt documentation built on April 15, 2023, 3:59 a.m.