• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 09:33
CEST 15:33
KST 22:33
  • 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
Power Rank - Esports World Cup 202535RSL Season 1 - Final Week9[ASL19] Finals Recap: Standing Tall15HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16
Community News
BSL Team Wars - Bonyth, Dewalt, Hawk & Sziky teams4Weekly Cups (July 14-20): Final Check-up0Esports World Cup 2025 - Brackets Revealed19Weekly Cups (July 7-13): Classic continues to roll8Team TLMC #5 - Submission re-extension4
StarCraft 2
General
RSL Revival patreon money discussion thread Power Rank - Esports World Cup 2025 RSL Season 1 - Final Week The GOAT ranking of GOAT rankings Esports World Cup 2025 - Final Player Roster
Tourneys
Esports World Cup 2025 Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) FEL Cracov 2025 (July 27) - $8000 live event RSL: Revival, a new crowdfunded tournament series
Strategy
How did i lose this ZvP, whats the proper response
Custom Maps
External Content
Mutation #239 Bad Weather Mutation # 483 Kill Bot Wars Mutation # 482 Wheel of Misfortune Mutation # 481 Fear and Lava
Brood War
General
BSL Team Wars - Bonyth, Dewalt, Hawk & Sziky teams BW General Discussion ASL20 Preliminary Maps BGH Auto Balance -> http://bghmmr.eu/ Flash Announces (and Retracts) Hiatus From ASL
Tourneys
[Megathread] Daily Proleagues [CSLPRO] It's CSLAN Season! - Last Chance [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET The Casual Games of the Week Thread
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread [MMORPG] Tree of Savior (Successor of Ragnarok) Path of Exile CCLP - Command & Conquer League Project
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
Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread US Politics Mega-thread The Games Industry And ATVI Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
[\m/] Heavy Metal Thread Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion
Sports
2024 - 2025 Football Thread Formula 1 Discussion TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Installation of Windows 10 suck at "just a moment" Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Ping To Win? Pings And Their…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Socialism Anyone?
GreenHorizons
Customize Sidebar...

Website Feedback

Closed Threads



Active: 829 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 States24676 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 States24676 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 States24676 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
Esports World Cup
10:00
2025 - Day 2
Clem vs SolarLIVE!
Reynor vs Maru
herO vs Cure
Serral vs Classic
EWC_Arena9437
ComeBackTV 2771
TaKeTV 577
Hui .539
3DClanTV 329
Rex245
EnkiAlexander 195
CranKy Ducklings175
mcanning156
Reynor132
UpATreeSC93
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
EWC_Arena9437
Hui .539
Rex 245
mcanning 156
Reynor 132
UpATreeSC 93
StarCraft: Brood War
Bisu 3436
Barracks 1951
BeSt 1510
Flash 1494
Jaedong 1284
EffOrt 1032
Mini 684
Stork 563
ggaemo 462
Snow 301
[ Show more ]
Soma 274
GuemChi 264
Soulkey 247
ToSsGirL 240
ZerO 177
Hyun 128
Rush 111
Dewaltoss 93
TY 63
soO 60
Sacsri 48
Sea.KH 42
zelot 40
sorry 36
JulyZerg 32
scan(afreeca) 25
Terrorterran 13
Movie 13
Bale 8
ivOry 8
Britney 0
Dota 2
Gorgc4303
XcaliburYe266
420jenkins220
syndereN108
Counter-Strike
sgares550
oskar243
edward39
Super Smash Bros
Westballz28
Other Games
singsing2006
hiko1463
B2W.Neo1069
crisheroes387
Fuzer 142
ArmadaUGS67
QueenE42
ZerO(Twitch)15
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH296
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Dota 2
• WagamamaTV552
League of Legends
• Nemesis3171
Upcoming Events
Esports World Cup
20h 27m
TBD vs Zoun
TBD vs SHIN
TBD vs ShoWTimE
TBD vs Rogue
Esports World Cup
1d 21h
CranKy Ducklings
2 days
BSL20 Non-Korean Champi…
3 days
CSO Cup
3 days
BSL20 Non-Korean Champi…
3 days
Bonyth vs Sziky
Dewalt vs Hawk
Hawk vs QiaoGege
Sziky vs Dewalt
Mihu vs Bonyth
Zhanhun vs QiaoGege
QiaoGege vs Fengzi
FEL
3 days
BSL20 Non-Korean Champi…
4 days
BSL20 Non-Korean Champi…
4 days
Bonyth vs Zhanhun
Dewalt vs Mihu
Hawk vs Sziky
Sziky vs QiaoGege
Mihu vs Hawk
Zhanhun vs Dewalt
Fengzi vs Bonyth
Sparkling Tuna Cup
5 days
[ Show More ]
Online Event
6 days
Liquipedia Results

Completed

CSL Xiamen Invitational
Championship of Russia 2025
Murky Cup #2

Ongoing

Copa Latinoamericana 4
Jiahua Invitational
BSL20 Non-Korean Championship
Esports World Cup 2025
CC Div. A S7
Underdog Cup #2
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
BSL Season 21
RSL Revival: Season 2
SEL Season 2 Championship
uThermal 2v2 Main Event
FEL Cracov 2025
HCC Europe
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
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.