MechSimulator

Refraction of Light Simulator — Snell’s Law, Critical Angle & Prisms

A virtual optical bench — drag the laser to aim it through a prism, glass block or apparent-depth tank, with a live sin i / sin r graph

Mode
Bench Graph Other
Apparatus
Surrounding n = 1.000
Prism n = 1.620
Angle of incidence 50.0°
Apex angle A 60 °
Wavelength λ₀ 650 nm
Angle of incidence i50.0°
Angle of refraction r25.0°
Refractive index ₁n₂1.517
Critical angle Cnone
Speed in medium 21.977×10⁸ m/s
Wavelength in medium 2402 nm
Deviation D
Reflected / refracted
📏 Readings Table record several angles, then read the refractive index off the gradient
No.i / °r / °sin isin rsin i / sin r
ƒ Live Equations values substituted from the current setup
User Guide — Refraction of Light Simulator
1 Overview

This is a virtual optical bench. A red laser shines a single narrow beam onto a sheet of drawing paper, a protractor is laid under the point of incidence, and a transparent block sits on top of it — the same setup used in every school refraction practical. Pick the laser up and point it: it is a handle, not a decoration.

The laser is monochromatic, at 650 nm, like the diode in every school optics kit. Turning on White light swaps it for a ray box, because there is no such thing as a white laser — and a single wavelength cannot show dispersion. Beside the bench, a graph builds itself from the readings you take.

Nothing is pre-computed or looked up. At every boundary the simulator solves Snell’s law for the direction and the Fresnel equations for how the beam divides between the reflected and refracted rays, so partial reflection, total internal reflection, dispersion and the exact shape of the intensity curve all emerge from the physics rather than being drawn in by hand. Refractive indices vary with wavelength through a two-term Cauchy fit derived from each material’s quoted index and Abbe number.

The laser works like a real one: it is off until you switch it on. Set the apparatus up, aim the laser, then press ▶ Fire ray and the light travels through the apparatus and stays there. Change anything — the angle, a medium, the apparatus, the wavelength — and the lamp goes out, because the ray on screen no longer belongs to the setup in front of you. Fire it again for the next run.

Five modes are available: Simulate, Calculate, Explore, Practice and Quiz.

2 Choosing the Apparatus

Four arrangements sit on the Apparatus bar below the bench. Each one is the standard piece of equipment for the measurement it supports:

  • Prism — the tool opens here, because dispersion is the most striking thing refraction does. Two refracting faces inclined at the apex angle A, so the two bends add instead of cancelling and the ray is deviated. White light is on by default, so the beam enters as one and leaves as a spectrum, which falls on a projection screen — Newton’s card. The spread is small in reality, about 4° for a 60° flint prism, so the band is also repeated enlarged in the corner with the true angular spread quoted beside it. Lower the angle of incidence far enough and the light stops emerging altogether: r₁ + r₂ = A means a small r₁ forces a large r₂, and once r₂ passes the critical angle the beam is totally internally reflected inside the glass. The simulator names that limit for you.
  • Semicircular block — the block for measuring a refractive index and a critical angle. Its curved face is centred on the middle of the flat face, so a ray aimed at that centre crosses the curve along a radius and is not bent there at all. Every refraction happens at one known point, directly over the protractor centre.
  • Glass block — a rectangular, parallel-sided block. Two refractions, equal and opposite, so the emergent ray comes out parallel to the incident ray but shifted sideways. The lateral displacement is drawn and measured on screen.
  • Apparent depth — a tank of liquid with a coin on the bottom, showing why a pool always looks shallower than it is.

With the semicircular block a second control appears: Direction. Into the block puts the flat face towards the lamp and measures air → glass. Out of the block turns it round so the light enters the curved face along a radius, travels through the glass and refracts on its way out of the flat face — the arrangement that shows the critical angle and total internal reflection.

3 Changing the Media

Both media are yours to choose, from vacuum and air through water, ethanol and glycerol to fused quartz, Perspex, crown glass, flint glass, sapphire and diamond — each with its accepted refractive index at the sodium D line. Pick Custom medium in either selector and a box appears for any index from 1.00 to 3.00.

Each list is filtered to what the apparatus can physically hold, so the choices always make sense on a real bench:

  • The block and the prism offer solids only. A prism is ground from optical glass; there is no such thing as an ethanol prism sitting on a sheet of paper.
  • The tank in the apparent-depth arrangement offers liquids only, and the medium above it is a gas.
  • The surrounding medium around a block may be a gas or a liquid, because immersing a block in water is a real and instructive setup — the same glass bends light far less in water than in air, which is why swimming pools blur unaided vision.

Switching apparatus keeps your material if it is still legal and quietly falls back to a sensible default if it is not — move from the tank to the prism and water becomes flint glass, because a prism of water is not a thing. If you genuinely want an unusual index, Custom medium is offered in every list and is never filtered out.

Changing either medium clears the readings table, because the readings no longer belong on the same graph.

4 Aiming the Lamp & Firing the Ray

Working the bench is a two-step job, exactly as it is in a real laboratory: aim first, then switch on.

While the lamp is off, a dashed line shows where the ray box is pointing and the angle of incidence is marked on the protractor, so you can set the angle precisely before any light is involved. The refraction readouts show , because there is nothing yet to observe.

The angle of incidence is set three ways, and they stay in step:

  • Take hold of the laser. The cursor turns to a hand over the barrel and a cyan outline appears around it. Drag and it swings about the point of incidence — and it does not jump when you grab it, because the offset between where you took hold and where it was pointing is preserved, exactly like picking up a real pointer.
  • Drag anywhere else on the paper to aim it straight at the pointer, which is quicker for a large change.
  • The slider, for a smooth sweep.
  • The number box, for an exact value. Type 41.3 and you get 41.3, not 41.

In the apparent-depth arrangement the same control becomes the viewing angle — how obliquely you are looking into the tank — and its range stops at 50°.

Two buttons on the bench dock control the light, and they do different jobs:

  • ▶ Fire ray — switches the laser on for a single run. The beam travels out from the aperture, through the apparatus, and the whole path stays on screen so you can study it, measure the angles and record the reading. The button turns green and reads Ray on. Press it again to switch off by hand.
  • ↻ Sweep — leaves the lamp on and runs the angle of incidence continuously through its whole range and back. This is the fastest way to watch the refracted ray swing round, dim, and vanish at the critical angle. Press it again to stop; the ray stays lit wherever you paused it.

Any change to the setup switches the lamp off. Moving the angle, swapping a medium, changing the apparatus or the wavelength all end the run, because the path drawn on the paper would no longer be the one that setup produces. The bench is then ready for the next firing. Display options — the protractor, labels, wavefronts, the choice of graph — do not switch it off; they only change how the same run is drawn.

Every angle in this simulator, and in optics generally, is measured from the normal — never from the surface. Turn the Normal layer on and keep it on.

5 The Display Panel

The Display panel at the top-right of the bench starts collapsed so it never covers the apparatus. Click the eye to open it.

  • Protractor — the 180° scale laid on the paper, graduated every 5° and numbered from the normal.
  • Normal — the perpendicular construction line, with the right-angle mark.
  • Angle marks — the arcs and values for i, r and, on a prism, the apex angle A and the deviation D.
  • Labels — ray names, media and refractive indices.
  • Partial reflection — the weak reflected ray that is always present. Its brightness is the real Fresnel reflectance, so it starts at about 4% and climbs steeply near grazing incidence. Refraction never happens on its own.
  • Wavefronts — animated crests drawn across the beam, spaced by λ/n. Watching them crowd together as they cross the boundary is the clearest single explanation of why the ray has to bend.
  • Optical pins — the four sighting pins used to trace a ray when no ray box is available.
  • Screen — the projection card the emergent beam falls on in the prism arrangement. It is placed square-on to the beam and pulled in until it fits on the bench, exactly as you would position a real screen.
  • Graph — chooses which of the three plots fills the right-hand panel.
  • Grid and Sound.
6 The Graph Panel

Three plots share the panel beside the bench:

  • sin i / sin r — the graph the school experiment actually produces. Snell’s law rearranges to sin i = n sin r, which has the form y = mx, so the points must lie on a straight line through the origin whose gradient is the refractive index. Your recorded readings appear as gold points, the accepted relationship as a dashed line, and once you have two usable readings a green best-fit line is drawn.
  • Relationship curve — the continuous underlying relation, which changes with the apparatus: r against i for the blocks (with the critical angle marked), deviation D against i₁ for the prism (with the minimum clearly visible), and apparent depth against viewing angle for the tank.
  • Intensity split — the percentage of the beam reflected and refracted at every angle, from the Fresnel equations. The Brewster angle, where the reflected light is completely plane polarised, and the critical angle, where reflection takes everything, are both marked.
7 Taking Readings & Measuring n

Record reading stays greyed out until the lamp is on — you cannot measure an angle of refraction for a ray that is not there. Fire the ray, then press it to log the current pair of angles. The Readings Table below the bench lists i, r, sin i, sin r and their ratio for every reading, and any angle beyond the critical angle is logged honestly as total internal reflection with no r to record.

The table then fits a straight line through the origin by least squares, m = Σ(xy) / Σ(x²), and reports the gradient as your measured refractive index, together with the percentage by which it differs from the accepted value. The line is forced through the origin deliberately: zero incidence must give zero refraction, so a fitted intercept would be a systematic error in the protractor rather than physics.

Six or seven readings spread from about 10° to 80° give a good line. Angles below 10° are poor points because both sines are small and the percentage uncertainty in each is large.

8 The Total Internal Reflection Preset

Total internal reflection is reachable on every bench, but only if you already know which way to turn the block, which of two liquids is the denser, or that a prism stops transmitting below a certain angle rather than above it. The ⚡ Total internal reflection button beside the medium selectors sets the bench in front of you up for it and fires the laser:

  • Semicircular block — turns the block round to Out of the block so the light meets the flat face from inside crown glass, and sets the angle just past the 41.3° critical angle.
  • Prism — flint glass, 60° apex, and an angle of incidence below the emergence limit. The ray gets in but cannot get out of the second face, because r₁ + r₂ = A forces a large r₂ when r₁ is small.
  • Apparent depth — a viewing angle past water’s 48.6°, the edge of Snell’s window, where the surface stops being a window and becomes a mirror.
  • Glass block — the interesting one. Inside a parallel-sided block, total internal reflection is impossible, whatever the media: entry gives sin r₁ = (n₁/n₂) sin i, so r₁ can never exceed asin(n₁/n₂), which is exactly the critical angle of the second face. The only total internal reflection a slab can show is at the first face, so the preset immerses an ice block in glycerol — the surrounding is the denser medium and the light bounces off instead of entering.

The preset clears the readings table, because the media it chooses are not the pair you were measuring. It is disabled while an unknown sample is sealed, since it has to set the media itself.

9 Unknown Block — the Real Experiment

A refraction experiment exists to measure something you do not know. With the material sitting on a menu the exercise is circular, so Unknown block hides it.

Switching it on puts an unidentified solid block on the bench — one of seven, from ice at 1.31 to diamond at 2.42 — locks both media so the sealed sample stays valid, and blanks every readout derived from the refractive index — the index, the critical angle, the speed of light in the medium, the wavelength and the intensity split all show ?, and the accepted line disappears from the graph. What remains is exactly what an experimenter can observe: the angle of incidence, the angle of refraction and the paths of the rays.

Work as you would at the bench. Take readings at several angles, watch the best-fit gradient settle, then enter the refractive index you have measured and, if you can, name the material from the list. Your answer is graded against the true value: within 1% is the precision a careful protractor measurement delivers, within 3% is a fair set of readings, and anything larger usually means an angle was measured from the surface instead of the normal.

10 Dispersion & the Wavelength Control

The Wavelength slider sets the colour of the beam from 400 nm to 700 nm, and the ray on screen is drawn in that colour. It is not decoration: the refractive index of every material rises as the wavelength falls, so changing the colour genuinely changes the angle of refraction and the critical angle.

White light switches to the prism and sends all wavelengths in together. They travel as one beam up to the first face, then separate, because each colour has its own index. Violet is bent most and red least — which is the whole of dispersion, and the reason a prism makes a spectrum while a parallel-sided block does not.

