{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# OSLO and Mirrors\n", "\n", "**Scott Prahl**\n", "\n", "**Nov 2019, Version 4**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Overview\n", "\n", "This is an OSLO tutorial about ray tracing with mirrors. It is *really* basic, but it does assume some familiarity with OSLO. If you are just starting out with OSLO then you probably want to start with [Single-lens Ray-Trace Tutorial](../simple/index.html)\n", "\n", "* This tutorial is one from a list of [other tutorials](https://omlc.org/classroom/oslotut/index.html) that are available.\n", "\n", "* The [FAQ](https://omlc.org/classroom/oslotut/faq.html) might also be of help." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## New ideas:\n", "\n", "* Mirrors are created by setting the `GLASS` to `REFL` or `REFL_HATCH`\n", "\n", "* After the mirror, light travels to the left so `THICKNESS` is a negative number\n", "\n", "* The signs for the radius of curvature are the same independent of the direction of travel\n", "\n", "* If the light is reflected back through the same optical elements, these surfaces must be repeated\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Execute this cell first\n", "%matplotlib inline\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "\n", "def efl_thick_mirror(n, R1, R2, d):\n", " \"\"\"\n", " Calculates effective focal length of a lens that has the R2 surface mirror coated.\n", " \n", " Args:\n", " n - index of refraction of the lens\n", " R1 - radius of curvature of first surface of lens [mm]\n", " R2 - radius of curvature of second (mirror coated) surface [mm]\n", " d - thickness of the lens [mm]\n", " \n", " Returns:\n", " EFL - effective focal length (mm)\n", " \"\"\"\n", " return -n * R1**2 * R2 /2 / (d - d *n + n *R1) / (d - d* n + n *(R1 - R2) + R2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Simple First Surface Concave Mirror\n", "\n", "Let's model a mirror with a radius of curvature of 300mm. The paraxial approximation says that the focal length $f$ should be $R/2$" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The paraxial focal length of the mirror is -150.0 mm\n" ] } ], "source": [ "R=-300 #mm, negative because center of curvature is to the left of the surface\n", "f = R/2\n", "print(\"The paraxial focal length of the mirror is %.1f mm\" % f)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To simulate this in OSLO, we will place the object infinitely far away from the mirror. We will make the object 10mm high and the entering beam radius also 10mm. The mirror is 3 inches in diameter of 75mm.\n", "\n", "We can construct the system in OSLO with just three surfaces: OBJ, AST, IMS. The object, the aperture stop (which of course is the mirror) and the image surface. Everything is in air so it is super simple.\n", "\n", "\n", "\n", "First, notice that in the glass column, we have selected `REFL_HATCH` to cause the rays to be reflected at this surface. (Either `REFL` or `REFL_HATCH` will reflect the light, it is just that the latter option indicates the opaque side of the mirror with hatching.) \n", "\n", "Second, we get the expected effective focal length of -150mm in the upper right hand corner.\n", "\n", "All this produces the rather disappointing ray trace \n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Showing the focus\n", "\n", "To improve this drawing, force OSLO to autofocus by clicking the `THICKNESS -> Autofocus - paraxial focus` button in the `IMS` column. Now we see\n", "\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Showing the entering beam\n", "\n", "Since I would like the rays to start farther to the left (at say 160mm from the mirror), one way is to create a new surface that has a specific aperture but does nothing else. \n", "\n", "Insert a new row. In the `APERTURE RADIUS` column of the new row select `APERTURE STOP (A)`. Next, in the `SPECIAL` column of this new row, select `SURFACE CONTROL -> GENERAL` to open a dialog box. Then in the `Surface appearance in lens drawings` select `Drawn` like shown below.\n", "\n", "\n", "\n", "Then the Surface Data Table should look like \n", "\n", "\n", "\n", "and the Autodraw window will look like\n", "\n", "\n", "\n", "This OSLO lens file can be downloaded as [concave-mirror.len](concave-mirror.len)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Concave mirror covered with glass\n", "\n", "Let's assume that we have the same mirror, but now it is covered with 2mm of BK7 glass. What changes?\n", "\n", "Well, now we have two more surfaces. The first is the air-glass surface for light entering the glass mirror and the second is for the glass-air surface for light leaving the mirror. So, we need to add rows to the lens data spreadsheet before and after the mirror surface.\n", "\n", "* The first air-glass surface is straightforward. The radius of curvature is -300mm, the thickness of the glass is 2mm, the aperture is the same as the mirror, and the glass is BK7. \n", "\n", "* The reflecting surface now must be changed so that its `THICKNESS` will place the next surface at the correct location. *After the reflection, light travels to the left and distances are now negative. Therefore the thickness to the next surface is -2mm.* (Since the reflected rays are assumed to propagate in the same medium as before, the rays will still be in the BK7 glass.)\n", "\n", "* The glass-air surface has the same radius of curvature and the same aperture radius as previous two surfaces. Leave the thickness as 0.\n", "\n", "* Finally, force OSLO to autofocus by clicking the `THICKNESS -> Autofocus - paraxial focus` button in the IMS column again.\n", "\n", "At this point the Surface Data Table should look like\n", "\n", "\n", "\n", "And the ray trace looks like\n", "\n", "\n", "\n", "We see that the glass has modified the effective focal length from -150mm to -149.1mm." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally we can calculate the expected EFL using the paraxial approximation" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The paraxial focal length of the mirror is 149.1 mm\n" ] } ], "source": [ "n = 1.5168 #BK7 refractive index for the He line 587.6nm\n", "R1= -300\n", "R2= R1\n", "d = 2\n", "f =efl_thick_mirror(n,R1,R2,d)\n", "print(\"The paraxial focal length of the mirror is %.1f mm\" % f)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Next steps\n", "\n", "The \n", "next tutorial will explore deeper mirror issues.\n", "\n", "The final OSLO lens file for this mirror can also downloaded.\n", "\n", "This document is also available as a Jupyter notebook as\n", "mirror.ipynb. \n", "\n", "