File:Caustics.gif
Caustics.gif (576 × 356 pixels, file size: 13.69 MB, MIME type: image/gif, looped, 210 frames, 21 s)
Captions
Summary[edit]
DescriptionCaustics.gif |
English: When light is refracted from a non-flat surface, it simply happens that there are regions where more rays are passing through, creating very bright spots (or lines) called "caustics". |
Date | |
Source | https://twitter.com/j_bertolotti/status/1229743952594640897 |
Author | Jacopo Bertolotti |
Permission (Reusing this file) |
https://twitter.com/j_bertolotti/status/1030470604418428929 |
Mathematica 12.0 code[edit]
n = 2; (*Refractive index of the bottom medium*) z = 5; (*The bottom of the plot is at zero. This set how high you want to plot*) h[x_] := 1 + 0.03 Cos[x] + 0.1 Sin[2.1 x] + 0.11 Sin[2.8 x]; (*profile of the refractive medium*) dh[x_] := Evaluate[D[h[x], x]]; (*Derivative of the profile (that locally determines how Snell law works*) R[x_] := x + (z - h[x]) dh[x] (n Sqrt[1 - (n^2 - 1) dh[x]^2] - 1)/(1 - (n^2 - 1) dh[x]^2); (*Where the ray ends up*) Show[ Plot[h[x], {x, 0, 2 \[Pi]}, Background -> Black, PlotStyle -> {Gray}, Filling -> Axis, PlotRange -> {0, z}, Axes -> False, FillingStyle -> Gray], Graphics[{ Yellow, Thick, Opacity[0.1], Table[{Line[{{y, 0}, {y, h[y]}}], Line[{{y, h[y]}, If[Im[R[y]] == 0, {R[y], z}, {y, h[y]}]}]}, {y, 0, 2 \[Pi], 0.02}] }] , ImageSize -> Large ] (*Plot of the caustics*) (*Generate the animation*) listy = RandomSample@Table[y, {y, 0, 2 \[Pi], 0.015}]; (*Randomize the order the rays appear*) dim = Dimensions[listy][[1]]; p1 = Table[ Show[ Plot[h[x], {x, 0, 2 \[Pi]}, Background -> Black, PlotStyle -> {Gray}, Filling -> Axis, PlotRange -> {0, z}, Axes -> False, FillingStyle -> Gray], Graphics[{ Yellow, Thick, Opacity[0.15], Table[{Line[{{y, 0}, {y, h[y]}}], Line[{{y, h[y]}, If[Im[R[y]] == 0, {R[y], z}, {y, h[y]}]}]}, {y, listy[[1 ;; k]]}] }] , ImageSize -> Large ] , {k, 1, dim, 2}]; (*Plot every two frames, otherwise the animation is too heavy*) ListAnimate[p1]
Licensing[edit]
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 09:33, 19 February 2020 | 576 × 356 (13.69 MB) | Berto (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on fa.wikipedia.org
- Usage on ro.wikipedia.org
- Usage on vi.wikipedia.org
- Usage on zh.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
GIF file comment | Created with the Wolfram Language : www.wolfram.com |
---|