• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 17:18
CET 23:18
KST 07:18
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
RSL Revival - 2025 Season Finals Preview8RSL Season 3 - Playoffs Preview0RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12
Community News
ComeBackTV's documentary on Byun's Career !3Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win2Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump1Weekly Cups (Nov 24-30): MaxPax, Clem, herO win2BGE Stara Zagora 2026 announced15
StarCraft 2
General
ComeBackTV's documentary on Byun's Career ! Weekly Cups (Dec 8-14): MaxPax, Clem, Cure win Did they add GM to 2v2? RSL Revival - 2025 Season Finals Preview Weekly Cups (Dec 1-7): Clem doubles, Solar gets over the hump
Tourneys
Master Swan Open (Global Bronze-Master 2) Winter Warp Gate Amateur Showdown #1: Sparkling Tuna Cup - Weekly Open Tournament $5,000+ WardiTV 2025 Championship StarCraft2.fi 15th Anniversary Cup
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 504 Retribution Mutation # 503 Fowl Play Mutation # 502 Negative Reinforcement Mutation # 501 Price of Progress
Brood War
General
How Rain Became ProGamer in Just 3 Months FlaSh on: Biggest Problem With SnOw's Playstyle BGH Auto Balance -> http://bghmmr.eu/ [BSL21] RO8 Bracket & Prediction Contest BW General Discussion
Tourneys
[Megathread] Daily Proleagues [BSL21] RO8 - Day 2 - Sunday 21:00 CET [ASL20] Grand Finals [BSL21] RO8 - Day 1 - Saturday 21:00 CET
Strategy
Current Meta Game Theory for Starcraft Simple Questions, Simple Answers Fighting Spirit mining rates
Other Games
General Games
Stormgate/Frost Giant Megathread General RTS Discussion Thread Dawn of War IV Nintendo Switch Thread PC Games Sales Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Mafia Game Mode Feedback/Ideas Survivor II: The Amazon Sengoku Mafia TL Mafia Community Thread
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine YouTube Thread European Politico-economics QA Mega-thread
Fan Clubs
White-Ra Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
TL+ Announced Where to ask questions and add stream?
Blogs
How Sleep Deprivation Affect…
TrAiDoS
I decided to write a webnov…
DjKniteX
James Bond movies ranking - pa…
Topin
Thanks for the RSL
Hildegard
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1584 users

Area of a Circle

Blogs > EsX_Raptor
Post a Reply
Normal
EsX_Raptor
Profile Blog Joined February 2008
United States2802 Posts
Last Edited: 2011-07-13 14:14:06
July 12 2011 15:45 GMT
#1
Problem

Suppose I have the following two-dimensional space:

[image loading]


Suppose I can fill it with as much water as I want:

[image loading]


How can I find the area the water covers?

Solution

I divided the problem into three parts: when x < r, when x = r and when x > r.

When x < r, the following model applies:

[image loading]


Where:

h = r - x
b = SQRT (r ^ 2 - h ^ 2)
θ = SIN ^ -1 (b / r)

Therefore:

A1 = (b * h) / 2
A2 = PI * r ^ 2 * θ / 360

A = 2 * (A2 - A1)

When x = r, it is very simple:

A = (PI * r ^ 2) / 2

When x > r, the following model applies:

[image loading]


A1 = (PI * r ^ 2) / 2

h = x - r
b = SQRT (h ^ 2 - r ^ 2)
A2 = b * h

θ1 = SIN ^ -1 (b / r)
θ = 180 - (2 * θ1)
A3 = PI * r ^ 2 * θ / 360

A = A1 + A2 + A3

In short, I was able to figure out a set of three equations that explains the change in area as the water level rises. However, is there a better way of tackling this problem? Is there perhaps a single formula that models this behavior?

Thanks!

edit: one guy didn't make it out of algebra 1

*
Cloud
Profile Blog Joined November 2004
Sexico5880 Posts
Last Edited: 2011-07-12 15:56:51
July 12 2011 15:53 GMT
#2
Area of the sector of the circle of radius 2θ - Area of the triangle with sides r, r and height x - r. And if x > r then: Area of the circle - the previous result.
BlueLaguna on West, msg for game.
wrags
Profile Blog Joined April 2008
United States379 Posts
Last Edited: 2011-07-12 16:00:42
July 12 2011 15:58 GMT
#3
nvm
EsX_Raptor
Profile Blog Joined February 2008
United States2802 Posts
July 12 2011 16:01 GMT
#4
On July 13 2011 00:53 Cloud wrote:
Area of the sector of the circle of radius 2θ - Area of the triangle with sides r, r and height x - r. And if x > r then: Area of the circle - the previous result.

I feel stupid now XD
Dagobert
Profile Blog Joined July 2009
Netherlands1858 Posts
July 12 2011 16:03 GMT
#5
I'm terrible at math and even worse at geometrical stuff,... but the way I'd attempt to solve it (don't know if it's functionally equivalent to what you did) is to pretend the circle wasn't a circle at all, extend it to a rectangle starting from the middle (circle-bisecting radius), then calculate twice the area under the curve under the 'water' and subtract this from twice that entire rectangle... Not sure if you got what I mean, but this pc is going haywire; can't start any .exe right now, so I can't illustrate this in paint.
jacen
Profile Blog Joined April 2004
Austria3644 Posts
Last Edited: 2011-07-12 16:11:31
July 12 2011 16:07 GMT
#6
If you know a bit (okay depending on how much you learned it might be advanced) calculus, you can just write either the left or right boundary of the circle as function of x and integrate along the way of x. Multiply that by 2 and you have the right answer for any given x, without the need for clauses.

Might be a bit heavy gear for this easy problem, but sure is more elegant.

/edit: i forgot that you have to piece the upper and lower boundary of the circle together. So this would also need a clause. Maybe someone can do it without one?
(micronesia) lol we aren't going to just permban you (micronesia) "we" excludes Jinro
ReTrooper
Profile Joined February 2003
Germany526 Posts
July 12 2011 16:14 GMT
#7
It really depends on the water quality I think. Wouldn't try that with ordinary tap water. And you have to be careful to not spill any of the water while calculating.

+ Show Spoiler +
Please just mention you want to calculate a circle segment, not something about "filling" a 2D-space with a liquid. Yea sorry I'm an engineer who gets paid for hairsplitting.

You will find a good set of formulae on Wikipedia btw. For x > r I'd recommend using your x < r method to find out the non-covered area, then substracting from a full circle. Your graphics would also benefit from explicitly labeling the areas you reference in the formulae. Other than that, it looks fine.
De omnibus dubitandum.
caradoc
Profile Blog Joined January 2011
Canada3022 Posts
Last Edited: 2011-07-12 16:22:01
July 12 2011 16:15 GMT
#8
... thinking

can't you just pretend its a sine wave and get the area under the curve at a given interval, then multiple by two or something?

edit: probably not... but it wouldn't take too much modification for it to work.
Salvation a la mode and a cup of tea...
josemb40
Profile Blog Joined March 2009
Peru611 Posts
July 12 2011 16:29 GMT
#9
brain..hurts.. memories of math classes coming back.. argh
wiiiiiiiiiiiiiiiii
micronesia
Profile Blog Joined July 2006
United States24745 Posts
July 12 2011 16:32 GMT
#10
I integrated the formula sqrt(r^2-x^2) with respect to x from -r to (-r+q) on my calculator where q is your 'x' and then doubled the answer and got:

Area = pi*r^2/2 - (r-q)sqrt(q(2r-q)) - pi*r^2*asin((r-q)/r)/180
ModeratorThere are animal crackers for people and there are people crackers for animals.
Lemonwalrus
Profile Blog Joined August 2006
United States5465 Posts
July 12 2011 16:35 GMT
#11
That is hard to read.
EsX_Raptor
Profile Blog Joined February 2008
United States2802 Posts
Last Edited: 2011-07-12 16:52:21
July 12 2011 16:38 GMT
#12
On July 13 2011 01:07 jacen wrote:
If you know a bit (okay depending on how much you learned it might be advanced) calculus, you can just write either the left or right boundary of the circle as function of x and integrate along the way of x. Multiply that by 2 and you have the right answer for any given x, without the need for clauses.

Might be a bit heavy gear for this easy problem, but sure is more elegant.

/edit: i forgot that you have to piece the upper and lower boundary of the circle together. So this would also need a clause. Maybe someone can do it without one?

Why didn't I think of that!

If I'm not mistaken, this is the integral:

edit: micronesia is right XDD

[image loading]


Sorry, got carried away by y'all's genius.
micronesia
Profile Blog Joined July 2006
United States24745 Posts
July 12 2011 16:46 GMT
#13
I don't think you can have the variable you are integrating with respect to be one of the bounds in your definite integral lol... choose another letter for x so that you don't have two x's XD
ModeratorThere are animal crackers for people and there are people crackers for animals.
RoieTRS
Profile Blog Joined July 2008
United States2569 Posts
July 12 2011 16:49 GMT
#14
I followed your logic and it seems correct. Any formula would probably just confuse me, but this logic is followable and correct.
konadora, in Racenilatr's blog: "you need to stop thinking about starcraft or anything computer-related for that matter. It's becoming a bad addiction imo"
MisterD
Profile Blog Joined June 2010
Germany1338 Posts
Last Edited: 2011-07-12 16:50:37
July 12 2011 16:50 GMT
#15
it's obvious that this is a different x can't you see that?
Gold isn't everything in life... you need wood, too!
EsX_Raptor
Profile Blog Joined February 2008
United States2802 Posts
July 12 2011 16:53 GMT
#16
On July 13 2011 01:14 ReTrooper wrote:
It really depends on the water quality I think. Wouldn't try that with ordinary tap water. And you have to be careful to not spill any of the water while calculating.

+ Show Spoiler +
Please just mention you want to calculate a circle segment, not something about "filling" a 2D-space with a liquid. Yea sorry I'm an engineer who gets paid for hairsplitting.

You will find a good set of formulae on Wikipedia btw. For x > r I'd recommend using your x < r method to find out the non-covered area, then substracting from a full circle. Your graphics would also benefit from explicitly labeling the areas you reference in the formulae. Other than that, it looks fine.

Thought it would've been more understandable to explain it for what it is n_n
Siniyas
Profile Joined January 2011
Germany66 Posts
Last Edited: 2011-07-12 17:48:17
July 12 2011 17:39 GMT
#17
On July 13 2011 01:38 EsX_Raptor wrote:
Show nested quote +
On July 13 2011 01:07 jacen wrote:
If you know a bit (okay depending on how much you learned it might be advanced) calculus, you can just write either the left or right boundary of the circle as function of x and integrate along the way of x. Multiply that by 2 and you have the right answer for any given x, without the need for clauses.

Might be a bit heavy gear for this easy problem, but sure is more elegant.

/edit: i forgot that you have to piece the upper and lower boundary of the circle together. So this would also need a clause. Maybe someone can do it without one?

Why didn't I think of that!

If I'm not mistaken, this is the integral:

edit: micronesia is right XDD

[image loading]


Sorry, got carried away by y'all's genius.


EDIT:
nvm.
Let it rip
Hassybaby
Profile Blog Joined November 2010
United Kingdom10823 Posts
July 12 2011 17:53 GMT
#18
However, is there a better way of tackling this problem?


Post on TeamLiquid, and the nerds will help. That seems easier
"These guys are mindfucking me into a sex coma" | "Mayonnaise is a must-have lubricant when performing necrophilia"
jacen
Profile Blog Joined April 2004
Austria3644 Posts
July 12 2011 18:13 GMT
#19
On July 13 2011 01:46 micronesia wrote:
I don't think you can have the variable you are integrating with respect to be one of the bounds in your definite integral lol...

You wouldn't you?
http://en.wikipedia.org/wiki/Definite_integral

But you are right that the bounds of the interval of the integral (r to r-q) are wrong.
You have to have bounds in terms of definitive values of x.

Imho the right way would be to integrate from -1 to 1 if the circle has its center on 0 or from 0 to 2 if the center is at x=1.

But i am really to lazy to do it right now
(micronesia) lol we aren't going to just permban you (micronesia) "we" excludes Jinro
micronesia
Profile Blog Joined July 2006
United States24745 Posts
July 12 2011 18:16 GMT
#20
On July 13 2011 03:13 jacen wrote:
Show nested quote +
On July 13 2011 01:46 micronesia wrote:
I don't think you can have the variable you are integrating with respect to be one of the bounds in your definite integral lol...

You wouldn't you?
http://en.wikipedia.org/wiki/Definite_integral

But you are right that the bounds of the interval of the integral (r to r-q) are wrong.
You have to have bounds in terms of definitive values of x.

Imho the right way would be to integrate from -1 to 1 if the circle has its center on 0 or from 0 to 2 if the center is at x=1.

But i am really to lazy to do it right now

I don't understand what you are trying to point out to me regarding what I said...
ModeratorThere are animal crackers for people and there are people crackers for animals.
jacen
Profile Blog Joined April 2004
Austria3644 Posts
July 12 2011 18:56 GMT
#21
On July 13 2011 03:16 micronesia wrote:
Show nested quote +
On July 13 2011 03:13 jacen wrote:
On July 13 2011 01:46 micronesia wrote:
I don't think you can have the variable you are integrating with respect to be one of the bounds in your definite integral lol...

You wouldn't you?
http://en.wikipedia.org/wiki/Definite_integral

But you are right that the bounds of the interval of the integral (r to r-q) are wrong.
You have to have bounds in terms of definitive values of x.

Imho the right way would be to integrate from -1 to 1 if the circle has its center on 0 or from 0 to 2 if the center is at x=1.

But i am really to lazy to do it right now

I don't understand what you are trying to point out to me regarding what I said...

Sorry, wanted to write "Why wouldn't you?"

Lost my train of thought other than that. A bit under stress today.

Any way ... the example raptor has give looks wrong to me because r is not only of x, but now i think it can very well be ... whatever. Too fucked up to dig through this today ... sry
(micronesia) lol we aren't going to just permban you (micronesia) "we" excludes Jinro
Normal
Please log in or register to reply.
Live Events Refresh
Next event in 11h 43m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 203
NeuroSwarm 139
PiGStarcraft43
ForJumy 18
StarCraft: Brood War
Britney 9916
Artosis 217
Bonyth 64
Mong 18
Dota 2
Dendi1884
syndereN1173
Heroes of the Storm
Liquid`Hasu561
Other Games
Grubby6017
FrodaN1314
Fuzer 313
ArmadaUGS149
C9.Mang0148
taco 91
ZombieGrub45
Trikslyr44
Organizations
Other Games
BasetradeTV37
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 20 non-featured ]
StarCraft 2
• Hupsaiya 54
• RyuSc2 38
• musti20045 35
• davetesta9
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV1104
• masondota2868
League of Legends
• Doublelift2996
• TFBlade1148
Other Games
• imaqtpie1782
• Shiphtur208
Upcoming Events
The PondCast
11h 43m
WardiTV 2025
14h 43m
Cure vs Creator
Solar vs TBD
herO vs Spirit
Scarlett vs Gerald
MaNa vs ShoWTimE
Nice vs TBD
WardiTV 2025
1d 12h
OSC
1d 15h
CranKy Ducklings
2 days
SC Evo League
2 days
Ladder Legends
2 days
BSL 21
2 days
Sparkling Tuna Cup
3 days
Ladder Legends
3 days
[ Show More ]
BSL 21
3 days
Replay Cast
4 days
Monday Night Weeklies
4 days
WardiTV Invitational
6 days
Liquipedia Results

Completed

Acropolis #4 - TS3
RSL Offline Finals
Kuram Kup

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
YSL S2
BSL Season 21
Slon Tour Season 2
WardiTV 2025
META Madness #9
SL Budapest Major 2025
ESL Impact League Season 8
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22

Upcoming

CSL 2025 WINTER (S19)
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
Bellum Gens Elite Stara Zagora 2026
HSC XXVIII
Big Gabe Cup #3
OSC Championship Season 13
ESL Pro League Season 23
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.