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

The plane wave looks "jittery" and lacks a "smoothness of propagation" #297

Closed
samreid opened this issue Jan 4, 2019 · 10 comments
Closed
Assignees

Comments

@samreid
Copy link
Member

samreid commented Jan 4, 2019

From #255 (comment), @ariel-phet said:

[...] the plane wave on https://phet-dev.colorado.edu/html/wave-interference/1.0.0-dev.56/phet/wave-interference_all_phet.html (tested on chrome) looks fairly jittery even before the barrier, perhaps that is a separate issue (removing the barrier does seem to make it worse).

@samreid worth investigating if you can get the waves in general (even on the first screen) being a bit less jittery, but this would not be a show stopper. Marking medium priority but could be deferred to 2.0

@ariel-phet are you referring to the leading edge of the plane wave, or generally the wave depiction in the entire wave area?

@samreid generally the wave depiction in the entire wave area. Perceptually more noticeable with the plane wave before it his the barrier.

Pixellation of the wave area is discussed in #256 and marked as deferred to 2.0+. Let's leave this issue about the particular case of the leading edge of the plane wave as depicted in #255 (comment). It sounds like this can also be deferred to 2.0+. @ariel-phet does this all sound correct to you?

@samreid hmm, this does not necessarily feel like "pixelation" to me...it just feels like a "smoothness" of propagation. I agree this is lower priority, but I am not yet ready to defer to 2.0

Summarizing the above conversation

The problem is that the plane wave looks "jittery" and lacks a "smoothness of propagation".

Regarding priority

Earlier @ariel-phet said "Marking medium priority but could be deferred to 2.0" but later this was clarified as "I agree this is lower priority, but I am not yet ready to defer to 2.0", so I'll keep this on my radar for now.

@samreid samreid self-assigned this Jan 4, 2019
@samreid
Copy link
Member Author

samreid commented Jan 4, 2019

(tested on chrome) looks fairly jittery even before the barrier, perhaps that is a separate issue (removing the barrier does seem to make it worse).

@ariel-phet is this behavior depicted in the gif @lmulhall-phet posted in #255 (comment)?

@samreid
Copy link
Member Author

samreid commented Jan 4, 2019

Also, do you think the same underlying problem is occurring for a point-source wave, but it is just easier to see for plane waves?

@samreid samreid removed their assignment Jan 4, 2019
@ariel-phet
Copy link

@samreid yes and yes. I think you can see this lack of smooth propagation in the gif, and yes, you can see it for a point source, but it is less noticeable than for a plane wave.

@samreid
Copy link
Member Author

samreid commented Jan 7, 2019

I suspect the lack of smooth propagation @ariel-phet is referring to is related to the fact that we are using a 61px by 61px lattice for the model. We selected this size lattice so that we can attain a high frame rate on slower platforms. If desired, we could investigate increasing the lattice size (though it would not be trivial since several measures are calibrated for the 61x61 size and would need to be redone). But first, let's try to understand if the lack of smooth propagation is related to this. I tested reducing the model lattice to 15x15 and it looked like this:

15x15

@ariel-phet do you think this is this the same "class" of jittery/non-smoothness we are seeing in the 61x61 case?

I tried 401x401 (Mac Chrome has enough CPU for this) and it looked like so:

401x401-loop

Also, notice the output waves on the right hand side of the screen--they are the wrong wavelength because the lattice isn't calibrated for this new size. There may be some jitters due to gif encoding or playback, and there is a hiccup when the loop restarts--looks pretty smooth on Chrome aside from what may be garbage collections every couple of seconds. On iPad air, 401x401 stabilizes at around 12fps after a minute or so.

@ariel-phet do you think the lattice size is what's limiting the smoothness? Other possibilities may be something else like garbage collections or temporal quantization in the step model. Should I supply a query parameter so you can experiment with different lattice sizes on your side? Want to discuss increasing lattice resolution now that we are dropping iPad 2? I don't know offhand how to recalibrate the model, but I don't mind spending time figuring it out and making sure it's well documented it if that's where we decide to go.

@samreid samreid assigned ariel-phet and unassigned samreid Jan 7, 2019
@ariel-phet
Copy link

@samreid a query parameter seems like a good idea for some experimentation

@ariel-phet ariel-phet assigned samreid and unassigned ariel-phet Jan 7, 2019
samreid added a commit that referenced this issue Jan 7, 2019
@samreid
Copy link
Member Author

samreid commented Jan 7, 2019

I added a query parameter latticeSize. Note it must be odd and 40 cells are subtracted off for padding around the edges.

https://phet-dev.colorado.edu/html/wave-interference/1.0.0-dev.58/phet/wave-interference_en_phet.html?latticeSize=201

@samreid
Copy link
Member Author

samreid commented Jan 10, 2019

@samreid indicated this may be caused by the blowing up of the rendering of the 60px by 60px lattice on the GPU. It may be solved by rendering in WebGL. We decided to defer to 2.0+

We could also try rendering at 60x60 and see if the artifact is gone, to understand the problem.

@samreid
Copy link
Member Author

samreid commented Mar 31, 2019

After this issue was reported, we increased the resolution of the lattice, see #315. Has that resolved or reduced the severity of the problem in this issue?

@arouinfar
Copy link
Contributor

@samreid I think #315 sufficiently addressed the jitter in the plane wave. Comparing master or 1.0 to dev.57, there is a noticeable improvement. Since @ariel-phet originally reported this issue, I'll leave it up to him for final review and closure (if he agrees).

@arouinfar arouinfar removed their assignment Apr 1, 2019
@ariel-phet
Copy link

I tried out master on both my desktop and laptop. There is a bit of a strobing effect still on my desktop, but my laptop (on chrome) looks pretty smooth. Since that is a bit hardware dependent, master is an improvement over the published version, and we seem to have no major complaints about the published version, I think we can close.

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

No branches or pull requests

3 participants