[quote]
I am enjoying a lot your nice prism simulation. It is really amazing! I wonder if it would be possible to create a simulation with a polygonal prism, for example with 4, 5 or even 6 faces. This would be nice, even if there would be some form restrictions.
[/quote]

The following simulation was created due to above request ([url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=37.msg5425#msg5425]Re: Prism: Reflection and refraction[/url])

You can drag the slider to change the number of faces. (N:from 3 to 32, it is similar to a circle when N=32, you will study [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1430]physics of rainbow[/url])

The intensity was calculated for s-wave.
The subroutine for p-wave is also available in the xml source.
Click [b]show all[/b] chekbox to show all the rays with equal intensity. (Maximum number of trace can be changed with right slider 3-20)
If the [b]drag mode [/b]is checked, you can drag the whole polygin.
otherwise, you can drag each corner to change the shape of the polygon (with restrictions).

You can dray the arrow to change it's location or direction (depends on where you drag).
It can be drag inside the polygon,too!

un-check the checkbox labeled "[b]check[/b]" if you want to created inward type polygon shape.

The following simulation assume the ray will not enter the polygon more than once.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/polygonrays_pkg/polygonrays.propertiesFull 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
Download EJS jar file(1295.3kB):double click downloaded file to run it. (66 times by 38 users) , Download EJS source (31 times by 15 users) View EJS source


The range of the X-Y coordinate system is between -100 and 100.
number of points =Please enter correct number of points
[b]The data points should be enter in clockwise direction[/b]!
X= enter , separated x coordinate
Y= enter , separated x coordinate
Laser Pointer x=,y=

You are welcomed to check out the following similar/related applets,too!
[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=415.0]Dispersion of light with prism[/url] ,
[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=414.0]Prsim optics (slow motion of light entering a prism)[/url] ,
[url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=412.0]It is fun to play with prism. (light trace and intensity due to refraction)[/url]
or [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=121.0]Lens (thick lens) and Mirror[/url]