I have been going at this for 6hrs and now i decided to ask for some help. It is really killing me.

I am trying to figure out the formula to get the area of a segment.

Here is a pic of my example.

Ok now here is what I have but something is wrong. I know its messy but I really don't know the proper formula. I know that the answer should be around 175-177 inches well i think at this point im not sure of anything.

segH = 6
r1 = segH / 2
r2 = segH * 8
r3 = 48*48
r4 = r3/r2
r5 = r1+r4
side1 = r5 - segH
side2 = 48/2
miss1 = side1 * side1 + (side2 * side2)
miss2 = sqrt(miss1)
sin1 = miss2 / 48
segsolve = (r5 * r5) /2
segsolve1 = (.017 * sin1) - sin1
Area = segsolve * segsolve1

Help

2. Originally Posted by zerocool5878
I have been going at this for 6hrs and now i decided to ask for some help. It is really killing me.

I am trying to figure out the formula to get the area of a segment.

Here is a pic of my example.

...
Here is an other approach to your question:

1. You are dealing with a right triangle even though you can't see it (compare my sketch)

2. In a right triangle you know that

$x \cdot y = s^2$ and $x+y=2r$

3. Since you already know x = 6 and s = 24 you have to solve for r:

$(2r-6) \cdot 6=24^2~\implies~r = 51$

4. The central angle of the sector which contains the segment as a "cap" is:

$\mu = 2 \cdot \alpha$

and

$\sin(\alpha) = \dfrac{24}{51}~\implies~\alpha\approx 28.07^\circ$

5. I'll leave the rest for you.

3. Hmm.. interesting. I didn't know that $x \cdot y = s^2$. Does this applies only to cyclic right triangles? Because if you take any right triangle, you can get all sorts of value for s, and this equation will no more hold.

4. Originally Posted by Unknown008
Hmm.. interesting. I didn't know that $x \cdot y = s^2$. Does this applies only to cyclic right triangles? all right triangles are ciclic
Because if you take any right triangle, you can get all sorts of value for s, and this equation will no more hold.
I know this theorem as Höhensatz, literally translated it means height theorem in a right triangle.

I have labeled the half chord as s ( since it is part of a sequant). Actually this s is the height in the right triangle.

Let a, b denote the sides of the right triangle which are the legs of the right angle. Then you know:

$x^2+s^2 = a^2$ and

$y^2+s^2=b^2$

$2s^2+x^2+y^2 = a^2+b^2 = c^2= (x+y)^2$

$2s^2 + x^2+y^2=x^2+2xy+y^2~\implies~\boxed{s^2=xy}$

5. Right, I was thinking of triangles that would not be right angled triangles otherwise. Thank you, it's good to know this relationship

6. Originally Posted by earboth
Here is an other approach to your question:

4. The central angle of the sector which contains the segment as a "cap" is:

$\mu = 2 \cdot \alpha$

and

$\sin(\alpha) = \dfrac{24}{51}~\implies~\alpha\approx 28.07^\circ$

5. I'll leave the rest for you.
OK I understand how to get the radius. But I think my problem is how to get the vaue of a

Sorry i seem slow but I am really struggling with this.

7. ok after reading more I can divide 24 by 51 to get .471 I don't know how you got it to degrees. And im not sure what to do next. As I need to get to the area in square inches of only the segment or shaded area. Im not really looking for the answer i more interested in the whole process of how to get the answer.

8. Originally Posted by zerocool5878
ok after reading more I can divide 24 by 51 to get .471 I don't know how you got it to degrees. And im not sure what to do next. As I need to get to the area in square inches of only the segment or shaded area. Im not really looking for the answer i more interested in the whole process of how to get the answer.
use the inverse sine function on your calculator ... $\displaystyle \sin^{-1}\left(\frac{24}{51}\right) = 28.07248694$

9. Originally Posted by skeeter
use the inverse sine function on your calculator ... $\displaystyle \sin^{-1}\left(\frac{24}{51}\right) = 28.07248694$

Ok here is the deal.

The answer I am looking for can NOT involve a calculator to answer. It must be a formula that i can understand and be able to code into a program.

I am the developer of iTank Calc for the iPhone and iPod touch. It is a FREE application that is use to determine the gallons of an aquarium.

I have 3 calculators in the current version v1.0. Rectangle/Cube, Cylinder and Hexagon. You enter the measurements and it give the user an answer in US Gallons, UK Gallons or Liters.

Many of my users have expressed an interest in a Bow Front Tank calculator for the app.

My basic theory on a bow front was to calculate the rectangle part of the tank separate form the bow and then add them together. User inputs: Length, Height, Side width and measurmet of the "center" from front to back.

I could easy subtract the center measurement from the side to just have the bow.

then do the lxwxH and add those together to have my total cubic inches.

So far I have been able to implement everything for the previuos tanks from research, reading formulas, amd testing on paper.

I thought that this would be a simple formula that I could implement. But this has got the best of me.

I am done trying to figure this out on my own. I just don't understand it. As far as I have gotten is radius on paper.

However, if someone would like to help me come up with a formula to make this work. please send me a PM with your messenger ID. I will of course credit you inside the about page of the application with your contact info or website/forum if desired.

The current app is in the apple app store under Free and has a user base of 400+ in about a week.

10. Well, you can use the sine of the angle all right to find the area of the triangle you'll later use to find the area of the segment, but for the area of the sector, you'll need the function of sine inverse.

Or there is another method I'm not aware of.

11. Originally Posted by Unknown008
Well, you can use the sine of the angle all right to find the area of the triangle you'll later use to find the area of the segment, but for the area of the sector, you'll need the function of sine inverse.

Or there is another method I'm not aware of.
I have done so much reading and im still stuck. The problem is I write everything in code so it probably just as hard for math guys to understand what im doing as it is for me to understand what you are trying to say. But anyway here is the code that i am using. I am 99% sure that the only code that I need for this to work 100% is the Centangle

Chord = value the user measures (Segment Length)
SegHght = Value the users measures (Segment Height)
apo = (1 / (2 * SegHght)) * (Chord * Chord * .25) - (SegHght / 2)
radius = apo * 1 + SegHght * 1
triarea = apo * Chord / 2
pival = 3.1415926535
CentAngle = ?
SecArea = TotalArea * (CentAngle / 360)
SegArea = SecArea - triarea

12. I'm wondering... if instead we convert it into calculus... Can the program support integration?

We can have the cartesian equation of the circle, put it in such a way that only the segment is over the x-axis and get the area using the cartesian equation...

13. Im not 100% sure on that I know it has a few math functions built in like:
a = sqrt(25)

a would return as 5

I will ask about that on the developer portal if thats the only chance I have of getting this to work

14. Originally Posted by Unknown008
Hmm.. interesting. I didn't know that $x \cdot y = s^2$. Does this applies only to cyclic right triangles? Because if you take any right triangle, you can get all sorts of value for s, and this equation will no more hold.
Every right triangle is cyclic. Its vertices lie on a circle having the hypotenuse as diameter.

15. Right, Earboth already pointed it out and I already spot my mistake in this post

Originally Posted by Unknown008
Right, I was thinking of triangles that would not be right angled triangles otherwise. Thank you, it's good to know this relationship
Thank you for confirming again though.