Friday, April 24, 2020

Deugging refraction in a sphere


Here is a setup to help debugging refraction using a sphere and a particular ray.  I have do track single rays like this every time I implement refraction.   Here is the setup:

So let's put a sphere of radius 1 the with center (0,0,0).  Now all of the action is in XY so I will leave off the Zs.   First, what is A?

If it is to hit where the surface of the sphere is at 45 degrees, it has to have y component cos(45) = sqrt(2)/2 .  So the origin of the ray should be o = (-something, sqrt(2)/2).  And v = (1, 0).  B, the reflected direction should have origin (-sqrt(2)/2, sqrt(2)/2) and direction (0,1).

What about C?  It has origin  (-sqrt(2)/2, sqrt(2)/2) and direction (1+sqrt(2)/2, -sqrt(2)/2) which has a length of about 1.84776.  So C = (0.9239, -0.3827) approximately.

But what refractive index produces such a C?   We an see that two of the sides have length 1, so the two angles are the same, and we can see that sin(theta) = (sqrt(2)/2) / 1.8776 = 0.38268.  So the refractive index must be the ratio of that ans sin(45).  So refractive_index = 1.8478.

So what is D?  By symmetry it must leave at 45 degrees so D = (1, -1) / sqrt(2).

And finally E reflects across the X axis and = (-0.9239, -0.3827) approximately







1 comment:

Do One Thing said...

Bold souls, divine spirits—this combo was made for you! Apna Showroom offers a sacred-meets-stylish set with a Gangajal Kalash, Feng Shui tortoise, aura-charging crystal, protectiveApna Showroom Cotton Baby Socks (Multicolored, 18-24 Months Cotton socks for kids baby girls boys socks 1-2 year 12-18 months baby socks
Apna Showroom Baby Boys and Girl's Cotton Panties Bloomer Combo Multicolour, 6-12 Months for 1 Years 12 Pieces Attractive
Apna Showroom Socks for Baby Boy and Girls, 6 to 12months(Multicolour) - Pack of 6 Pair Designer - Fancy - Attractive
Apna Showroom Baby's Cotton Panties/Bloomers/Underwear 12 Pieces (3-4 Years)
I will do local SEO and google my business profile ranking king
Shaligram Shivling, and fierce fishnet stockings. Ideal for women who express through tradition and trends. Light up your pooja space, radiate good vibes, and turn heads while doing it. It’s the ultimate statement of balance—within and without. Get yours today and feel the divine power flow!