• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 23:03
CEST 05:03
KST 12:03
  • 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
TL.net Map Contest #21: Voting2[ASL20] Ro4 Preview: Descent4Team TLMC #5: Winners Announced!3[ASL20] Ro8 Preview Pt2: Holding On9Maestros of the Game: Live Finals Preview (RO4)5
Community News
5.0.15 Patch Balance Hotfix (2025-10-8)61Weekly Cups (Sept 29-Oct 5): MaxPax triples up3PartinG joins SteamerZone, returns to SC2 competition295.0.15 Balance Patch Notes (Live version)119$2,500 WardiTV TL Map Contest Tournament 154
StarCraft 2
General
PartinG joins SteamerZone, returns to SC2 competition TL.net Map Contest #21: Voting 5.0.15 Patch Balance Hotfix (2025-10-8) TL.net Map Contest #21 - Finalists Geoff 'iNcontroL' Robinson has passed away
Tourneys
SC2's Safe House 2 - October 18 & 19 Sparkling Tuna Cup - Weekly Open Tournament RSL Offline Finals Dates + Ticket Sales! SC4ALL $6,000 Open LAN in Philadelphia $2,500 WardiTV TL Map Contest Tournament 15
Strategy
Custom Maps
External Content
Mutation # 495 Rest In Peace Mutation # 494 Unstable Environment Mutation # 493 Quick Killers Mutation # 492 Get Out More
Brood War
General
Any rep analyzer that shows resources situation? [ASL20] Ro4 Preview: Descent Whose hotkey signature is this? BW General Discussion BGH Auto Balance -> http://bghmmr.eu/
Tourneys
[ASL20] Semifinal A [Megathread] Daily Proleagues [ASL20] Ro8 Day 4 Small VOD Thread 2.0
Strategy
Current Meta BW - ajfirecracker Strategy & Training Siegecraft - a new perspective TvZ Theorycraft - Improving on State of the Art
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread ZeroSpace Megathread Dawn of War IV Path of Exile
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
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
SPIRED by.ASL Mafia {211640} TL Mafia Community Thread
Community
General
US Politics Mega-thread The Games Industry And ATVI Stop the Construction YouTube Thread Things Aren’t Peaceful in Palestine
Fan Clubs
The herO Fan Club! The Happy Fan Club!
Media & Entertainment
Anime Discussion Thread [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023 NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Inbreeding: Why Do We Do It…
Peanutsc
From Tilt to Ragequit:The Ps…
TrAiDoS
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1103 users

Area of a Circle

Blogs > EsX_Raptor
Post a Reply
Normal
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 States24709 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 States24709 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 States24709 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 6h 57m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PartinGtheBigBoy 242
WinterStarcraft189
RuFF_SC2 158
StarCraft: Brood War
Larva 526
ajuk12(nOOB) 28
Noble 23
Icarus 11
Dota 2
monkeys_forever331
PGG 171
NeuroSwarm3
Super Smash Bros
Mew2King40
Heroes of the Storm
Khaldor134
Other Games
summit1g12977
JimRising 675
ViBE208
Skadoodle180
Maynarde179
kaitlyn54
Nina36
Organizations
Other Games
gamesdonequick783
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV671
League of Legends
• Scarra1608
• Rush494
• Lourlo244
Upcoming Events
Afreeca Starleague
6h 57m
Barracks vs Snow
Wardi Open
7h 57m
Monday Night Weeklies
12h 57m
Replay Cast
20h 57m
Afreeca Starleague
1d 6h
Soma vs Bisu
OSC
1d 10h
OSC
1d 14h
PiGosaur Monday
1d 20h
The PondCast
3 days
OSC
3 days
[ Show More ]
Wardi Open
4 days
CranKy Ducklings
5 days
Safe House 2
5 days
Sparkling Tuna Cup
6 days
Safe House 2
6 days
Liquipedia Results

Completed

Acropolis #4 - TS2
WardiTV TLMC #15
HCC Europe

Ongoing

BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
C-Race Season 1
IPSL Winter 2025-26
EC S1
ESL Pro League S22
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

Upcoming

SC4ALL: Brood War
BSL Season 21
BSL 21 Team A
RSL Offline Finals
RSL Revival: Season 3
Stellar Fest
SC4ALL: StarCraft II
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 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.