Flint glass (Abbe number 36) disperses roughly twice as strongly as crown glass (64). Set the prism to each in turn and compare the width of the fan — the quoted angular spread changes with it.

While white light is on, the wavelength slider is locked and every quoted figure — the angle of refraction, the refractive index, the speed and the deviation — is referred to the sodium D line at 589 nm, which is the wavelength every published refractive index is measured at. White light has no single wavelength, so there is no other honest number to quote.

11 Readouts and Live Equations

Eight cards sit under the bench. i and r track the rays. Refractive index ₁n₂ is the relative index for the pair of media on the bench. Critical angle shows “none” whenever the light is entering the denser medium, because in that direction no critical angle exists. Speed and Wavelength show what actually changes when light crosses a boundary; the frequency, which does not change, is quoted in the step-by-step calculation. Reflected / refracted gives the Fresnel split. The seventh card follows the apparatus — the ratio sin i / sin r, the lateral displacement, the prism deviation or the apparent depth.

The Live Equations card under the table shows Snell’s law with your numbers substituted, in proper mathematical notation, updating as you drag. Calculations on the dock opens the full worked solution, set out step by step with units.

12 Calculate Mode

Six solvers, each showing the full working: Angle of refraction from Snell’s law, Refractive index from a measured pair of angles, Critical angle, Apparent depth, Lateral displacement through a parallel-sided block, and Prism minimum deviation, which is the spectrometer method of finding n to four decimal places.

Each solver checks its inputs and says what is wrong rather than returning a silent NaN — ask for a critical angle with the rarer medium first and it tells you why none exists.

13 Explore, Practice & Quiz

Explore mode has five categories of concept cards: Basics (what refraction is, the vocabulary, which way the ray bends, optical against mass density), Snell’s Law (the law itself, absolute and relative index, reversibility, what changes and what does not), Critical Angle & TIR (the derivation, the two conditions, fibres and prisms, mirages and Snell’s window), Apparatus (why each block is shaped as it is, lateral displacement, dispersion, minimum deviation, apparent depth) and Real World (the broken pencil, lenses, atmospheric refraction, rainbows, refractometry). Every card with a formula carries a worked example with real numbers.

Practice mode generates randomised problems across ten types: angle of refraction, refractive index from measured angles, critical angle, speed of light in a medium, apparent depth, lateral displacement, wavelength in a medium, prism deviation, and two multiple-choice types on bending direction and the conditions for total internal reflection. Answer, click Check, and Show Solution lays out the full working.

Quiz mode draws 5 multiple-choice questions from a bank of 16, with the options shuffled each round, then gives a score, a 1–5 star rating and a per-question explanation.

14 Exporting

Report on the dock, or Export Lab Report at the foot of the Readings Table, builds a printable A4 report and opens it for your browser’s Save-as-PDF (Ctrl/Cmd + P). It carries the apparatus and conditions, every reading with its sines, the fitted gradient and its deviation from the accepted value, the analysis, the sin i / sin r graph redrawn on a light background so it prints legibly, and a conclusion graded against the 1% and 3% limits. Both buttons stay greyed out until at least one reading has been recorded.

Right-clicking the bench offers Export PNG (the whole scene, watermarked), Export CSV (the full readings dataset plus the fitted index), Record reading and Reset.

15 Tips & Common Exam Traps
  • The working rhythm is aim → fire → read → record, then change the angle and repeat. If the ray vanishes, you changed something — that is deliberate, not a fault.
  • Measure from the normal, never from the surface. An angle of 30° to the glass surface is an angle of incidence of 60°. This single mistake costs more marks than any other in optics.
  • Plot sin i against sin r, not i against r. The graph of i against r is a curve and its gradient means nothing.
  • A critical angle only exists going from denser to rarer. Set the semicircular block to Into the block and the Critical angle readout says “none” — that is not a bug.
  • At i = 0 the ray is not bent, but it does slow down. Speed and direction are separate questions.
  • Frequency never changes at a boundary. Speed and wavelength both fall by the factor n. A red laser stays red underwater.
  • Optical density is not mass density. Ethanol is lighter than water yet bends light more. Compare them in the simulator.
  • A parallel-sided block never deviates a ray, only displaces it. A prism deviates it, because its faces are not parallel.
  • The apparent-depth formula assumes you look almost straight down. Raise the viewing angle in the simulator and watch the coin rise well above d/n — the standard formula is an approximation, and this shows by how much.
  • Turn on Partial reflection and note that about 4% of the light comes straight back at normal incidence. Total internal reflection is the only case where all of it does.
  • Try diamond. Its critical angle of 24.4° is why a cut stone traps light so effectively — and why cutting angles matter so much to a jeweller.

