Closed pixelzoom closed 7 months ago
The short reasoning is to say that in most classic physics conceptual questions involving a bar magnet, flux, and faraday's law we are generally moving the magnet towards or away from the cool of wire, along the axis of the coil (or sometimes equivalently moving the coil towards or away from the magnet, but I think giving an option to constrain the bar magnet would be sufficient. The relative motion is the important point).
Basically, if the magnet is allowed to move with off-axis motion, it confounds the issue of flux, so having an option to move the magnet locked to the coil axis allows for some conceptual simplification, and better matches the types of problems seen in an introductory electricity and magnetism course.
I think such an option should be an option, not a default, as I do think the current setup of the sim allows for nice exploration and discovery, but an option for on axis motion would likely be found useful.
In Slack#DM, @terracoda mentioned that faradays-law has keyboard shortcuts for moving the bar magnet horizontally. See keyboard help below. The magnet must first be grabbed, using the grad-release interaction (space). Pressing 1, 2, or 3 then makes the magnet automatically slide horizontally. Pressing 1, 2, or 3 again changes direction. I have not figured out how to stop the auto-slide -- I tried space, return, tabbing away -- and this seems like a bug or oversight.
This feature might be useful in FEL. We'd need to work out the bugs, and make it work with collision detection. Would we use if for the bar magnet only, or also the electromagnet and pickup coils? It also involves the grab-release interaction, which we had not planned to use for this sim.
Pressing Space, Enter, and Tab all consistently release the magnet using Firefox and MacOs Sonoma 14.1.2. Upon release the magnet stops and its outline changes to a solid pink outline.
The intended Alt Input behaviour is:
Pressing Space, Enter, and Tab all consistently release the magnet using Firefox and MacOs Sonoma 14.1.2. Upon release the magnet stops and its outline changes to a solid pink outline.
@terracoda what version of the sim are you testing? I do see that this is true in the published version 1.4.17. But it does not behave that way in main. Can you please confirm? And if you confirm that it is indeed broken in main, please create an issue in faradays-law.
I'm testing faradays-law main branch, with macOS 14.2.1 + Chrome 120.
I was indeed testing the published version. I'll open an issue in Faraday's Law that main has introduced issues for Alt Input.
faradays-law was fixed over in https://github.com/phetsims/faradays-law/issues/226#issuecomment-1867954773. Accordiong to @jessegreenberg:
The implementation is in MagnetAutoSlideKeyboardListener.js. It is specific to faradays-law right now but it could be generalized if the same behavior is needed for another sim.
@arouinfar and I discussed this feature today.
Prototype design, which I'll implement: Add a "lock" toggle button, like the one in geometric optics, that constrains the magnet and pickup coil to horizontal dragging. When the lock is toggled "on", automatically move the magnet and pickup coil to default positions where the magnet and pickup coil are vertically aligned.
Try adding the 1/2/3 hotkey feature (ala faradays-law MagnetAutoSlideKeyboardListener
) but without the Grab-Release interaction. Since there are no plans to add description to this sim yet, and all other draggable objects (compass, meter,...) will not be using Grab-Release, it seems inconsistent and potentially confusing to use Grab-Release for only magnets and coils. This is a "nice to have" feature. If it turns into a lot of work, bring back to the team for reconsideration.
1/4/24 design meeting with @arouinfar @ariel-phet @kathy-phet @pixelzoom:
The consensus was to proceed as described in https://github.com/phetsims/faradays-electromagnetic-lab/issues/25#issuecomment-1875815968.
https://github.com/phetsims/faradays-electromagnetic-lab/issues/10 (drag bonds) is a prerequisite to this issue. Horizontal dragging will be accomplished via dragBounds with height=0.
The 1/2/3 hotkey has been move to https://github.com/phetsims/faradays-electromagnetic-lab/issues/54, since it is independent of the feature that this issue is tracking.
In the above commits, I implemented everything expect the constrained dragging for this feature. I gave @arouinfar a preview on Zoom, and I'm on the right track. So I'll continue with finishing this off.
This feature has been implemented. You can test-drive it in the Pickup Coil and Transformer screens, in phettest or in 1.0.0-dev.9. See the "Lock to Axis" checkbox in the lower-right control panel.
@arouinfar @kathy-phet @ariel-phet please test-drive before 1/25 design meeting.
1/25/2024 design meeting: @arouinfar @kathy-phet @ariel-phet @pixelzoom
Consensus was that everyone is happy with this feature. We may want to move the positions of the magnet and pickup coil up a bit, to feel more centered in the screen. We'll probably defer that until we calibrate the light bulb to display longer rays. (Tracking in https://github.com/phetsims/faradays-electromagnetic-lab/issues/64).
@pixelzoom, I do not see the 1-2-3 working in that dev 9 version. Is it supposed to work?
The behaviour @ariel-phet described in https://github.com/phetsims/faradays-electromagnetic-lab/issues/25#issuecomment-1842993199 seemed to match the auto-glide behavior in FL.
@terracoda The 1/2/3 hotkeys feature was broken out into issue https://github.com/phetsims/faradays-electromagnetic-lab/issues/54 about 2 weeks ago, because it is independent of whether dragging is locked -- the magnet (and coil) are movable regardless of whether they are locked to the pickup coil axis.
In https://github.com/phetsims/faradays-electromagnetic-lab/issues/54#issuecomment-1911171929, the design team's consensus was:
The 1/2/3 hotkeys would be relatively expensive to implement, and would not add significantly to what we can accomplish with KeyboardDragListener dragVelocity and shiftDragVelocity. @arouinfar and I will work on tuning those values.
If you'd like to discuss further, let's continue in https://github.com/phetsims/faradays-electromagnetic-lab/issues/54. Thanks!
Re-closing this issue.
12/4/2023 design meeeting: @arouinfar @ariel-phet @kathy-phet @brent-phet @pixelzoom
@ariel-phet suggested a new feature. Mode to lock movement of bar magnet horizontally, or snap to coil axis. We should discuss this further as part of design. This would be doable within the limitations of the MathCAD model.
@ariel-phet feel free to add additional thoughts here -- learning goals that would supported, UI ideas, etc.