Skip to contents

Generate a dataframe of one bezier curve

Usage

get_one_bezier(i, points_df, slopes_df)

Arguments

i

number of the bezier

points_df

dataframe generated by gen_benjamini_points() (see example).

slopes_df

dataframe generated by gen_benjamini_slopes() (see example).

Value

A dataframe containing the information for one bezier curve in the format as needed by ggforce::geom_bezier.

Examples

set.seed(123)
leaf_params <- gen_leaf_parameters()
points_df <- gen_benjamini_points()
slopes_df <- gen_benjamini_slopes()
df_bezier <- get_one_bezier(1, points_df, slopes_df)
ggplot2::ggplot(df_bezier, ggplot2::aes(x = x, y = y)) + ggforce::geom_bezier()