Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getPetalPositions() {
- // Create our origin petal
- let petal = new Petal(0, ellipseOrigin.x, ellipseOrigin.y, ellipseRadius * 2)
- allPetals.push(petal)
- // Create the rest of them
- for (let circleCount = 0; circleCount < 6; circleCount++) {
- let xPosition = ellipseOrigin.x + ellipseRadius * cos(60 * circleCount)
- let yPosition = ellipseOrigin.y + ellipseRadius * sin(60 * circleCount)
- let diameter = ellipseRadius * 2
- let petal = new Petal(circleCount, xPosition, yPosition, diameter)
- allPetals.push(petal)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement