phetsims / color-vision

"Color Vision" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/color-vision
GNU General Public License v3.0
1 stars 7 forks source link

Tandem instrumentation for photons #91

Open samreid opened 9 years ago

samreid commented 9 years ago

In #90 we are instrumenting the sim using tandem. A large portion (the only portion?) of the remaining work is to instrument the photons for playback. This may be bandwidth intensive and a surrogate may substitute well, but we decided we wanted to try using serialized photons.

This feature will be fraught with tradeoffs and design choices, so I created a separate issue for it. Let the commits begin.

samreid commented 9 years ago

I instrumented photons for playback above. Some concerns to discuss:

  1. I had to export window.phet.colorVision.SingleBulbPhoton for deserialization. See https://github.com/phetsims/together/issues/108 for an alternate solution
  2. Mirror performance is somewhat performance demanding.
  3. It looks like lots of photons are appearing in the state even with the light off. Is it some form of pooling? It is odd to get photon locations in the save state even when the light hasn't been turned on.

Let's discuss.

jbphet commented 8 years ago

The initial round of instrumentation work was done back in Spring/Summer 2015 on this simulation, and the resulting instrumented simulation served the demonstration purposes well. I don't think this issue needs to remain open since the sim will likely be revisited as we move through the next phase of the phet-io project. Assigning to @samreid to see if he concurs and, if so, this can be closed.

samreid commented 8 years ago

The current implementation is indeed saving the location of the photons, but it doesn't provide any customizability or interoperability for individual photons. The ideal solution would use TGroup and instrument individual photons, if it is not performance prohibited. This should be investigated when someone has time (I do not currently have time).

samreid commented 4 years ago

From https://github.com/phetsims/phet-io/issues/1620

I did notice that in Color Vision, the photon view never seems to clear, but that will presumably be done in another issue and addressed when Color Vision is ported to use PhetioGroup.

Luisav1 commented 4 months ago

Deferring this issue since we're not going to republish with PhET-iO for the upcoming publication.