NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
September 21, 2018, 08:15:50 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Give me a standpoint and I will move the earth. ...Archimedes (287-212BC)
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: Light reflected from arbitrary number of mirrors  (Read 16897 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
on: June 30, 2008, 08:50:50 pm »

-*-

Embed a running copy of this simulation

Embed a running copy link(show simulation in a popuped window)
Full screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
  • Please feel free to post your ideas about how to use the simulation for better teaching and learning.
  • Post questions to be asked to help students to think, to explore.
  • Upload worksheets as attached files to share with more users.
Let's work together. We can help more users understand physics conceptually and enjoy the fun of learning physics!


You can use mouse drag and drop to create mirrors (maximum number=36).
The first mouse click will be the starting point for the mirror, drag your mouse and drop it at the place you want.
You can place mirror at any different locations.
(You can drag both end points to change the mirrors later.)

And you can change number of rays (uniform distribution in 360 degree).
I also add an option for light to be bounded at the boundary.
I will leave the rest of work to you! Enjoy it.

Question you might asked: How do I know the light hit the mirror and need to be reflected in the simulation.

The mirror is a segment which is part of a line. Because I know both end points. So the equation for the line is known. for example: equation for mirror from (x1,y1) to (x2,y2) is y-y1= (y2-y1)/(x2-x1) * (x-x1)
Define function f(x,y)= y-y1 - (y2-y1)/(x2-x1) * (x-x1)
if the light is located at (xl,yl), then f(xl,yl) is not equal to zero when light is not reach mirror.
And the value will be either positive or negative, which depend on light is on which side of the mirror.
We can check f(xl,yl) in the simulation, light pass through mirror if the value change sign.
So we can find out the contact point and find out the reflected path.

More calculations are required to calculated the contact point and reflected path. Is there any one want to know how to do the calculation?


* mirrorsets_2_20090116182550.gif (10.82 KB, 580x533 - viewed 447 times.)
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: February 09, 2009, 02:23:54 pm »

Some one sent me email asked me how to calculate reflected ray?

Please refer to the attached image.
Assume we know the reflect point O, and the incoming vector a (AO) and the vector b (OB).
If only normal vector of b is known, i.e. know the direction but did not know the length.
Length |b| can be calculated with inner product between a and unit vector of b'.
 For example: a=(ax,ay), b'=(bx',by'). Then, the length of OB = (ax*bx'+ay*by')/sqrt(bx'*bx'+by'*by');
So you can calculate vector b=(bx,by)=(bx'*OB, by'*OB);
Vector AB=AO+OB=a+b
The out going ray OC=OA+AC =-AO+2*AB=2*(a+b)-a=a+2*b

Bold face represents vector.

 


* lightreflect.jpg (9.23 KB, 406x332 - viewed 423 times.)
Logged
curlygrl200
Newbie
*
Offline Offline

Posts: 5

«
Embed this message
Reply #2 on: October 13, 2010, 11:02:50 am » posted from:Great Neck,New York,United States

Hi Mr. Hwang,

I'm Arabelle, I posted a message for a code on another simulation. I would like the code for this simulation too. I want to experiment how arranging mirrors in specific shapes can create infinite images. I guess the type of Applet I would like to make is a combination of the two I am asking you for the code.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #3 on: October 13, 2010, 12:29:15 pm » posted from:Taipei,T'ai-pei,Taiwan

The above simulation was created with EJS. You can download EJS source (just click download link below the simulation).
It is an XML format.

Logged
Pages: [1]   Go Up
  Print  
Give me a standpoint and I will move the earth. ...Archimedes (287-212BC)
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Intensity variation for reflected/refracted light
Optics
Fu-Kwun Hwang 0 19455 Last post June 07, 2005, 03:50:15 pm
by Fu-Kwun Hwang
Intensity of reflected light and index of refraction
Optics
Fu-Kwun Hwang 0 34136 Last post June 08, 2005, 09:55:19 am
by Fu-Kwun Hwang
Intensity variation for reflected/refracted light
optics
ahmedelshfie 0 3815 Last post May 23, 2010, 10:39:37 pm
by ahmedelshfie
Intensity of reflected light and index of refraction
optics
ahmedelshfie 0 3827 Last post June 08, 2010, 01:04:26 am
by ahmedelshfie
Two mirrors at angle with light incident
Request for physics Simulations
samara330 1 1178 Last post February 12, 2018, 01:55:31 pm
by Graciani
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.061 seconds with 22 queries.since 2011/06/15