Description Usage Arguments Value References Examples
Star
creates a star with multiple building possibilities
1 |
P |
Vector containing the xy-coordinates of the starting point for the star |
angle |
Angle (0-360) that is related to the direction of the two segments which are drawn in each of the steps of the process. This parameter really represents the angle (in clockwise and anti-clockwise direction) for the two first drawn segments, but it is modified according to rotations of 144 degrees in all the following steps, including the last one, which closes the curve. |
l |
Number that indicates the length side of the segments that are drawn. This parameter will determine the size of the star |
time |
Number of seconds to wait for the program before drawing each of the segments that make star. If no |
color |
Color to indicate the points that are obtained during the process to draw the star. If missing, the points are not indicated and only the segments are drawn in the plot |
None. It produces the plot of a closed curve with the shape of a star, if the parameters are chosen properly
Abelson, H., & DiSessa, A. A. (1986). Turtle geometry: The computer as a medium for exploring mathematics. MIT press
1 2 3 4 5 6 7 8 9 | x_min <- -5
x_max <- 5
y_min <- -5
y_max <- 5
CoordinatePlane(x_min, x_max, y_min, y_max)
P <- c(0,0)
angle <- 0
l <- 1
Star(P, angle, l)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.