Open KatieWoe opened 4 years ago
On published, I might have managed to recreate this situation, though it is hard to tell if the voltage is exactly zero. If it is, then in published it makes an odd line, but does not crash.
Thanks for the report, this should be worked on next time the sim is in active dev.
With the snap to grid, it is much easier to come up with highly symmetric charge configurations as above. In addition, it is possible to locate the equipotential tool at very symmetric places. From a pedagogical point of view, this is highly desirable to generate the configurations. However, from a computational point of view, these points are often maximum, minimum or saddle points of the electric potential.
To draw the equipotential line, the current algorithm looks for a direction perpendicular to the electric field. If the electric field is zero, then the algorithm fails.
Without the snap to grid feature, it is difficult to create locations where the E field vanishes to zero and even if you do, it is virtually impossible to set the equipotential tool at that particular location (even a tiny E field of 10^-15 would be sufficient for the algorithm).
This bug is not related to Studio as @KatieWoe pointed out. The bug is in principle present in the published version of charges and fields but because the snap to grid doesn't exist it would be extremely difficult to reproduce.
In order to enable a snap to grid feature, a more robust method method to draw equipotential needs to be implemented.
For https://github.com/phetsims/QA/issues/508. Likely not connected to Studio. Seems to be possible due to the Snap to Grid feature, which means that reproducing in published may not be possible, even if it occurs there. If you set up a situation where there are charges on the screen that perfectly cancel each other and create a 0 V area, and then try to draw an equipotential line there, the sim will crash. If you try to put sensor nodes there an arrow will appear when it shouldn't as well. Steps: