Sign in to follow this  
IamThatGuy

Getting Last Point on an ARC() and length of ARC()?

Recommended Posts

So I been playing around with this experiment and I am starting to realize how important math is for games. =]

 

A snipplet, I didnt include vars

context.beginPath();context.arc(centerX, centerY, radius, 0, 2 * Math.PI, false);context.fillStyle = 'green';context.fill();context.lineWidth = 3;context.strokeStyle = 'yellow';context.stroke(); context.closePath(); context.beginPath();context.moveTo(centerX - radius, centerY);context.lineTo(centerX - 100, centerY);context.stroke();context.closePath(); context.beginPath();context.arc(centerX, centerY, 100, startAngle, endAngle, counterClockwise); context.lineWidth = 1;  context.stroke();context.closePath();

The outcome:

post-11069-0-86808300-1422851365.png

 

 

Anyone know how if there is a built in function to get the Length of the arc and the last Point of the created Arc?

 

If not, anyone know of a formula for such a thing =0

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.