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

support for hiding one or more harmonics #7

Closed
pixelzoom opened this issue Nov 9, 2020 · 8 comments
Closed

support for hiding one or more harmonics #7

pixelzoom opened this issue Nov 9, 2020 · 8 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Nov 9, 2020

Related to #4.

While discussing #4 (future PhET-iO design) with @arouinfar, a possible sim-specific feature came up. @arouinfar wondered if PhET-iO clients might want to hide specific harmonics to meet some learning goal -- for example, set the number of harmonics to 5, but show only the odd-numbered harmonics.

First, is this indeed something that needs to be supported?

If so, more questions:

  • Is this a PhET-iO-only feature, or does the sim need more features -- e.g. a control to show odd vs even harmonics?
  • How do we keep track of which harmonics should be shown?
  • When a harmonic is hidden, should we set its amplitude to zero, or just ignore it for the purposes of other computations? What happens if PhET-iO changes the value to non-zero? Does the value need to be restored when the harmonic is shown?
  • How does this affect the values shown by controls? For example if we're showing only odd harmonics, should the Period spinner show only T1, T2, T3, ...?
@pixelzoom
Copy link
Contributor Author

Assigning to @arouinfar @ariel-phet and @kathy-phet so they can think about this before design meeting, and provide input before the meeting if they feel like it.

@ariel-phet
Copy link

I can see setting the harmonics to a certain number (which the sim currently allows), but I cannot think of a learning goal where we would want to limit the harmonics to just even or odd.

If there has never been a feature request of this type, I would definitely not add any of these features to the sim. They seem like unnecessary complexity that is not supporting any learning goal I can articulate.

Generally you do want to be able to what kind of symmetry the function has about the axis, and the sim already supports that learning goal (being able to be a cos or sin function).

@ariel-phet ariel-phet removed their assignment Nov 10, 2020
@pixelzoom pixelzoom self-assigned this Nov 10, 2020
@pixelzoom
Copy link
Contributor Author

@arouinfar @kathy-phet please address this issue as part of the brainstorming task in #4.

@pixelzoom pixelzoom removed their assignment Nov 12, 2020
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Dec 1, 2020

It looks like @arouinfar and @kathy-phet discussed this in the 11/13/2020 meeting notes of the main design doc:

Two options:

  1. Set amplitude to zero, and disable the amplitude sliders. The corresponding measurement tool still exists in the NumberSpinner and the corresponding term in the Expanded Sum is shown with a coefficient of zero. The enabledProperty of the slider will get overwritten by the model if the number of harmonics changes such that the customized harmonic disappears and reappears. (eg. N=7, amplitude 5 disabled. N changes to 3 and then back to 8. Amplitude 5 will be re-enabled.) The customization will also get overwritten if the preset function changes (e.g. switch to Sawtooth then back to custom). If this sort of customization is desired, then the client should be hiding/disabling the preset and harmonics controls.

  2. Remove amplitude like removing Ears from mutations in Natural Selections removes Ears from all representations in the sim.

We need to discuss these with high priority. Let me know when works for you.

@pixelzoom
Copy link
Contributor Author

12/3/2020 design meeting @arouinfar @kathy-phet @ariel-phet @pixelzoom

This doesn't impede or inform progress on 1.0, and can be revisited during PhET-iO Design phase. So unassigning and deferring.

@pixelzoom
Copy link
Contributor Author

Checking in on this issue, now that the Discrete and Wave Game screens are feature complete.

This feature is highly problematic in all 3 screens.

In the Discrete screen, this feature is problematic at best. The Harmonics spinner controls which harmonics are visible. And computing the sum does not (and cannot) take visibility into account. If a harmonic is non-zero, it's going to affect the sum, regardless of whether its slider is visible. So yes, you might be able to hide harmonics via Studio or PhET-iO API. But there are so many things that could go wrong.

In the Wave Game screen, this feature would cause big problems. Slider visibility is controlled by random generation of challenges, and random selection of additional zero-amplitude sliders to make visible. If you try to hide harmonics using Studio or PhET-iO API, it's going to be chaos.

In the Continuos screen, this feature would also cause big problems. A wave packet is defined by harmonic spacing and a specific amplitude "profile" for those harmonics. If you hide any of the harmonics, you no longer have that wave packet. This screen is also unlikely to have individual harmonics in the model or view -- it's an entirely different model than the first 2 screens, as it was in the Java version -- so there will be no ability whatsoever to hide specific harmonics.

So... I highly recommend that we do not pursue this feature, and in fact make it impossible to hide harmonics or sliders by using phetioReadOnly: true were necessary.

@pixelzoom
Copy link
Contributor Author

Labeling for discussion at design meeting. I'd like to close this issue, since this feature is impossible to support.

@arouinfar
Copy link
Contributor

Let's go ahead and close this one @pixelzoom.

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

4 participants