SHARE
TWEET

Untitled

a guest Apr 18th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top