phetsims / bending-light

"Bending Light" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/bending-light
GNU General Public License v3.0
8 stars 8 forks source link

User request: Add 1 more triangular prism #369

Closed oliver-phet closed 7 years ago

oliver-phet commented 7 years ago

Hello,

In the old (Java) version of "Bending light" one could add up to 6 prisms and create this: kobffgknlcgcodac

gakadbhhionogpic which is a very good example to how increasing the surface area of crystals increases the amount of light scattered from them. In the new (HTML5) version, there is a limit of 5 triangular prisms, and the above does not work (if the hexagon is incomplete, a lot of new internal reflections arise).

Is it possible to add 1 more triangular prisms to the HTML5 simulation?

Thank you,

ariel-phet commented 7 years ago

@samreid I believe we limited the number of items due to performance concerns. My guess is it would be trivial to up the number of items on the prisms screen to 6 each. Is that correct?

ariel-phet commented 7 years ago

@samreid no action necessary right now I should clarify, just asking what this change would take.

samreid commented 7 years ago

Currently the code limits the number of prisms to 5 each for all of the types. It would be trivial to increase it to 6 max for all types. Slightly more complex to cap it at 5 for some types and 6 for others. I haven't tested performance lately, so not sure how much a concern that is.

ariel-phet commented 7 years ago

@samreid please go ahead and increase to 6 for all types and reissue the the rc testing task when you get a chance, not a huge rush.

ariel-phet commented 7 years ago

Note - I believe 5 was a somewhat arbitrary choice so things did not get too crazy, but since a user has a specific reason for 6 it seems totally reasonable to increase the number

samreid commented 7 years ago

Sounds good, I will probably get to this Thursday or later.

samreid commented 7 years ago

Fixed above, I'll create an RC.

samreid commented 7 years ago

RC.3 is published here: http://www.colorado.edu/physics/phet/dev/html/bending-light/1.1.4-rc.3/bending-light_en.html

I'll create a test task.

samreid commented 7 years ago

Ready for testing in https://github.com/phetsims/tasks/issues/786

phet-steele commented 7 years ago

Assigning to @oliver-phet. This inclusion does not seem to have any adverse effects.

oliver-phet commented 7 years ago

This has been published. Closing.