Skip to content

Commit

Permalink
Monte Carlo Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushar98644 committed Mar 9, 2024
1 parent f7c77f0 commit 56a769e
Show file tree
Hide file tree
Showing 13 changed files with 11,339 additions and 0 deletions.
2,487 changes: 2,487 additions & 0 deletions monte-carlo-integration/animint.js

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions monte-carlo-integration/geom1_rect_ggplotanim_chunk1.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
x xmin xmax y ymin ymax showSelected1 key
23.4524966217577 23.4524966217577 23.4624966217578 550.019597793559 0 550.019597793559 1 1
-48.36172205396 -48.36172205396 -48.35172205396 2338.85616002448 0 2338.85616002448 2 2
-45.6495185848326 -45.6495185848326 -45.6395185848326 2083.87854702697 0 2083.87854702697 3 3
-24.9989288859069 -24.9989288859069 -24.9889288859069 624.946445442632 0 624.946445442632 4 4
-75.1191870309413 -75.1191870309413 -75.1091870309412 5642.89226018953 0 5642.89226018953 5 5
42.9672381374985 42.9672381374985 42.9772381374985 1846.18355316451 0 1846.18355316451 6 6
-77.3906635120511 -77.3906635120511 -77.3806635120511 5989.31479883552 0 5989.31479883552 7 7
70.6415810156614 70.6415810156614 70.6515810156614 4990.23296839225 0 4990.23296839225 8 8
-7.22326352261007 -7.22326352261007 -7.21326352261007 52.1755359170692 0 52.1755359170692 9 9
9.67599856667221 9.67599856667221 9.68599856667221 93.6249482622426 0 93.6249482622426 10 10
-98.8156513310969 -98.8156513310969 -98.8056513310969 9764.53294798891 0 9764.53294798891 11 11
68.6120239086449 68.6120239086449 68.6220239086449 4707.60982484046 0 4707.60982484046 12 12
7.24552301689982 7.24552301689982 7.25552301689982 52.4976037884251 0 52.4976037884251 13 13
-79.2108885478228 -79.2108885478228 -79.2008885478228 6274.36486453561 0 6274.36486453561 14 14
86.0339127015322 86.0339127015322 86.0439127015323 7401.83413473487 0 7401.83413473487 15 15
90.5542501248419 90.5542501248419 90.5642501248419 8200.07221567244 0 8200.07221567244 16 16
33.7272924371064 33.7272924371064 33.7372924371064 1137.53025513809 0 1137.53025513809 17 17
-10.4394491761923 -10.4394491761923 -10.4294491761923 108.982099102302 0 108.982099102302 18 18
-15.4961749445647 -15.4961749445647 -15.4861749445647 240.131437912555 0 240.131437912555 19 19
57.683044206351 57.683044206351 57.6930442063511 3327.33358891185 0 3327.33358891185 20 20
-25.1921034418046 -25.1921034418046 -25.1821034418047 634.642075822586 0 634.642075822586 21 21
-98.2398118823767 -98.2398118823767 -98.2298118823767 9651.06063868476 0 9651.06063868476 22 22
70.4729626886547 70.4729626886547 70.4829626886547 4966.43847011651 0 4966.43847011651 23 23
-73.7446740735322 -73.7446740735322 -73.7346740735322 5438.2769542115 0 5438.2769542115 24 24
-89.7724191192538 -89.7724191192538 -89.7624191192538 8059.08723452296 0 8059.08723452296 25 25
89.6102256141603 89.6102256141603 89.6202256141603 8029.99253462071 0 8029.99253462071 26 26
-70.5764960963279 -70.5764960963279 -70.5664960963279 4981.04180123499 0 4981.04180123499 27 27
2.97399093396962 2.97399093396962 2.98399093396962 8.84462207533347 0 8.84462207533347 28 28
-66.4323898032308 -66.4323898032308 -66.4223898032308 4413.2624149684 0 4413.2624149684 29 29
86.2445673905313 86.2445673905313 86.2545673905313 7438.1254043799 0 7438.1254043799 30 30
75.9675579611212 75.9675579611212 75.9775579611212 5771.06986257631 0 5771.06986257631 31 31
-10.6727213133127 -10.6727213133127 -10.6627213133127 113.906980231638 0 113.906980231638 32 32
79.9686715938151 79.9686715938151 79.9786715938151 6394.98843647945 0 6394.98843647945 33 33
9.85956229269505 9.85956229269505 9.86956229269505 97.210968603534 0 97.210968603534 34 34
14.8648855276406 14.8648855276406 14.8748855276406 220.964821749858 0 220.964821749858 35 35
22.7919038850814 22.7919038850814 22.8019038850814 519.470882706789 0 519.470882706789 36 36
99.8127279803157 99.8127279803157 99.8227279803157 9962.58066687249 0 9962.58066687249 37 37
-41.7196498718113 -41.7196498718113 -41.7096498718113 1740.52918542652 0 1740.52918542652 38 38
-29.6379902400076 -29.6379902400076 -29.6279902400076 878.410465466788 0 878.410465466788 39 39
33.7153394706547 33.7153394706547 33.7253394706547 1136.72411562149 0 1136.72411562149 40 40
23.5085585620254 23.5085585620254 23.5185585620254 552.652325664179 0 552.652325664179 41 41
-93.3480177074671 -93.3480177074671 -93.3380177074671 8713.85240991359 0 8713.85240991359 42 42
-92.2172429040074 -92.2172429040074 -92.2072429040074 8504.01988881671 0 8504.01988881671 43 43
-30.6397460401058 -30.6397460401058 -30.6297460401058 938.79403740218 0 938.79403740218 44 44
80.8782414533198 80.8782414533198 80.8882414533198 6541.2899405815 0 6541.2899405815 45 45
-24.3833404965699 -24.3833404965699 -24.3733404965699 594.547293771664 0 594.547293771664 46 46
-56.340522877872 -56.340522877872 -56.330522877872 3174.25451815202 0 3174.25451815202 47 47
94.4819698575884 94.4819698575884 94.4919698575884 8926.84262817025 0 8926.84262817025 48 48
-35.342171182856 -35.342171182856 -35.332171182856 1249.06906391829 0 1249.06906391829 49 49
-23.8749823067337 -23.8749823067337 -23.8649823067337 570.014780146849 0 570.014780146849 50 50
-73.6921290867031 -73.6921290867031 -73.6821290867031 5430.52988933131 0 5430.52988933131 51 51
-44.8457382619381 -44.8457382619381 -44.8357382619381 2011.14024025826 0 2011.14024025826 52 52
-69.611688842997 -69.611688842997 -69.601688842997 4845.78722357423 0 4845.78722357423 53 53
21.7817648779601 21.7817648779601 21.7917648779601 474.445281198736 0 474.445281198736 54 54
-9.55467694438994 -9.55467694438994 -9.54467694438994 91.2918515116567 0 91.2918515116567 55 55
37.4048801138997 37.4048801138997 37.4148801138997 1399.12505633521 0 1399.12505633521 56 56
44.2514036316425 44.2514036316425 44.2614036316425 1958.18672337054 0 1958.18672337054 57 57
24.0666300989687 24.0666300989687 24.0766300989688 579.202684320588 0 579.202684320588 58 58
-49.154134420678 -49.154134420678 -49.144134420678 2416.12893064608 0 2416.12893064608 59 59
-86.3000120501965 -86.3000120501965 -86.2900120501965 7447.69207986407 0 7447.69207986407 60 60
-18.6856743413955 -18.6856743413955 -18.6756743413955 349.154425592686 0 349.154425592686 61 61
81.4885844476521 81.4885844476521 81.4985844476521 6640.38939528213 0 6640.38939528213 62 62
9.36938561499119 9.36938561499119 9.37938561499119 87.7853868024038 0 87.7853868024038 63 63
22.3122145049274 22.3122145049274 22.3222145049274 497.834916113893 0 497.834916113893 64 64
58.0744351726025 58.0744351726025 58.0844351726025 3372.64002061681 0 3372.64002061681 65 65
-80.0895317923278 -80.0895317923278 -80.0795317923278 6414.33310271428 0 6414.33310271428 66 66
38.4624526835978 38.4624526835978 38.4724526835978 1479.360266438 0 1479.360266438 67 67
-75.6391032133251 -75.6391032133251 -75.6291032133251 5721.27393491605 0 5721.27393491605 68 68
52.2185808978975 52.2185808978975 52.2285808978975 2726.78019099026 0 2726.78019099026 69 69
3.45940454863012 3.45940454863012 3.46940454863012 11.9674798310828 0 11.9674798310828 70 70
-48.313754517585 -48.313754517585 -48.303754517585 2334.21887558547 0 2334.21887558547 71 71
-0.449930271133781 -0.449930271133781 -0.439930271133781 0.202437248882517 0 0.202437248882517 72 72
-36.4180671516806 -36.4180671516806 -36.4080671516806 1326.27561506432 0 1326.27561506432 73 73
-26.5858623199165 -26.5858623199165 -26.5758623199165 706.808075293555 0 706.808075293555 74 74
-6.56812144443393 -6.56812144443393 -6.55812144443393 43.1402193088328 0 43.1402193088328 75 75
62.4969966243953 62.4969966243953 62.5069966243953 3905.87458706967 0 3905.87458706967 76 76
67.7519608754665 67.7519608754665 67.7619608754665 4590.32820247074 0 4590.32820247074 77 77
44.8352150153369 44.8352150153369 44.8452150153369 2010.19650547149 0 2010.19650547149 78 78
-58.6206846870482 -58.6206846870482 -58.6106846870482 3436.38467317833 0 3436.38467317833 79 79
71.7877802439034 71.7877802439034 71.7977802439034 5153.48539234697 0 5153.48539234697 80 80
4.82397777959704 4.82397777959704 4.83397777959704 23.270761618046 0 23.270761618046 81 81
-47.0989352092147 -47.0989352092147 -47.0889352092147 2218.3096978418 0 2218.3096978418 82 82
91.3894872181118 91.3894872181118 91.3994872181118 8352.03837398941 0 8352.03837398941 83 83
-61.7873607203364 -61.7873607203364 -61.7773607203364 3817.67794478497 0 3817.67794478497 84 84
94.2879155278206 94.2879155278206 94.2979155278206 8890.21101458143 0 8890.21101458143 85 85
81.7180413752794 81.7180413752794 81.7280413752794 6677.83828621188 0 6677.83828621188 86 86
77.5996540207416 77.5996540207416 77.6096540207416 6021.7063041388 0 6021.7063041388 87 87
-34.3662573024631 -34.3662573024631 -34.3562573024631 1181.0396409791 0 1181.0396409791 88 88
34.1499292757362 34.1499292757362 34.1599292757362 1166.21766953779 0 1166.21766953779 89 89
-14.1608686186373 -14.1608686186373 -14.1508686186373 200.530200034307 0 200.530200034307 90 90
52.7869174722582 52.7869174722582 52.7969174722582 2786.458656223 0 2786.458656223 91 91
-44.9626653920859 -44.9626653920859 -44.9526653920859 2021.64127916068 0 2021.64127916068 92 92
-75.7891558110714 -75.7891558110714 -75.7791558110714 5743.99613855486 0 5743.99613855486 93 93
-31.8583885673434 -31.8583885673434 -31.8483885673434 1014.95692210783 0 1014.95692210783 94 94
53.5358095075935 53.5358095075935 53.5458095075935 2866.08289963334 0 2866.08289963334 95 95
-79.0175570175052 -79.0175570175052 -79.0075570175052 6243.77431701468 0 6243.77431701468 96 96
-90.1840104255825 -90.1840104255825 -90.1740104255825 8133.15573644158 0 8133.15573644158 97 97
17.5124675966799 17.5124675966799 17.5224675966799 306.686521324764 0 306.686521324764 98 98
7.07064238376916 7.07064238376916 7.08064238376915 49.9939837191528 0 49.9939837191528 99 99
-26.0704385582358 -26.0704385582358 -26.0604385582358 679.667766618746 0 679.667766618746 100 100
101 changes: 101 additions & 0 deletions monte-carlo-integration/geom2_line_ggplotanim_chunk1.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
x y showSelected1 key group
-98.8156513310969 3315.06196987847 11 11 -1
-98.2398118823767 3315.06196987847 22 22 -1
-93.3480177074671 3315.06196987847 42 42 -1
-92.2172429040074 3315.06196987847 43 43 -1
-90.1840104255825 3315.06196987847 97 97 -1
-89.7724191192538 3315.06196987847 25 25 -1
-86.3000120501965 3315.06196987847 60 60 -1
-80.0895317923278 3315.06196987847 66 66 -1
-79.2108885478228 3315.06196987847 14 14 -1
-79.0175570175052 3315.06196987847 96 96 -1
-77.3906635120511 3315.06196987847 7 7 -1
-75.7891558110714 3315.06196987847 93 93 -1
-75.6391032133251 3315.06196987847 68 68 -1
-75.1191870309413 3315.06196987847 5 5 -1
-73.7446740735322 3315.06196987847 24 24 -1
-73.6921290867031 3315.06196987847 51 51 -1
-70.5764960963279 3315.06196987847 27 27 -1
-69.611688842997 3315.06196987847 53 53 -1
-66.4323898032308 3315.06196987847 29 29 -1
-61.7873607203364 3315.06196987847 84 84 -1
-58.6206846870482 3315.06196987847 79 79 -1
-56.340522877872 3315.06196987847 47 47 -1
-49.154134420678 3315.06196987847 59 59 -1
-48.36172205396 3315.06196987847 2 2 -1
-48.313754517585 3315.06196987847 71 71 -1
-47.0989352092147 3315.06196987847 82 82 -1
-45.6495185848326 3315.06196987847 3 3 -1
-44.9626653920859 3315.06196987847 92 92 -1
-44.8457382619381 3315.06196987847 52 52 -1
-41.7196498718113 3315.06196987847 38 38 -1
-36.4180671516806 3315.06196987847 73 73 -1
-35.342171182856 3315.06196987847 49 49 -1
-34.3662573024631 3315.06196987847 88 88 -1
-31.8583885673434 3315.06196987847 94 94 -1
-30.6397460401058 3315.06196987847 44 44 -1
-29.6379902400076 3315.06196987847 39 39 -1
-26.5858623199165 3315.06196987847 74 74 -1
-26.0704385582358 3315.06196987847 100 100 -1
-25.1921034418046 3315.06196987847 21 21 -1
-24.9989288859069 3315.06196987847 4 4 -1
-24.3833404965699 3315.06196987847 46 46 -1
-23.8749823067337 3315.06196987847 50 50 -1
-18.6856743413955 3315.06196987847 61 61 -1
-15.4961749445647 3315.06196987847 19 19 -1
-14.1608686186373 3315.06196987847 90 90 -1
-10.6727213133127 3315.06196987847 32 32 -1
-10.4394491761923 3315.06196987847 18 18 -1
-9.55467694438994 3315.06196987847 55 55 -1
-7.22326352261007 3315.06196987847 9 9 -1
-6.56812144443393 3315.06196987847 75 75 -1
-0.449930271133781 3315.06196987847 72 72 -1
2.97399093396962 3315.06196987847 28 28 -1
3.45940454863012 3315.06196987847 70 70 -1
4.82397777959704 3315.06196987847 81 81 -1
7.07064238376916 3315.06196987847 99 99 -1
7.24552301689982 3315.06196987847 13 13 -1
9.36938561499119 3315.06196987847 63 63 -1
9.67599856667221 3315.06196987847 10 10 -1
9.85956229269505 3315.06196987847 34 34 -1
14.8648855276406 3315.06196987847 35 35 -1
17.5124675966799 3315.06196987847 98 98 -1
21.7817648779601 3315.06196987847 54 54 -1
22.3122145049274 3315.06196987847 64 64 -1
22.7919038850814 3315.06196987847 36 36 -1
23.4524966217577 3315.06196987847 1 1 -1
23.5085585620254 3315.06196987847 41 41 -1
24.0666300989687 3315.06196987847 58 58 -1
33.7153394706547 3315.06196987847 40 40 -1
33.7272924371064 3315.06196987847 17 17 -1
34.1499292757362 3315.06196987847 89 89 -1
37.4048801138997 3315.06196987847 56 56 -1
38.4624526835978 3315.06196987847 67 67 -1
42.9672381374985 3315.06196987847 6 6 -1
44.2514036316425 3315.06196987847 57 57 -1
44.8352150153369 3315.06196987847 78 78 -1
52.2185808978975 3315.06196987847 69 69 -1
52.7869174722582 3315.06196987847 91 91 -1
53.5358095075935 3315.06196987847 95 95 -1
57.683044206351 3315.06196987847 20 20 -1
58.0744351726025 3315.06196987847 65 65 -1
62.4969966243953 3315.06196987847 76 76 -1
67.7519608754665 3315.06196987847 77 77 -1
68.6120239086449 3315.06196987847 12 12 -1
70.4729626886547 3315.06196987847 23 23 -1
70.6415810156614 3315.06196987847 8 8 -1
71.7877802439034 3315.06196987847 80 80 -1
75.9675579611212 3315.06196987847 31 31 -1
77.5996540207416 3315.06196987847 87 87 -1
79.9686715938151 3315.06196987847 33 33 -1
80.8782414533198 3315.06196987847 45 45 -1
81.4885844476521 3315.06196987847 62 62 -1
81.7180413752794 3315.06196987847 86 86 -1
86.0339127015322 3315.06196987847 15 15 -1
86.2445673905313 3315.06196987847 30 30 -1
89.6102256141603 3315.06196987847 26 26 -1
90.5542501248419 3315.06196987847 16 16 -1
91.3894872181118 3315.06196987847 83 83 -1
94.2879155278206 3315.06196987847 85 85 -1
94.4819698575884 3315.06196987847 48 48 -1
99.8127279803157 3315.06196987847 37 37 -1
102 changes: 102 additions & 0 deletions monte-carlo-integration/geom3_path_ggplotanim_chunk1.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
x y group
-98.8156513310969 9764.53294798891 -1
-96.8292675379828 9375.90705194224 -1
-94.8428837448686 8995.17259704267 -1
-92.8564999517545 8622.32958329019 -1
-90.8701161586404 8257.3780106848 -1
-88.8837323655263 7900.3178792265 -1
-86.8973485724121 7551.1491889153 -1
-84.910964779298 7209.87193975119 -1
-82.9245809861839 6876.48613173417 -1
-80.9381971930698 6550.99176486425 -1
-78.9518133999556 6233.38883914141 -1
-76.9654296068415 5923.67735456567 -1
-74.9790458137274 5621.85731113703 -1
-72.9926620206133 5327.92870885548 -1
-71.0062782274991 5041.89154772102 -1
-69.019894434385 4763.74582773365 -1
-67.0335106412709 4493.49154889338 -1
-65.0471268481568 4231.12871120019 -1
-63.0607430550426 3976.65731465411 -1
-61.0743592619285 3730.07735925511 -1
-59.0879754688144 3491.38884500321 -1
-57.1015916757003 3260.5917718984 -1
-55.1152078825861 3037.68613994068 -1
-53.128824089472 2822.67194913006 -1
-51.1424402963579 2615.54919946653 -1
-49.1560565032438 2416.31789095009 -1
-47.1696727101296 2224.97802358075 -1
-45.1832889170155 2041.5295973585 -1
-43.1969051239014 1865.97261228334 -1
-41.2105213307872 1698.30706835527 -1
-39.2241375376731 1538.5329655743 -1
-37.237753744559 1386.65030394042 -1
-35.2513699514449 1242.65908345363 -1
-33.2649861583307 1106.55930411394 -1
-31.2786023652166 978.350965921334 -1
-29.2922185721025 858.034068875826 -1
-27.3058347789884 745.60861297741 -1
-25.3194509858742 641.074598226088 -1
-23.3330671927601 544.432024621858 -1
-21.346683399646 455.680892164721 -1
-19.3602996065319 374.821200854677 -1
-17.3739158134177 301.852950691727 -1
-15.3875320203036 236.776141675869 -1
-13.4011482271895 179.590773807104 -1
-11.4147644340754 130.296847085432 -1
-9.42838064096124 88.8943615108526 -1
-7.44199684784711 55.3833170833663 -1
-5.45561305473298 29.7637138029729 -1
-3.46922926161885 12.0355516696725 -1
-1.48284546850472 2.19883068346498 -1
0.503538324609394 0.253550844350436 -1
2.48992211772352 6.1997121523288 -1
4.47630591083765 20.0373146074001 -1
6.46268970395178 41.7663582095644 -1
8.4490734970659 71.3868429588213 -1
10.43545729018 108.898768855171 -1
12.4218410832942 154.302135898615 -1
14.4082248764083 207.59694408915 -1
16.3946086695224 268.783193426779 -1
18.3809924626365 337.860883911501 -1
20.3673762557507 414.830015543316 -1
22.3537600488648 499.690588322223 -1
24.3401438419789 592.442602248223 -1
26.326527635093 693.086057321317 -1
28.3129114282072 801.620953541504 -1
30.2992952213213 918.047290908782 -1
32.2856790144354 1042.36506942315 -1
34.2720628075495 1174.57428908462 -1
36.2584466006637 1314.67494989318 -1
38.2448303937778 1462.66705184883 -1
40.2312141868919 1618.55059495157 -1
42.217597980006 1782.32557920141 -1
44.2039817731202 1953.99200459834 -1
46.1903655662343 2133.54987114236 -1
48.1767493593484 2320.99917883348 -1
50.1631331524625 2516.33992767169 -1
52.1495169455767 2719.57211765699 -1
54.1359007386908 2930.69574878938 -1
56.1222845318049 3149.71082106887 -1
58.1086683249191 3376.61733449545 -1
60.0950521180332 3611.41528906912 -1
62.0814359111473 3854.10468478989 -1
64.0678197042614 4104.68552165775 -1
66.0542034973755 4363.1577996727 -1
68.0405872904897 4629.52151883474 -1
70.0269710836038 4903.77667914388 -1
72.0133548767179 5185.92328060011 -1
73.9997386698321 5475.96132320344 -1
75.9861224629462 5773.89080695386 -1
77.9725062560603 6079.71173185137 -1
79.9588900491744 6393.42409789596 -1
81.9452738422885 6715.02790508766 -1
83.9316576354027 7044.52315342645 -1
85.9180414285168 7381.90984291233 -1
87.9044252216309 7727.1879735453 -1
89.8908090147451 8080.35754532537 -1
91.8771928078592 8441.41855825253 -1
93.8635766009733 8810.37101232679 -1
95.8499603940875 9187.21490754813 -1
97.8363441872015 9571.95024391657 -1
99.8227279803157 9964.5770214321 -1
27 changes: 27 additions & 0 deletions monte-carlo-integration/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>

<head>

<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Interactive animation</title>
<script type="text/javascript" src="vendor/d3.v3.js"></script>
<script type="text/javascript" src="animint.js"></script>
<link rel="stylesheet" type="text/css" href="styles.css" />
<!-- Selectize -->
<script type="text/javascript" src="vendor/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="vendor/selectize.min.js"></script>
<link rel="stylesheet" type="text/css" href="vendor/selectize.css" />
</head>

<body>

<div id="plot"> </div>
<script>
var plot = new animint("#plot","plot.json");
</script>

</body>

</html>

Loading

0 comments on commit 56a769e

Please sign in to comment.