Learn R Programming

MandalaR (version 0.1.0)

pastroide: creates a dataframe containing the points for the astroide mandala

Description

Function to build a astroide

Usage

pastroide(theta, raio, k, n)

Value

Returns a dataframe with the original points plus the respective rotations of these points.

Arguments

theta

is a vector length 2 with start angle and end angle

raio

is a vector length 1 with radius value. For astroide we do r=3.

k

is a vector of length 1 with angles in degree to rotate the point (x,y)

n

is a number of points

Author

Luciane Ferreira Alcoforado

Examples

Run this code
theta = c(0,2*pi)
k=45
raio = 1
n=20
pastroide(theta, raio, k, n)

Run the code above in your browser using DataLab