Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. function getPetalPositions() {
  2. // Create our origin petal
  3. let petal = new Petal(0, ellipseOrigin.x, ellipseOrigin.y, ellipseRadius * 2)
  4. allPetals.push(petal)
  5.  
  6. // Create the rest of them
  7. for (let circleCount = 0; circleCount < 6; circleCount++) {
  8. let xPosition = ellipseOrigin.x + ellipseRadius * cos(60 * circleCount)
  9. let yPosition = ellipseOrigin.y + ellipseRadius * sin(60 * circleCount)
  10. let diameter = ellipseRadius * 2
  11. let petal = new Petal(circleCount, xPosition, yPosition, diameter)
  12. allPetals.push(petal)
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement