xxxxxxxxxx
117
let count = 6
function setup() {
createCanvas(windowWidth, windowHeight)
}
function draw() {
background(0, 50)
angleMode(RADIANS)
noStroke()
let speedX = map(sin(frameCount / 100), -1, 1, 0, 1)
let speedY = map(sin(frameCount / 70), -1, 1, 0, 1)
// let variation = map(//)
// make dividend of frameCount different to see rotation movement
// 앱로고 실습 원본
translate( 485 , 400)
for (let i = 0; i < TWO_PI; i += TWO_PI/count) {
// 하나의 원 - 다른 i 값
// +TWO_PI / count
rotate(TWO_PI / count)
fill(173, 217 + (speedX * 200), 215 + (speedY * 108), 50)
push()
translate(12 * TWO_PI * speedX,
3 * TWO_PI * speedY)
// give translate x and y different multiplier to see rotation movement more clearly
ellipse(0, 0, 1000/count, 1000/ count)
pop()
}
// 앱로고 변형 @좌측상단
translate(-300, 200)
for (let i = 0; i < TWO_PI; i += TWO_PI/count) {
// 하나의 원 - 다른 i 값
// +TWO_PI / count
rotate(TWO_PI / count)
fill(173, 217 + (speedX * 200), 215 + (speedY * 108), 50)
push()
translate(12 * TWO_PI * speedX,
3 * TWO_PI * speedY)
// give translate x and y different multiplier to see rotation movement more clearly
ellipse(0, 0, 2000/count, 10/ count)
pop()
}
// 앱로고 변형 @좌측하단
translate(300, -200)
for (let i = 0; i < TWO_PI; i += TWO_PI/count) {
// 하나의 원 - 다른 i 값
// +TWO_PI / count
rotate(TWO_PI / count)
fill(173, 217 + (speedX * 200), 215 + (speedY * 108), 50)
push()
translate(12 * TWO_PI * speedX,
3 * TWO_PI * speedY)
// give translate x and y different multiplier to see rotation movement more clearly
ellipse(0, 0, 100/count, 2000/ count)
pop()
}
// 앱로고 변형 @우측상단
translate(-550, 400)
for (let i = 0; i < TWO_PI; i += TWO_PI/count) {
// 하나의 원 - 다른 i 값
// +TWO_PI / count
rotate(TWO_PI / count)
fill(173 + (speedX * 2), 17, 215 + (i + 8))
push()
translate(5 * TWO_PI * speedX,
6 * TWO_PI * speedY)
// give translate x and y different multiplier to see rotation movement more clearly
ellipse(0, 0, 180/count, 1800/ count)
pop()
}
// 앱로고 변형 @우측하단
translate(-350, -200)
for (let i = 0; i < TWO_PI; i += TWO_PI/count) {
// 하나의 원 - 다른 i 값
// +TWO_PI / count
rotate(TWO_PI / count)
fill(173 + (speedX * 10), 200, 215 + (i + 8))
push()
translate(20 * TWO_PI * speedX,
6 * TWO_PI * speedY)
// give translate x and y different multiplier to see rotation movement more clearly
ellipse(0, 0, 10/count, 2000/ count)
pop()
}
}