Square
Information Visualization (5) - R 그래픽 기초 (사각형을 이용한 나선형 그리기 Spiral Squares)
Information Visualization (5) - R 그래픽 기초 (사각형을 이용한 나선형 그리기 Spiral Squares)
2014. 10. 17.Spiral Squares 이번에는 사각형을 이용한 나선 그리기입니다. > plot.new()> plot.window(xlim = c(-1, 1), ylim = c(-1, 1), asp = 1)> square = seq(0, 2 * pi, length = 5)[1:4] // 0에서 2π 사이를 5등분한 후 그 중 0에서부터 4개의 값만 취합니다> n = 51 // 사각형 갯수> r = rep(1.12, n) // 1.12를 n 만큼 반복> r = cumprod(r) // cumprod() function returns the cumulative multiplication results.> r = r/r[n]> theta = seq(0, 2*pi, length = n)> for (i in n:1) {x =..