-
Notifications
You must be signed in to change notification settings - Fork 8
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
Charges vanish if you move hand away during discharge #50
Comments
This may be fixed in the above commit, needs testing. |
@orejolaphet Can you see if this is still a problem in http://www.colorado.edu/physics/phet/dev/html/john-travoltage/0.0.0-dev.23/john-travoltage_en.html If it is still a problem, does the problem occur in Win7/Chrome? |
There is a newer version, please test http://www.colorado.edu/physics/phet/dev/html/john-travoltage/0.0.0-dev.24/john-travoltage_en.html instead. |
@samreid I tested the new version dev.24 for both firefox and chrome on windows 7, and the error is still present. Though it seems that the charges don't necessarily "vanish", albeit they disappear momentarily. After counting out the amount of charges and testing with a small amount of charges (3-4), it seems that the charges change their location instantaneously rather than move in a continuous fashion towards the hand. |
I was able to reproduce this problem, and need to look into it further. One way will be to output the distance an electron traveled in each time step and see if one is particularly large. |
It is difficult for me to reliably reproduce the problem, but I think I isolated it to the function that brings electrons back inside the body after a spark is cancelled. It was using the normal from the closest boundary segment, but since segments share vertices, it was ambiguous. I moved the line segments toward the center of the segment a little bit and haven't seen the problem in several runs since, so this may have solved the problem. I posted a new version for testing here: http://www.colorado.edu/physics/phet/dev/html/john-travoltage/0.0.0-dev.25/john-travoltage_en.html @orejolaphet can you test version dev.25 and see if the problem is still occurring? |
Unless the problem is completely gone, we may wish to move to a superior "point in polygon" algorithm such as: http://stackoverflow.com/questions/217578/point-in-polygon-aka-hit-test |
@samreid I tested the dev.25 and issue is no longer present on windows 7 with chrome, firefox, and internet explorer. Although I did notice that now some charges can move in between the body and arm across the air. I'm not sure if its from the polygon fix or if it was intentional, but I thought it was appropriate to let you know. |
Thanks for your testing, I'll close this ticket and open a new one for the flying electrons. |
@jbphet I've seen issue a few times in phetsims/qa#196 1.5.0-rc.1 |
@KatieWoe - does the problem (other than sound production) exist on the currently published version of the sim? |
@jbphet I haven't been able to reproduce it on the published version, but I've had trouble consistently in the rc, and may just be missing the visual cues somehow. |
I just tried, and I can definitely reproduce this problem on the currently published version, which is v1.3.4. This would seem to indicate that it hasn't been introduced by any of the sonification work, so I'm not going to try to address it in the 1.5 release. Assigning to @ariel-phet to determine whether to commit some resources to this. It is physically incorrect, since the charges just seem to evaporate, but one could argue that they left during the discharge and you just didn't see them go. |
@KatieWoe I am going to mark this issue deferred, and we can attempt to address it next time this simulation gets visited, but currently I don't think we have the resources to properly investigate it. Can you please make a video or mark out some clear steps to reproduce the current issue. I played with the published version, and I think I see what is being suggested as a bug, but I want to make sure everyone is one the same page for when we address this in the future. |
The version where a spark appears but no discharge sound is made is the one I've been able to reproduce consistently. It does produce the ouch sound though. I've still had trouble reproducing the version where no spark appears but sound is played, but I believe the method of producing it is the same. @jbphet if you found any different methods or have anything to add, let me know.
https://drive.google.com/file/d/1HX0SSQkKJ2JIuDJvDYx0qarbHbZfaBWR/view?usp=sharing |
Unassigning myself, since the issue has been marked as deferred, and I'm not the responsible developer. |
Unassigning myself for now based on the remarks in #50 (comment) |
With a charge built up, the charges vanish and the static shock is not displayed if you move his hand past the door knob quickly enough for charges to move towards his hand. Sound is still heard while shock is not displayed.
Troubleshoot Information:
Name: John Travoltage
URL: http://www.colorado.edu/physics/phet/dev/html/john-travoltage/0.0.0-dev.21/john-travoltage_en.html
Version: 0.0.0-dev.21
Features missing: flexbox, touch
User Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Firefox/24.0
Language: en-US
Window: 1280x707
Pixel Ratio: 1/1
The text was updated successfully, but these errors were encountered: