• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:34
CEST 15:34
KST 22:34
  • 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
[ASL20] Ro24 Preview Pt1: Runway112v2 & SC: Evo Complete: Weekend Double Feature3Team Liquid Map Contest #21 - Presented by Monster Energy9uThermal's 2v2 Tour: $15,000 Main Event18Serral wins EWC 202549
Community News
Weekly Cups (Aug 11-17): MaxPax triples again!10Weekly Cups (Aug 4-10): MaxPax wins a triple6SC2's Safe House 2 - October 18 & 195Weekly Cups (Jul 28-Aug 3): herO doubles up6LiuLi Cup - August 2025 Tournaments7
StarCraft 2
General
RSL Revival patreon money discussion thread Is it ok to advertise SC EVO Mod streaming here? Maestros of the Game 2v2 & SC: Evo Complete: Weekend Double Feature Playing 1v1 for Cash? (Read before comment)
Tourneys
Master Swan Open (Global Bronze-Master 2) $5,100+ SEL Season 2 Championship (SC: Evo) Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series LiuLi Cup - August 2025 Tournaments
Strategy
Custom Maps
External Content
Mutation # 487 Think Fast Mutation # 486 Watch the Skies Mutation # 485 Death from Below Mutation # 484 Magnetic Pull
Brood War
General
BW General Discussion Flash Announces (and Retracts) Hiatus From ASL ASL 20 HYPE VIDEO! New season has just come in ladder [ASL20] Ro24 Preview Pt1: Runway
Tourneys
[ASL20] Ro24 Group C [ASL20] Ro24 Group B [Megathread] Daily Proleagues [ASL20] Ro24 Group A
Strategy
Simple Questions, Simple Answers Fighting Spirit mining rates [G] Mineral Boosting Muta micro map competition
Other Games
General Games
General RTS Discussion Thread Beyond All Reason Stormgate/Frost Giant Megathread Nintendo Switch Thread Total Annihilation Server - TAForever
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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Things Aren’t Peaceful in Palestine European Politico-economics QA Mega-thread The Games Industry And ATVI
Fan Clubs
INnoVation Fan Club SKT1 Classic Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2026 Football Thread TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
Gtx660 graphics card replacement Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
TeamLiquid Team Shirt On Sale The Automated Ban List
Blogs
The Biochemical Cost of Gami…
TrAiDoS
[Girl blog} My fema…
artosisisthebest
Sharpening the Filtration…
frozenclaw
ASL S20 English Commentary…
namkraft
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2503 users

Area of a Circle

Blogs > EsX_Raptor
Post a Reply
1 2 Next All
EsX_Raptor
Profile Blog Joined February 2008
United States2801 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 States2801 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 States24690 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 States2801 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 States24690 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 States2801 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 States24690 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.
1 2 Next All
Please log in or register to reply.
Live Events Refresh
WardiTV Summer Champion…
11:00
Group Stage 2 - Group B
Clem vs goblin
ByuN vs SHIN
WardiTV1037
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Harstem 332
Rex 157
ProTech32
trigger 14
EnDerr 11
Hui .1
StarCraft: Brood War
Britney 53506
Calm 11849
Bisu 3469
Jaedong 1202
EffOrt 786
firebathero 756
BeSt 483
Stork 317
ggaemo 317
ZerO 251
[ Show more ]
Light 234
Last 218
Soulkey 142
Snow 118
Hyun 114
Barracks 111
Mind 107
hero 98
Rush 84
Nal_rA 60
TY 53
Movie 53
Icarus 24
sorry 22
Backho 21
Sacsri 21
JulyZerg 15
scan(afreeca) 14
JYJ10
IntoTheRainbow 8
Terrorterran 8
ivOry 3
actioN 0
Dota 2
Gorgc7539
qojqva2259
XcaliburYe251
Fuzer 197
League of Legends
Dendi1002
Reynor9
Counter-Strike
hiko698
edward54
Super Smash Bros
Mew2King81
Other Games
singsing2030
B2W.Neo1742
DeMusliM469
crisheroes458
XaKoH 153
ToD82
ArmadaUGS80
QueenE39
Trikslyr27
ZerO(Twitch)4
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• davetesta8
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 29
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• C_a_k_e 937
• WagamamaTV551
League of Legends
• Nemesis3313
• Jankos1187
Upcoming Events
Online Event
10h 26m
The PondCast
20h 26m
WardiTV Summer Champion…
21h 26m
Zoun vs Bunny
herO vs Solar
Replay Cast
1d 10h
LiuLi Cup
1d 21h
BSL Team Wars
2 days
Team Hawk vs Team Dewalt
Korean StarCraft League
2 days
CranKy Ducklings
2 days
SC Evo League
2 days
WardiTV Summer Champion…
2 days
Classic vs Percival
Spirit vs NightMare
[ Show More ]
CSO Cup
3 days
[BSL 2025] Weekly
3 days
Sparkling Tuna Cup
3 days
SC Evo League
3 days
BSL Team Wars
4 days
Team Bonyth vs Team Sziky
Afreeca Starleague
4 days
Queen vs HyuN
EffOrt vs Calm
Wardi Open
4 days
Replay Cast
5 days
Afreeca Starleague
5 days
Rush vs TBD
Jaedong vs Mong
Afreeca Starleague
6 days
herO vs TBD
Royal vs Barracks
Liquipedia Results

Completed

Jiahua Invitational
uThermal 2v2 Main Event
HCC Europe

Ongoing

Copa Latinoamericana 4
BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Qualifiers
ASL Season 20
CSL Season 18: Qualifier 1
SEL Season 2 Championship
WardiTV Summer 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025

Upcoming

CSLAN 3
CSL 2025 AUTUMN (S18)
LASL Season 20
BSL Season 21
BSL 21 Team A
Chzzk MurlocKing SC1 vs SC2 Cup #2
RSL Revival: Season 2
Maestros of the Game
EC S1
PGL Masters Bucharest 2025
MESA Nomadic Masters Fall
Thunderpick World Champ.
CS Asia Championships 2025
Roobet Cup 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
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.