Guest User

Untitled

a guest
Jun 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. ellipse: (a, b) ->
  2. steps = 90
  3. step_arc = 2*PI/steps
  4.  
  5. @ctx.moveTo(a,0)
  6. for i in [1..steps]
  7. theta = i * step_arc
  8. x = a * Math.cos(theta)
  9. y = b * Math.sin(theta)
  10. @ctx.lineTo(x, y)
Add Comment
Please, Sign In to add comment