I was wondering if anybody knew how to find the width of a circle in any given y position. For example, lets say you have a unit circle, the radius is 100 units tall. Now three fourths the way up the circle, 25 units above the center of the circle, there is a line parallel to the x axis that extends from one edge of the circle to the other. it looks a bit like this.
How big is that line, and what algorithm did you use to solve this?
First, label what you know:
Looks like a triangle to me.
Now, solve for X and double it:
x^2 + 25^2 = 100^2 (Pythagorean theorem)
x^2 = 9375 (Simplify)
x = 96.8 (Square root both sides, now we know x)
Length of chord: 193.6 (Length of chord is 2 times x)
Here is a site that can help you: http://www.mathopenref.com/chord.html
Since you tagged your question with Scratch, here is a function to help you:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With