View source: R/mandalar_basic.R
mandalar_basic | R Documentation |
Function to create a mandala with the basic method
mandalar_basic(curve, theta, k, n, raio, a, b)
curve |
Either a character string or a function returning curve equation evaluated at its first argument. Curves "circle","elipse", "cardioide","limacon", "espiral1", "espiral2", "lemniscata", "deltoide" and "astroide" are recognised, case being ignored. |
theta |
is a vector length 2 with start angle and end angle |
k |
is a angle of rotations, k in (0,360) graus |
n |
is a number of points |
raio |
is a positive number for the radius of circle |
a |
is one of the parameters of the curves; for the ellipse is the radius on the x axis |
b |
is one of the parameters of the curves; for the ellipse is the radius on the y axis |
Returns a dataframe with the original points plus the respective rotations of these points.
Luciane Ferreira Alcoforado
require(ggplot2) mandalar_basic("circle", theta = c(0,2*pi), raio=1, k = 45, n=500) mandalar_basic("cardioide", theta = c(0,2*pi), raio=1, k = 60, n=500) mandalar_basic("elipse", theta = c(0,2*pi), a=1, b=2, k = 30, n=500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.