theta <- 2 * pi / 5
pts <- data.frame(x = 1, y = 0)
for (i in 1:4) {
R <- matrix(c(cos(theta), -sin(theta), sin(theta), cos(theta)), 2, 2)
newpt <- as.numeric(R %*% c(pts$x[i], pts$y[i]))
pts <- rbind(pts, data.frame(x = newpt[1], y = newpt[2]))
}
ggplot(pts, aes(x, y)) +
geom_point(size = 5, color = "steelblue") +
geom_path(color = "gray40", linewidth = 0.8) +
geom_point(data = data.frame(x = 0, y = 0), aes(x, y), shape = 3, size = 3, color = "black") +
coord_fixed(xlim = c(-1.3, 1.3), ylim = c(-1.3, 1.3)) +
theme_minimal() +
labs(title = "Order-5 rotational symmetry")Types of Symmetry
Rotations, Reflections, and Dihedral Groups — Simple Visual Examples
Rotational Symmetry
Rotational symmetry of order ( n ) (cyclic group ( _n )) means a figure looks the same after rotation by ( 360^/ n ).
R example: rotating a point
p5.js: interactive rotational symmetry
Reflectional Symmetry
Mirror symmetry across a line (usually the vertical or horizontal axis).
R example
base <- data.frame(
x = c(0, 1, 1.5, 1, 0),
y = c(0, 0.5, 0, -0.5, 0)
)
mirror <- data.frame(x = -base$x, y = base$y)
ggplot() +
geom_polygon(data = base, aes(x, y), fill = "coral", alpha = 0.25, color = "coral", linewidth = 1) +
geom_polygon(data = mirror, aes(x, y), fill = "steelblue", alpha = 0.25, color = "steelblue", linewidth = 1) +
geom_vline(xintercept = 0, linetype = "dashed", color = "gray40") +
coord_fixed(xlim = c(-2, 2), ylim = c(-1, 1)) +
theme_minimal()p5.js: draw with mirror symmetry
Click and drag to draw. The sketch mirrors your strokes across the vertical axis.
Dihedral Symmetry (( D_n ))
Dihedral groups combine rotations of order ( n ) with reflections. These are the symmetries of regular polygons.
R example: regular pentagon and its symmetries
n <- 5
angles <- seq(0, 2 * pi, length.out = n + 1)
poly <- data.frame(
x = cos(angles),
y = sin(angles)
)
ggplot(poly, aes(x, y)) +
geom_polygon(fill = "gold", alpha = 0.6, color = "black") +
coord_fixed() +
theme_minimal() +
labs(title = "Dihedral group D5")p5.js: kaleidoscope-style dihedral drawing
Click and drag. The sketch applies both rotations and reflections of order 6.
Design Notes for Art Students
- Rotational only (( _n )): swirling, pinwheel-like, no mirror lines.
- Reflection only: bilateral balance (faces, logos, architecture).
- Dihedral (( D_n )): the most common decorative symmetry (snowflakes, flowers, rose windows, tiles).
These geometric ideas become the constraints we later impose on iterative and random processes.