Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong refraction index for glass on top #51

Closed
carlabarato opened this issue Sep 3, 2022 · 8 comments
Closed

wrong refraction index for glass on top #51

carlabarato opened this issue Sep 3, 2022 · 8 comments

Comments

@carlabarato
Copy link

carlabarato commented Sep 3, 2022

I set a half-plane with refractive index = 2.5, and then I put on top a free-shape with refractive index = 1.5
Then, inside the free-shape, the ray refracts as refractive index = 3.75 (not as 1.5)
I checked the effective refractive index is actually the product (3.75=2.5*1.5)

see screen shot: https://screenrec.com/share/PaJxQ45G6U

I think this is wrong because if I need the right refactive angle inside the top glass, in the case above, I have to set a refractive index of 1.5/3.75=0.6 (less than 1 should not be possible)

see screen shot: https://screenrec.com/share/4frvgjD3Bx

If I combine more than 2 glasses, one in top of the other, I checked the effective refractive index is the product of the top two.

@ricktu288
Copy link
Owner

Imagine you put a glass into water. You are not overlap the glass with the water, but are changing the shape of the water. If you submerge it into the water, the shape of the water becomes "a rectangle minus the shape of the glass". Therefore, the proper way to draw in this simulator is to first draw the "water" like this:
圖片
And then put a glass in the hole of the water.

Overlapping two glass objects should be considered as an undefined behavior of the simulator (we do not really overlap objects in real life). Currently, the actual behavior is that the refractive indices multiply in the overlapping region.

@ricktu288
Copy link
Owner

I think a more intuitive overlapping behavior is that the glass created later always replace the glass created first. But implementing that would be quite difficult. I think I will just add a notice to clarify the current behavior.

@carlabarato
Copy link
Author

I get it. Maybe you can help me on this case?
I was trying to simulate this problem from my text book:
EVAU 4B julio 2009_2010_coincidentes

@carlabarato
Copy link
Author

carlabarato commented Sep 3, 2022

simulation for a)
Picture1

simulation for b)
Picture2

I made it using a half-plane. I see you are proposing a free-shape with a hole but I don't know how to do that?

Find attached json files:
a)
https://drive.google.com/file/d/13k9VBICYcUOVQ0tl1jlGPrYIzhW6ewEM

b)
https://drive.google.com/file/d/1m5zUL6EnIqZmDgFX3ICD-CGfBFw0DVkj

@ricktu288
Copy link
Owner

圖片

@carlabarato
Copy link
Author

understood, thank you!

@ricktu288
Copy link
Owner

You can now use the slider to set the (relative) refractive index to less than one to simulate the inner material being less refractive than the outer material. No need to do what I described in the previous comment anymore.

@carlabarato
Copy link
Author

I see. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants