Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
double ugh
  • Loading branch information
bsumlin committed Sep 20, 2017
1 parent 800014b commit ba833dd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ This produces the following image:

We can do better, though! Suppose we wanted to, for educational purposes, demonstrate how the "Mie ripples" develop as we increase size parameter. This script uses 405 nm light incident upon a particle of m=1.536+0.05i. Its diameter increases from 10 to 10000 nm and the result is plotted and a figure file is saved. The final few lines gather the figures into an mp4 video. Note that the Mie mathematics need only one line per loop, and the rest is generating images and movies.

First, install ffmpeg exe using conda:
.. code-block::
$ conda install ffmpeg -c conda-forge
.. code-block:: python
import PyMieScatt as ps
Expand Down Expand Up @@ -156,11 +162,10 @@ We can do better, though! Suppose we wanted to, for educational purposes, demons
writer.append_data(image)
This produces a nice video.
This produces a nice video, which I'll show you just as soon as ReadTheDocs can embed mp4 files. For now, you can find it `here <https://github.com/bsumlin/PyMieScatt/blob/master/docs/images/mie_ripples.mp4>`_.


.. raw:: html

<video controls>
<source src="mie_ripples.mp4" type="video/mp4">
</video>
<iframe src="https://github.com/bsumlin/PyMieScatt/blob/master/docs/images/mie_ripples.mp4?raw=true">
</iframe>

0 comments on commit ba833dd

Please sign in to comment.