Showing posts with label refractive index. Show all posts
Showing posts with label refractive index. Show all posts

Saturday, June 7, 2025

TI-84 Plus CE: Birefringence

TI-84 Plus CE: Birefringence


Introduction


Essentially, birefringence is the double refraction of light in material, drive by the differences in the refractive indices of both materials. Mathematically, birefringence between two materials is defined as:


B = | n_e – n_o |


n_o: refractive index of light where the ordinary ray originates

n_e: refractive index of light where the extraordinary ray originates


If n_e > n_o, we have positive birefringence, and the wave polarizes quickly.

If n_e < n_o, we have negative birefringence, and the wave polarizes slowly.


The relative retardation (delay or angle in radians) with one ray respected to another is calculated by the equation:


R = T * B


T = the thickness of the material, typically in meters



The program features 10 common materials, with the 11th allowing the user to enter their own refractive index, particularly useful for crystals.



TI-84 Plus CE Program: BIREF


Full

{1,1.000293,1.000132,1.333,1.31,1.46,1.49,1.52,1.69,2.417}→L₁

“ORDEXT”→Str0


For(I,1,2)

ClrHome

Output(9,1,"BIREFRINGENCE")

Output(3,1,"1. VACUUM")

Output(4,1,"2. AIR")

Output(5,1,"3. HYDROGEN")

Output(6,1,"4. WATER")

Output(7,1,"5. ICE")

Output(3,12,"6. QUARTZ")

Output(4,12,"7. PLEXIGLASS")

Output(5,12,"8. WINDOW GLASS")

Output(6,12,"9. FLINT GLASS")

Output(7,12,"10. DIAMOND")

Output(8,12,”11. YOUR OWN”)

Input sub(Str0,3(I-1)+1,3)+” RAY? ”,J


If J=11:Then:

Input “ENTER REF INDEX: “,X

If I=1:Then:X→O

Else:X→E:End

Else

If I=1:Then:L₁(J)→O

Else:L₁(J)→E:End

End

End


Input "THICKNESS? ",T

abs(E-O)→B

T*B→G


ClrHome

If E≥O:Then:Disp "POSITIVE"

Else:Disp "NEGATIVE":End

Disp "BIREFRINGENCE:",B,"DELAY:",G


Note: The Full mode sets the TI-84 to full screen mode.



Examples


Example 1: Diamond (ordinary ray) to Air (extraordinary ray), 0.5 m thick

Negative Birefringence: 1.416707

Delay: 0.7083535 (radians)



Example 2: Air (ordinary ray) to Ice (extraordinary ray), 3.6 m deep


Positive Birefringence: 0.309707

Delay: 1.1149452 (radians)



Sources


Nikon with contributing authors Douglas B. Murphy, Kenneth R. Spring, Thomas J. Fellers, and Michael W. Davidson. “Principles of Birefringence: Introduction to Optical Birefringence” Nikon. MicroscopyU: The Source for Microscopy Education. 2024/2025. Retrieved November 16, 2024. https://www.microscopyu.com/techniques/polarized-light/principles-of-birefringence#:~:text=Birefringence%20is%20formally%20defined%20as,dependent%20differences%20in%20refractive%20index.


“Refractive index.” Wikipedia https://en.wikipedia.org/wiki/Refractive_index At the time of retrieval, it was edited November 17, 2024. Retrieved December 1, 2024.



Eddie


All original content copyright, © 2011-2025. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Sunday, April 16, 2023

Python and Casio fx-4000P: Transmission and Deviation Angles - Prism

Python and Casio fx-4000P:   Transmission and Deviation Angles - Prism




Celebrating 12 Years in the Blogopshere!   Thank you to my readers, subscribers, and everyone who has stopped by during the years!  




Introduction


Today's program calculates the transmission and deviation angles passing through a prism.   The refractive index of the prism is determined by the material it is made of.   





Formulas Used for the transmission and deviation angles, respectively:


θt = arcsin( α * √(n^2 - sin^2 θi) - sin θi * cos α)


δ = θi + θt - α


The Python program calculates for prisms made of acrylic, glass, fluorite, and plastic.  



Python Script:  prism.py


Program Notes:


1.  The angle mode in Python is always radian angle mode. Conversions between degrees and radians are necessary on this code.


2.  This code was programmed with a Casio fx-9750GIII in the Python app.   I could have used the degrees and radians functions, however, they were not present in the calculator's catalog.  


3.  I used a While loop and initialized the choice variable k as -1 to prevent the user from choosing anything from picking outside the range 0-3.  This simulates the Menu command in Casio graphing calculator programming.


4. The refractive indices are average and approximate.  


5. To make everything fit on the screen, the new line escape character, \n, is used.  


Code:


from math import *

# radians mode

print("Enter in Degrees")

i=float(input("Incidence Angle? \n"))

a=float(input("Top Angle? \n"))


# convert to radians

ir=i*pi/180

ar=a*pi/180


# choice of material

# refractive index

ls=[1.4905,1.52,1.433,1.58]

k=-1

while k<0 or k>3:

  print("Select Material")

  print("0. Acrylic")

  print("1. Glass")

  print("2. Fluorite")

  print("3. Plastic")

  k=int(input())

n=ls[k]


# calculation

t=asin(sin(ar)*sqrt(n**2-sin(ir)**2)-sin(ir)*cos(ar))

d=ir+t-ar


# convert to degrees

td=t*180/pi

dd=d*180/pi


# results

print("Results are in Degrees")

print("Transmission Angle: \n"+str(td))

print("Deviation: \n"+str(dd))



Casio fx-4000P Program:  Prism


Notes:


1.  Variables used:

I = incidence angle

A = top angle of the prism

N = refractive index, must be entered manually


2.  Outputs:

Transmission Angle (T)

Deviation Angle (D)


Code:

(59 steps)


Deg :

"I": ?→ I:

"A": ?→A:

"N": ?→N:

sin⁻¹ ( sin A × √( N² - (sin I)²) - sin I × cos A) → T ◢

I + T - A → D



Examples


I = incidence angle

A = top angle of the prism

T = Transmission Angle

D = Deviation Angle



1.  I = 50°, A = 60°,  Glass (1.52)


T ≈  48.932708276°

D ≈ 38.932708276°


2.  I = 10°, A = 45°, Plastic (1.58)


T ≈ 80.99437617°

D ≈ 45.99437617°


3.  I = 33°, A = 25°,  Acrylic (1.4905)


T ≈ 5.32137979°

I ≈ 13.32137979°


4.  I = 17°, A = 40°, Fluorite (1.433)


T ≈ 42.66957975°

I ≈ 19.66957975°



Source


Woan, Graham.  The Cambridge Handbook of Physics Formulas  Cambridge University Press.  Cambridge, New York.  2003 edition



Here is to many more years, 


Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


RPN HP 12C: Fibonacci and Lucas Sequences

  RPN HP 12C: Fibonacci and Lucas Sequences Golden Ratio, Formulas, and Sequences Let φ be the Golden Ratio: φ = (1 + √5) ÷ 2...