File:Halflife-sim.gif
出典:ウィキメディア・コモンズ (Wikimedia Commons)
ナビゲーションに移動
検索に移動
Halflife-sim.gif (100 × 188 ピクセル、ファイルサイズ: 17キロバイト、MIME タイプ: image/gif、ループします、80 フレーム、8.5秒)
ファイル情報
構造化データ
キャプション
概要[編集]
解説Halflife-sim.gif |
English: Simulation of many identical atoms undergoing radioactive decay, starting with either four atoms (left) or 400 atoms (right). The number at the top indicates how many half-lives have elapsed. Note the law of large numbers: With more atoms, the overall decay is less random. Image made with Mathematica, I am happy to send the source code if you would like to make this image more beautiful, or for any other reason. |
日付 | |
原典 | 投稿者自身による著作物 |
作者 | Sbyrnes321 |
ライセンス[編集]
Public domainPublic domainfalsefalse |
この著作物の著作権者である私は、この著作物における権利を放棄しパブリックドメインとします。これは全世界で適用されます。 一部の国では、これが法的に可能ではない場合があります。その場合は、次のように宣言します。 私は、あらゆる人に対して、法により必要とされている条件を除き、如何なる条件も課すことなく、あらゆる目的のためにこの著作物を使用する権利を与えます。 |
(* Source code written in Mathematica 6.0, by Steve Byrnes, 2010. I release this code into the public domain. *) SeedRandom[2] (*Build list of point coordinates and radii*) BuildCoordList[SqCenterX_, SqCenterY_, SqSide_, PtsPerRow_] := Flatten[Table[{i, j}, {i, SqCenterX - SqSide/2, SqCenterX + SqSide/2, SqSide/(PtsPerRow - 1)}, {j, SqCenterY - SqSide/2, SqCenterY + SqSide/2, SqSide/(PtsPerRow - 1)}], 1]; coordslist = Join[ BuildCoordList[3.5, 1, 1.8, 20], BuildCoordList[3.5, 3, 1.8, 20], BuildCoordList[3.5, 5, 1.8, 20], BuildCoordList[3.5, 7, 1.8, 20], BuildCoordList[1, 1, .7, 2], BuildCoordList[1, 3, .7, 2], BuildCoordList[1, 5, .7, 2], BuildCoordList[1, 7, .7, 2]]; NumPts = Length[coordslist]; radiuslist = Join[Table[.03, {i, 1, 4*400}], Table[.1, {i, 1, 4*4}]]; (*Draw borders*) xlist = {0, 2}; leftx = 0; rightx = 2; numx = Length[xlist]; ylist = {0, 2, 4, 6, 8}; topy = 0; boty = 8; numy = Length[ylist]; lines = {}; For[i = 1, i <= numy, i++, lines = Append[lines, Line[{{leftx, ylist[[i]]}, {rightx, ylist[[i]]}}]]]; For[i = 1, i <= numx, i++, lines = Append[lines, Line[{{xlist[[i]], topy}, {xlist[[i]], boty}}]]]; xlist = {2.5, 4.5}; leftx = 2.5; rightx = 4.5; numx = Length[xlist]; ylist = {0, 2, 4, 6, 8}; topy = 0; boty = 8; numy = Length[ylist]; For[i = 1, i <= numy, i++, lines = Append[lines, Line[{{leftx, ylist[[i]]}, {rightx, ylist[[i]]}}]]]; For[i = 1, i <= numx, i++, lines = Append[lines, Line[{{xlist[[i]], topy}, {xlist[[i]], boty}}]]]; (*Write numbers: I want to be able to write a number with one decimal place, including padding with ".0" when it's an integer.*) WriteNum[num_] := Block[{rounded}, rounded = N[Floor[num, 0.1]]; If[FractionalPart[rounded] == 0, ToString[rounded] <> "0", ToString[rounded]]]; (*Randomly choose decay times: To get an expontial-decay-distributed random number, we pick a number uniformly between 0 and 1. Take its negative log to get the time that it blows up, which is between 0 and infinity. But divide by log 2 so that when the time = 1, there's 50% chance of decaying. *) BlowTime = Table[-Log[RandomReal[]]/Log[2], {i, 1, NumPts}]; (*Draw graphics*) GraphicsList = {}; NumFrames = 80; TimePerFrame = .05; Video = {}; For[frame = 1, frame <= NumFrames, frame++, CurrentTime = (frame - 1)*TimePerFrame; ImageGraphicsList = lines; ImageGraphicsList = Append[ImageGraphicsList, Text[WriteNum[CurrentTime], {.8, 8.5}, {-1, 0}]]; ImageGraphicsList = Append[ImageGraphicsList, Text[WriteNum[CurrentTime], {3.3, 8.5}, {-1, 0}]]; For[pt = 1, pt <= NumPts, pt++, If[CurrentTime < BlowTime[[pt]], ImageGraphicsList = Append[ImageGraphicsList, {Blue, Disk[coordslist[[pt]], radiuslist[[pt]]]}]]]; Video = Append[Video, Graphics[ImageGraphicsList, ImageSize -> 100]];]; (*Pause at start*) Video = Join[Table[Video[[1]], {i, 1, 5}], Video]; (*Export*) Export["test.gif", Video, "DisplayDurations" -> {10}, "AnimationRepititions" -> Infinity ]
ファイルの履歴
過去の版のファイルを表示するには、その版の日時をクリックしてください。
日付と時刻 | サムネイル | 寸法 | 利用者 | コメント | |
---|---|---|---|---|---|
現在の版 | 2010年3月25日 (木) 19:41 | 100 × 188 (17キロバイト) | Aiyizo (トーク | 投稿記録) | Optimized animation, converted to 16 color mode | |
2010年2月5日 (金) 06:35 | 100 × 188 (156キロバイト) | Sbyrnes321 (トーク | 投稿記録) | Changed top-bottom split to left-right split, with space between; pause at start; 400 atoms in each crowded box instead of 296. (Thanks to Bdb484 for suggestions.) | ||
2010年1月29日 (金) 00:26 | 61 × 131 (75キロバイト) | Sbyrnes321 (トーク | 投稿記録) | {{Information |Description={{en|1=Simulation of many identical atoms undergoing radioactive decay. The number at the top indicates how many half-lives have elapsed. Note that after one half-life there are not ''exactly'' one-half of the atoms remaining, o |
このファイルは上書きできません。
ファイルの使用状況
以下のページがこのファイルを使用しています:
グローバルなファイル使用状況
以下に挙げる他のウィキがこの画像を使っています:
- ast.wikipedia.org での使用状況
- ba.wikipedia.org での使用状況
- bg.wikipedia.org での使用状況
- bn.wikipedia.org での使用状況
- cs.wikipedia.org での使用状況
- cv.wikipedia.org での使用状況
- cy.wikipedia.org での使用状況
- da.wikipedia.org での使用状況
- de.wikibooks.org での使用状況
- en.wikipedia.org での使用状況
- en.wikibooks.org での使用状況
- et.wikipedia.org での使用状況
- fi.wikipedia.org での使用状況
- fr.wikipedia.org での使用状況
- ga.wikipedia.org での使用状況
- he.wikipedia.org での使用状況
- hr.wikipedia.org での使用状況
- ja.wikipedia.org での使用状況
- ko.wikipedia.org での使用状況
- lv.wikipedia.org での使用状況
- mn.wikipedia.org での使用状況
- pt.wikipedia.org での使用状況
- ru.wikipedia.org での使用状況
- simple.wikipedia.org での使用状況
- tt.wikipedia.org での使用状況
- vi.wikipedia.org での使用状況
- www.wikidata.org での使用状況