• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 04:37
CEST 10:37
KST 17:37
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL54Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event16Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
Weekly Cups (June 23-29): Reynor in world title form? The SCII GOAT: A statistical Evaluation PiG Sty Festival #5: Playoffs Preview + Groups Recap The GOAT ranking of GOAT rankings Statistics for vetoed/disliked maps
Tourneys
Korean Starcraft League Week 77 Master Swan Open (Global Bronze-Master 2) RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S: Season 2 - Semi Finals & Finals $5,100+ SEL Season 2 Championship (SC: Evo)
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Player “Jedi” cheat on CSL BW General Discussion Flash Announces Hiatus From ASL BGH Auto Balance -> http://bghmmr.eu/ Unit and Spell Similarities
Tourneys
[Megathread] Daily Proleagues [BSL20] Grand Finals - Sunday 20:00 CET Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
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
US Politics Mega-thread Trading/Investing Thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 644 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 States24666 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 States24666 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 States24666 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
Next event in 1h 23m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Reynor 365
StarCraft: Brood War
Larva 639
GoRush 29
yabsab 16
Yoon 14
ivOry 4
Dota 2
XaKoH 497
XcaliburYe413
Counter-Strike
Stewie2K1619
Heroes of the Storm
Khaldor160
Other Games
summit1g4807
Happy390
Organizations
Other Games
BasetradeTV41
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH305
• Adnapsc2 21
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo3292
• Stunt579
Upcoming Events
CranKy Ducklings
1h 23m
RSL Revival
1h 23m
ByuN vs Cham
herO vs Reynor
WardiTV European League
3h 23m
FEL
7h 23m
RSL Revival
1d 1h
Clem vs Classic
SHIN vs Cure
FEL
1d 3h
WardiTV European League
1d 3h
BSL: ProLeague
1d 9h
Dewalt vs Bonyth
Replay Cast
2 days
Sparkling Tuna Cup
3 days
[ Show More ]
WardiTV European League
3 days
The PondCast
4 days
Replay Cast
4 days
RSL Revival
5 days
Replay Cast
5 days
RSL Revival
6 days
Liquipedia Results

Completed

BSL 2v2 Season 3
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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.