Refraction of Light: Snell’s Law, Critical Angle and Total Internal Reflection

Refraction is the change in direction of light when it crosses from one transparent medium into another. It happens for one reason only: light travels at a different speed in each medium. This simulator runs the experiment that measures it — a laser you aim by dragging it, a protractor, a glass block on a sheet of paper — and plots the graph the experiment produces. Angles are solved from Snell’s law and the split between the reflected and refracted rays from the Fresnel equations, so partial reflection, total internal reflection and dispersion all appear on their own rather than being drawn in.

What is the refractive index of common materials?

MaterialRefractive index nSpeed of light (m/s)Critical angle to air
Vacuum1.00003.00 × 10⁸
Air1.00033.00 × 10⁸
Ice1.3102.29 × 10⁸49.8°
Water1.3332.25 × 10⁸48.6°
Ethanol1.3612.20 × 10⁸47.3°
Fused quartz1.45852.06 × 10⁸43.3°
Perspex (acrylic)1.4912.01 × 10⁸42.1°
Crown glass1.5171.98 × 10⁸41.3°
Flint glass1.6201.85 × 10⁸38.1°
Sapphire1.7681.70 × 10⁸34.4°
Diamond2.4171.24 × 10⁸24.4°

Values are quoted at the sodium D line, 589.3 nm. Every one of these materials is selectable in the simulator, and choosing one immediately updates the ray paths, the critical angle and the graph.

What is Snell’s law?

Snell’s law states that for any two media the quantity n sin θ has the same value on both sides of the boundary:

n₁ sin i = n₂ sin r

Here i is the angle of incidence and r the angle of refraction, both measured from the normal — the construction line drawn perpendicular to the surface at the point of incidence. Rearranged, sin i / sin r = n₂/n₁, a constant for the pair of media called the relative refractive index. Because it is a ratio of two speeds it has no unit. The absolute refractive index of a single medium is measured from a vacuum and equals c/v, the factor by which the medium slows light down.

Which way does a ray bend, and why?

Into an optically denser medium — air into glass — light slows down and the ray bends towards the normal, so r is smaller than i. Into a rarer medium — glass into air — light speeds up and the ray bends away from the normal. The reason is visible directly if you switch on the wavefront layer: the crests are spaced λ/n apart, so they crowd together on entering the denser medium, and the only way a continuous wavefront can meet the boundary on both sides at once is for the whole front, and therefore the ray, to swing round. A ray arriving along the normal is not bent at all, because every part of its wavefront reaches the boundary at the same instant — though it still slows down.

Note that optical density is not mass density. Ethanol is far lighter than water per litre yet has the higher refractive index, 1.361 against 1.333, and bends light more.

How do you measure refractive index with a semicircular glass block?

Lay the block on a sheet of paper with its flat face along a ruled line, mark the centre of that face, and draw the normal there. Direct the laser at the centre mark, measure the angle of incidence and the angle of refraction on a protractor, and repeat for six or seven angles from about 10° to 80°. Plot sin i against sin r. Snell’s law has the form y = mx, so the points lie on a straight line through the origin and the gradient is the refractive index.

The block is semicircular for a specific reason. Its curved face is an arc centred on the middle of the flat face, so a ray aimed at that centre crosses the curved surface along a radius, at normal incidence, and is not refracted there. All the bending happens at the flat face, at one known point directly over the protractor centre. A rectangular block would refract the ray twice and give you nothing to measure at a single point. The simulator’s Readings Table performs exactly this fit, forcing the line through the origin because zero incidence must give zero refraction.

What is the critical angle and total internal reflection?

When light travels from a denser medium into a rarer one, the refracted ray bends away from the normal. As the angle of incidence grows, the refracted ray reaches 90° — grazing along the surface — before the incident ray does. The angle of incidence at which this happens is the critical angle, and putting r = 90° into Snell’s law gives it immediately:

sin C = n₂ / n₁   (with n₁ the denser medium)

Beyond the critical angle, sin r would have to exceed 1, which no angle can satisfy. No light is transmitted at all and the boundary behaves as a perfect mirror. Two conditions must hold together: the light must already be in the optically denser medium, and the angle of incidence must exceed the critical angle. Optical fibres, 45° prisms in binoculars and periscopes, endoscopes, bicycle reflectors and the brilliance of a cut diamond all depend on it. Turn the semicircular block round in the simulator, sweep the angle, and watch the refracted ray swing towards the surface, dim, and vanish exactly at C.

What are the critical angles for total internal reflection?

A critical angle exists only for a pair of media, and only in the direction from the denser to the rarer one. Quoting “the critical angle of glass” without saying what it is next to is the commonest slip in this topic — crown glass against air gives 41.3°, but the same glass against water gives 61.5°.

Light travels fromn₁inton₂Critical angle C
Water1.333Air1.00048.6°
Perspex1.491Air1.00042.1°
Crown glass1.517Air1.00041.3°
Flint glass1.620Air1.00038.1°
Sapphire1.768Air1.00034.5°
Diamond2.417Air1.00024.4°
Crown glass1.517Water1.33361.5°
Flint glass1.620Water1.33355.4°
Diamond2.417Water1.33333.5°
Fibre core1.4681Fibre cladding1.462985.2°

Diamond’s 24.4° is why a cut stone returns so much light: almost any ray that gets in strikes a facet beyond the critical angle and is thrown back out of the top. Put the same stone in water and the critical angle opens to 33.5°, which is why a wet diamond looks noticeably duller — the jeweller’s reason for keeping stones clean.

The last row is the one that carries the internet. A silica fibre core is only a whisker denser than its cladding, so the critical angle is 85.2° and light must stay within 4.8° of the axis to be guided. That tolerance is the numerical aperture, NA = √(ncore² − nclad²) = 0.124, which corresponds to an acceptance half-angle of 7.1° in the air outside — and is why single-mode fibre is so thin and so fussy to align.

Every one of these is one click away in the simulator: the ⚡ Total internal reflection button sets the bench in front of you to a configuration that shows it, then fires the laser.

Why does a ray leaving a rectangular glass block stay parallel?

The two faces of a parallel-sided block have parallel normals. The ray bends towards the normal by a certain amount on entering and away from it by exactly the same amount on leaving, so the two refractions cancel and the direction is restored. What does not cancel is the position: the emergent ray is displaced sideways by

d = t sin(i − r) / cos r

where t is the thickness of the block. A 40 mm crown-glass block at 60° incidence gives r = 34.8° and d = 20.7 mm. At normal incidence there is no bend and no displacement at all. The simulator draws the undeviated path as a dashed line and dimensions the gap between it and the emergent ray, so the displacement is measured rather than asserted.

Why does a prism split white light into a spectrum?

A prism has two refracting faces inclined at the apex angle A, so the two bends add instead of cancelling and the ray is deviated through an angle D = i₁ + i₂ − A, with the internal angles obeying r₁ + r₂ = A. Because the refractive index of glass is slightly larger for short wavelengths — a property called dispersion — violet is deviated more than red and white light spreads into a spectrum. Flint glass, with an Abbe number near 36, disperses about twice as strongly as crown glass at 64, which is why it is the traditional prism material.

As the angle of incidence is increased the deviation first falls, reaches a minimum, then rises again. At the minimum the ray passes symmetrically, r₁ = r₂ = A/2, and the refractive index follows from n = sin((A + Dmin)/2) / sin(A/2). Because the passage is symmetric, small alignment errors cancel to first order, which is why this spectrometer method is the most accurate laboratory determination of a refractive index. Switch the graph to the deviation curve and the minimum is plainly visible. In the simulator the emergent beam falls on a projection screen — Newton’s card — placed square-on to the beam, so you see the spectrum where it would actually land.

How much does a prism spread white light?

Less than most people expect. Dispersion is the small difference in refractive index between one colour and another, measured by the Abbe number Vd: the lower the Abbe number, the stronger the dispersion. The table below gives the spread between the blue and red hydrogen lines (486 nm and 656 nm) for a 60° prism set at minimum deviation.

Prism materialnDAbbe number VdDispersion nF − nCDmin (60° prism)Spread, blue to red
Fused quartz1.458567.80.006833.7°0.57°
Perspex (acrylic)1.491057.20.008636.4°0.74°
Crown glass1.517064.20.008138.7°0.71°
Flint glass1.620036.40.017048.2°1.66°
Sapphire1.768072.20.010664.3°1.30°
Diamond2.417032.20.0440none

Flint glass disperses roughly twice as strongly as crown glass of the same shape, which is why it is the traditional prism material even though crown glass is cheaper and clearer. Note the last row: a 60° diamond prism passes no light at all. Minimum deviation requires n sin(A/2) ≤ 1, and 2.417 × sin 30° = 1.21, so the ray is totally internally reflected at the second face however you turn it.

A spread of one or two degrees is why a real prism demonstration needs a screen placed well back from the prism: over 20 cm a 1.7° fan is only about 6 mm wide. The simulator draws the spectrum at its true size where it lands on the screen and repeats it enlarged in the corner with the actual angular spread quoted, rather than exaggerating the geometry to make the rainbow look impressive. Widening the beam from a single wavelength to white light, or swapping crown for flint, changes that number in front of you.

Why does a swimming pool look shallower than it is?

Rays leaving an object under water bend away from the normal at the surface, so they diverge more steeply than they really did. Traced back, they appear to come from a point nearer the surface, and the object looks raised. For near-vertical viewing the ratio of the two depths is exactly the refractive index:

n = real depth / apparent depth

A coin 80 mm down in water appears 60 mm down, raised by 20 mm. That formula, however, is a near-normal approximation, and the simulator shows exactly how it breaks down: raise the viewing angle and the coin rises further still, which is why a pool looks shallowest when you stand at its edge and look across. Push the viewing angle past 48.6° and the ray stops escaping altogether — that is the edge of Snell’s window, the bright cone through which a diver sees the entire sky.

What is partial reflection, and why does it matter?

Refraction never happens on its own. At every boundary a fraction of the incident intensity is reflected, given by the Fresnel equations, and the rest is transmitted. At normal incidence on crown glass that fraction is about 4% — small, but it is why you can see yourself faintly in a window, and why a camera lens with ten air–glass surfaces would lose a third of its light without anti-reflection coatings. The fraction rises steeply towards grazing incidence and reaches 100% at the critical angle, which is what makes total internal reflection total. There is also one special angle, the Brewster angle θB = tan⁻¹(n₂/n₁), at which the reflected light is completely plane polarised — the principle behind polarising sunglasses and photographic filters. The intensity graph in this simulator marks both.

Who uses a refraction simulator?

The bench behaves like a real one: the lamp is off until you fire it, the ray path stays on screen for as long as the setup is unchanged, and altering anything switches it off ready for the next run — so each reading belongs to one deliberate measurement rather than to a ray that silently followed the slider.

This virtual lab is built for GCSE, IGCSE, A-level, IB and AP physics students preparing for practical assessments, for vocational and technical students studying optics and fibre systems, and for teachers who need a projectable refraction experiment that can be run, reset and re-run in seconds. It lets learners measure an angle from the wrong line, plot the wrong graph, or push a ray past the critical angle and watch it disappear — all the instructive mistakes that a real optical bench makes slow and fiddly — and see the consequence immediately.

Explore Related Simulators

If you found this refraction simulator helpful, explore our Ray Optics Simulator for mirrors and lenses, Free Fall & Gravity Simulator, Simple Harmonic Motion Simulator, and Titration Simulator for more hands-on science practicals.