Approximating Pi ( Monte Carlo integration ) | animation

  Рет қаралды 93,405

Think Twice

Think Twice

6 жыл бұрын

Pi approximation using Monte Carlo integration.
_________________________________________________________________
Support my animations on:
/ think_twice
_________________________________________________________________
Any further questions or ideas:
Email - thinktwiceask@gmail.com
Twitter - / thinktwice2580
_________________________________________________________________
Programs used:
- Cinema 4D
- Processing
- Adobe Premiere Pro
_________________________________________________________________

Пікірлер: 162
@abaybektursun
@abaybektursun 6 жыл бұрын
Love from from 3Blue1Brown
@themaverick1891
@themaverick1891 3 жыл бұрын
You are not 3Blue1Brown.
@joshuaabraham7308
@joshuaabraham7308 3 жыл бұрын
@@themaverick1891 Or is he...? Michael Vsauce here
@themaverick1891
@themaverick1891 3 жыл бұрын
@@joshuaabraham7308 No, he is not. You aren't Vsauce either.
@herobrine1847
@herobrine1847 3 жыл бұрын
@@themaverick1891 I’m not 3Blue1Brown I’m unhappy
@tapksa
@tapksa 5 жыл бұрын
A lot of people seem to be asking why would someone use this somewhat inefficient method to approximate pi. I'd say this is more an illustration of using randomness as a basis for a simulation, pi is just a simple and visual example.
@AnantTripathi1by0
@AnantTripathi1by0 6 жыл бұрын
this channel deserves atleast a million subscribers. It really makes me sad that this channel isnt getting all the support thnx 3b1b for bringing me here.
@problematicpuzzlechannel6663
@problematicpuzzlechannel6663 6 жыл бұрын
Wow this channel deserves more subscribers. Subscribed!
@Technomancr
@Technomancr 6 жыл бұрын
Came from 3b1b, stayed for the awesome content.
@mlsgames938
@mlsgames938 6 жыл бұрын
your videos are juste amazing you give us a new understanding of the thing, you are really doing a great job, kisses from France
@vpambs1pt
@vpambs1pt 6 жыл бұрын
Amazing, loved it!
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
Nuno Mateus thanks man:)
@abhinavshripad5356
@abhinavshripad5356 6 жыл бұрын
How on earth can you think that awesome think. GENIUS
@Anonymous-8080
@Anonymous-8080 3 жыл бұрын
True
@jsaavy
@jsaavy 5 жыл бұрын
I use your videos to show my students the beauty of mathematics and to drive home concepts with these amazing visual aesthetics. Thank you!
@sam2026
@sam2026 6 жыл бұрын
definitely a novel way to compute pi that children could understand. Your video is a great and has use in teaching.
@facitenonvictimarum174
@facitenonvictimarum174 6 жыл бұрын
Aleph Naught ...OK then play that video AS IS to a bunch of children and see how many understand. Thanks... (they'd love Who's on First though)
@StarFyreX
@StarFyreX 6 жыл бұрын
I just came across this channel and it’s severely underrated this is so beautiful and interesting
@dyray732
@dyray732 6 жыл бұрын
All of these videos are so good and visually pleasing
@pebre79
@pebre79 6 жыл бұрын
Beautiful, absolutey beautiful. I subscribed!
@phi6934
@phi6934 6 жыл бұрын
I'm only two videos in but i really feel you deserve more subscribers. Great work
@porfavorrecuerdameestudiar7071
@porfavorrecuerdameestudiar7071 3 жыл бұрын
Cool. Great work!
@xjonnyd93x
@xjonnyd93x 6 жыл бұрын
Your visualizations are outstanding! The music also adds just so much to it!
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
thank you~
@DanaTheLateBloomingFruitLoop
@DanaTheLateBloomingFruitLoop 2 жыл бұрын
This is really cool.The youtuber alphaphoenix did this as a practical experiment with raindrops and got pretty close
@PiErDzoncy7
@PiErDzoncy7 4 жыл бұрын
Great job and thank you!
@osbyrne
@osbyrne 6 жыл бұрын
so incredibly cool yet so logic
@cavver3523
@cavver3523 6 жыл бұрын
Please keep doing these videos. I love your videos as much as I love maths! THANKS!
@thatnhoxiu
@thatnhoxiu 6 жыл бұрын
3b1b brought me here
@ZeeshanAli-tv8gu
@ZeeshanAli-tv8gu 6 жыл бұрын
Cool..
@timbeaton5045
@timbeaton5045 6 жыл бұрын
Yep. Me too. Liked and subbed....
@sam4832
@sam4832 6 жыл бұрын
One more here and he was right about the channel; using statistics in geometry, what a mind blowing moment haha
@p0t4t0nastick
@p0t4t0nastick 6 жыл бұрын
same. im sure all the recommended channels from 3b1b saw a massive spike in subscriptions these days. they earned that though!! great stuff
@brogcooper25
@brogcooper25 6 жыл бұрын
Damn. Burned through all of them way too fast.
@shoaibabid393
@shoaibabid393 3 жыл бұрын
The best explanation in short time
@GurpreetKakar4873
@GurpreetKakar4873 6 жыл бұрын
You deserve more subscribers. Great video as usual.
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
Gurpreet Singh Kakar thanks a lot
@vithei477
@vithei477 6 жыл бұрын
Great channel, keep up the great work! I am so happy 3b1b brought me here.
@balajisriram6363
@balajisriram6363 5 жыл бұрын
that probability trick made me laugh. that was brilliant!!
@sam4832
@sam4832 6 жыл бұрын
Awesome!!
@briann363
@briann363 6 жыл бұрын
Cool video as always
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
brian nguyen thank you!
@user-pi1rn9hd6k
@user-pi1rn9hd6k 6 жыл бұрын
I love this chanel. As an ex-math teacher I think any math teacher must use this videos in his classroom on a big screen. A great way to make ABSTRACT issue into VISUAL. (Sorry for bad english) I wish I had this chanel when I teached math. Maybe it will help to add vocal explain. Anyway ty 4 beautiful videos!! Tamir Erez. Israel
@phiniaszs
@phiniaszs 6 жыл бұрын
Awesome!
@drsuper8180
@drsuper8180 4 жыл бұрын
Great show.
@abba4742
@abba4742 2 жыл бұрын
so satisfying
@bhavyajainnd
@bhavyajainnd 6 жыл бұрын
I'm so glad 3b1b sent me here I'm loving your channel 😀😀
@monalisakarim5055
@monalisakarim5055 4 жыл бұрын
Niiiice !
@user-gv1mt6uq4g
@user-gv1mt6uq4g 5 ай бұрын
Bravo 👏
@aksharasajeev4514
@aksharasajeev4514 3 жыл бұрын
Thank you very much from the bottom of my heart 💓 thank you so much 💯🙏
@notexactlysiev
@notexactlysiev 6 жыл бұрын
This is just beautiful. 3b1b sent me here and I'm glad
@ameremortal5715
@ameremortal5715 6 жыл бұрын
Sir u rock
@AlexSFM
@AlexSFM 2 жыл бұрын
I got this on my recomendation feed somehow and I didn't thought I would enjoy a math lesson like this
@ml-simplified
@ml-simplified 6 жыл бұрын
Amazing!!! Love from 3Blue1Brown fan
@MarkJay
@MarkJay 6 жыл бұрын
3Blue1Brown brought me here. Amazing videos! keep it up!!!
@akabetenryuu
@akabetenryuu 6 жыл бұрын
Amazing vídeo.
@animeshkumar1201
@animeshkumar1201 6 жыл бұрын
Great
@debajyotimajumder472
@debajyotimajumder472 6 жыл бұрын
**bows** neat sir, very neat !
@notkamara
@notkamara 6 жыл бұрын
Came from 3Blue1Brown. Subcribed for more amazing content :)
@DanielSantos-ct6vr
@DanielSantos-ct6vr 6 жыл бұрын
Cool
@RomanNumural9
@RomanNumural9 6 жыл бұрын
Beautiful! A video on fixed point iteration might make for some cool visuals
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
thanks:) I will keep that in mind
@joeseppe1398
@joeseppe1398 6 жыл бұрын
i hope people interest with this channel... your content is really good and cool.
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
[Alfraganus] thank you very much
@italyball2166
@italyball2166 6 жыл бұрын
Wow, this is awesome and easily comprehensible. Thanks to 3blue1brown I've discovered you and I'll subscribe to your channel
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
Thanks a lot for the support!
@aymenzaki6786
@aymenzaki6786 2 жыл бұрын
very nice animation thnx
@ThinkTwiceLtu
@ThinkTwiceLtu 2 жыл бұрын
thanks!
@-Mike-
@-Mike- 5 жыл бұрын
I never understood why it has to be randomly generated points to approximate pi. Isn't it easier to put the points homogenously on the square?
@ASLUHLUHCE
@ASLUHLUHCE 6 жыл бұрын
Watch this channel blow up (currently 26k subs)
@johnchristian5027
@johnchristian5027 6 жыл бұрын
Great stuff, we need more youtube channels like this! Subscribed
@jerryhu9005
@jerryhu9005 6 жыл бұрын
It doesn't seem to converge very quickly though...I mean, if you were looking to go to say, 10 digits of accuracy, how many random points would you need?
@vin9020
@vin9020 6 жыл бұрын
Here before 1 mil subscriber xD
@user-qs4lc2we5t
@user-qs4lc2we5t 6 жыл бұрын
This and 3Blue1Brown is great
@snowyshade0901
@snowyshade0901 6 жыл бұрын
Fabulous... Now I can't concentrate to my maths teacher cuz he doesn't explain clearly as you do ;_;
@violet13134
@violet13134 2 жыл бұрын
Wow
@stiutk1220
@stiutk1220 6 жыл бұрын
3b1b recommendation was on point! Subscribed to this channel.
@shoopinc
@shoopinc 5 жыл бұрын
DAMN
@oliot4814
@oliot4814 6 жыл бұрын
You should seriously consider maths hentai as a career path
@sc-ek6qz
@sc-ek6qz 6 жыл бұрын
F@#k YES!
@sc-ek6qz
@sc-ek6qz 6 жыл бұрын
Porn plot be like "Come here girl so i can square root your pie!"
@jsmcguireIII
@jsmcguireIII 6 жыл бұрын
Wouldn't the Central Limit Theorem require >30 random points?
@fawadmirza.
@fawadmirza. 6 жыл бұрын
I saw this approacc on the coating train :D
@snowman7514
@snowman7514 6 жыл бұрын
PInteresting
@lithostheory
@lithostheory 5 жыл бұрын
Nicely inefficient!
@yyytis2069
@yyytis2069 3 жыл бұрын
I made this 2 years ago. Cool
@alvkarthik2018
@alvkarthik2018 3 жыл бұрын
so those point and accounting for the area of the circle and square.. more the points better the approximation
@namannarang4208
@namannarang4208 6 жыл бұрын
I really had a question I have seen many of your animation proofs but do you plan to like present non animation proofs in the future
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
batman rules maybe, but probably not in a near future
@neslef3
@neslef3 6 жыл бұрын
Very interesting. What was your method for creating the circle without using pi in the first place? Do you just create a center point and then use the length of the radius to determine whether a given point is within the circumference or do you use another technique?
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
neslef3 yes I checked if the distance from the center to the point is less than the radius of the circle
@ovebepari6682
@ovebepari6682 6 жыл бұрын
Dayyyymn.
@lorincszabo7411
@lorincszabo7411 6 ай бұрын
this is the video i show to everyone when asked about monte carlo :) so simple so visual :D (the other one i use is "wisdom of the crowd" about counting jellybeans and the german tank problem :D statistics and random at its best serving entire mankind :) )
@jkoh93
@jkoh93 6 жыл бұрын
how does it know if the random point is inside the circle? visually or distance from circle < r? can you also use this to integrate random squiggles not defined by nice formulae? then that would need to be done visually. wait, isnt that what we all did in primary school trying to find the area of a random shape? except instead of random points it was going through all the squares it intersects with
@joeyhardin5903
@joeyhardin5903 6 жыл бұрын
Before I even came here, I made a code just like this on scratch. I left it on for 14 hours to plot 1,000,000 points and the result was like 3.245 😥 It also wrecked my computer
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
feels bad
@gaelbizet4438
@gaelbizet4438 6 жыл бұрын
And we can add that he used a shotgun (He shot on a target inside a square) to make his first approximation! True story :)
@rlstnnl1740
@rlstnnl1740 6 жыл бұрын
What music did you use during this video?
@blu5037
@blu5037 6 жыл бұрын
Damn
@notsoclearsky
@notsoclearsky 5 жыл бұрын
Btw didn't the computer display the circle using the value of pi fed to it in the first place? Anyway great content. Really boosts my interest in maths.
@tapksa
@tapksa 5 жыл бұрын
Probably in the visualization. But as for the actual computation, you can just check whether your random point is within the distance r from the centre of the square. You see?
@rikjandijkstra205
@rikjandijkstra205 6 жыл бұрын
What if there are 5 dots inside the circle and 5 outside the circle. Then you would have 4*(5/5)=4
@sm-zt4ut
@sm-zt4ut 6 жыл бұрын
Is the code allowed to choose the same point twice? Would allowing it to do so have an impact on the results?
@matthewreese7710
@matthewreese7710 Жыл бұрын
I doubt it would have an impact as what we are really looking at is the chance any random point will be in the circle or not. The chance it lands in the circle or not is the same whether or not some other point has landed there before.
@ohboy1113
@ohboy1113 3 жыл бұрын
Yo I feel like a genius I thought of this while looking at a pizza.
@AffeAffelinTV
@AffeAffelinTV 6 жыл бұрын
so how do you describe the areas of the circle and the square? the square in x and y coordinate and the circle with ✓(x²+y²)≤1?
@jaromir.adamec
@jaromir.adamec 4 жыл бұрын
The way you sugest, only take square of both sides of the equation. Specifically, for given x, y ∈ [-1 , 1], test whether x·x+y·y ≤ 1
@ThePharphis
@ThePharphis 6 жыл бұрын
IS the error reduction logarithmic? Square-root?
@naukowywariat7123
@naukowywariat7123 6 жыл бұрын
"Monte Carlo" method by Stanisław Ulam
@nonexistence5135
@nonexistence5135 6 жыл бұрын
Was expecting something a bit more clever than plotting random points tbh
@memyselfandtau4712
@memyselfandtau4712 5 жыл бұрын
How dare you approximate my value??!??
@themaverick1891
@themaverick1891 3 жыл бұрын
Because I can and I will.
@irvinghernandezledezma4400
@irvinghernandezledezma4400 5 жыл бұрын
You can compile in c++, specifically you should do it in linux with g++ compiler if you use windows you will have to change headers files only you put extension .h #include #include #include #include using namespace std; int main() { int c, at; double x, y, sumac, pi, r, ac; srand(time(NULL)); cout at; sumac=0.0; for(c = 1; c
@kundanborakb
@kundanborakb 6 жыл бұрын
Came from 3b1b :)
@hymanimy
@hymanimy 6 жыл бұрын
You can do the same thing with throwing darts at a board ;)
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
true:)
@ThinkTwiceLtu
@ThinkTwiceLtu 6 жыл бұрын
you can also draw the square and a circle on a piece of paper and then leave it in the rain for a minute or so
@reactandgame6894
@reactandgame6894 6 жыл бұрын
**cough** physics girl **cough** kzbin.info/www/bejne/g2SXhYJtZrh-fc0 **cough**
@albertrenshaw4252
@albertrenshaw4252 6 жыл бұрын
How do you determine if a point is within the circle or not though, unless you already know pi?
@erylkenner8045
@erylkenner8045 6 жыл бұрын
Albert Renshaw By finding the distance to the center of the circle. With R^2 >= x^2 + y^2. So given the (x,y) coordinate of a point, as well as the circle's radius R, you can check if that condition holds.
@albertrenshaw4252
@albertrenshaw4252 6 жыл бұрын
Eryl Kenner ahh thank you! So obvious haha, I need to think more before I speak
@yashasvprajapati6851
@yashasvprajapati6851 6 жыл бұрын
What was the code, could you please share?
@rajasharan86
@rajasharan86 6 жыл бұрын
Inspired by this video I created this simple demo: rajasharan.github.io/simple-monte-carlo/
@yoavboaz1078
@yoavboaz1078 5 жыл бұрын
How do you even thinking about it
@Galva94a
@Galva94a 5 жыл бұрын
Man, was that convergence slow...
@bhavyajainnd
@bhavyajainnd 6 жыл бұрын
Wow and how did the one who found this did it? I'm sure he didn't know coding back then
@burthpinmc5489
@burthpinmc5489 6 жыл бұрын
Bhavya Jain You don't need the coding You can prove the probabilistic inequality and squeeze it by infinity. (stochastic method) Wonderful mathematics.
@bhavyajainnd
@bhavyajainnd 6 жыл бұрын
Sury Bury wow that sounds interesting 😀
@trobin
@trobin 6 жыл бұрын
hello, everyone coming from 3b1b’s channel, feast your eyes!
@tupleee
@tupleee Жыл бұрын
Monte Dé Carlo
@fahadahmed8172
@fahadahmed8172 3 жыл бұрын
It might be elementry question but why cant 4(2r) instead of 4r^2 in square Please can anyone elaborate.
@fahadahmed8172
@fahadahmed8172 3 жыл бұрын
@think twice
@matthewreese7710
@matthewreese7710 Жыл бұрын
2r is equal to one side length of the square. (2r)^2 is 4r^2, which both give the area. 2r times 4 is the perimeter, as the share has 4 sides all equal to 2r.
@penatoliy
@penatoliy Жыл бұрын
Mote Carlo is king of smart random) But its never get true value, cuz Pi cant be represented as fraction.
@GERhashim
@GERhashim 6 жыл бұрын
How do you know if the point is in the circle ? You need to draw a circle. How do you draw the circle ? You will need Pi. So you are using Pi to calculate Pi That does mean you will not get better accurate Approximation of Pi than your original Pi that you used to draw the circle. So what is the point?
@netsouba5124
@netsouba5124 6 жыл бұрын
Ger hashim A point is in the circle if its distance with the center is inferior to r so you don't need pi
@GERhashim
@GERhashim 6 жыл бұрын
oooh now i got it. thank you got explaining :)
@cristiantomi2188
@cristiantomi2188 6 жыл бұрын
Now i like maths
@That_One_Guy...
@That_One_Guy... 3 жыл бұрын
Huh this is the same trick that Joma showed 🧐
Monte Carlo Simulation
10:06
MarbleScience
Рет қаралды 1,4 МЛН
Monte Carlo Integration
3:04
Ethan Smith
Рет қаралды 24 М.
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 4,2 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Watermelon Cat?! 🙀 #cat #cute #kitten
00:56
Stocat
Рет қаралды 54 МЛН
Fitting a Cube Through a Copy of Itself | Rupert's Cube |
2:10
Think Twice
Рет қаралды 318 М.
The Monte Carlo Method
16:01
RandomMathsInc
Рет қаралды 80 М.
A fun probability puzzle with a neat geometric solution.
6:34
Think Twice
Рет қаралды 52 М.
Animation vs. Math
14:03
Alan Becker
Рет қаралды 63 МЛН
Why do calculators get this wrong? (We don't know!)
12:19
Stand-up Maths
Рет қаралды 2,1 МЛН
The rarest move in chess
17:01
Paralogical
Рет қаралды 1,2 МЛН
Infinite Sums | Geometric Series | Explained Visually
2:47
Think Twice
Рет қаралды 133 М.
How is π calculated to trillions of digits?
15:00
Joshua Rayton
Рет қаралды 123 М.
Percolation: a Mathematical Phase Transition
26:52
Spectral Collective
Рет қаралды 352 М.
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 4,2 МЛН