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

WavelengthSlider: support UV and IR wavelengths #211

Open
pixelzoom opened this issue Nov 18, 2015 · 11 comments
Open

WavelengthSlider: support UV and IR wavelengths #211

pixelzoom opened this issue Nov 18, 2015 · 11 comments

Comments

@pixelzoom
Copy link
Contributor

In models-of-the-hydrogen-atom (MOTHA), we need a wavelength slider that supports UV wavelengths. It looks like this in the Java version:

screenshot_76

PhET has scenery-phet.WavelengthSlider, but it only supports visible wavelengths. It looks like this:

screenshot_77

Is a need for IR wavelengths anticipated in any upcoming or future sims?

We could either enhance WavelengthSlider (preferred) or create something new.

@pixelzoom pixelzoom self-assigned this Nov 18, 2015
@pixelzoom
Copy link
Contributor Author

MOTHA also needs to decorate the spectrum (slider track) with vertical lines that denote the absorption wavelengths. Here's what that looks like in the Java version. Note the vertical black lines at the left end of the spectrum.

screenshot_78

But before implementing that, we should verify that these lines are effective. Imo, they are difficult to see and use, so they might be revisited as part of the sim refresh (see phetsims/models-of-the-hydrogen-atom#1).

@pixelzoom
Copy link
Contributor Author

In Java, piccolophet.WavelengthControl handled "visible wavelengths, plus optional UV and IR wavelengths". In MOTHA, it was extended in GunWavelengthControl. So I would investigate adding features to scenery-phet.WavelengthSlider.

@pixelzoom
Copy link
Contributor Author

This issue is very low priority, since I'm unlikely to get to MOTHA development until Fall 2016. Unassigning until then.

@pixelzoom pixelzoom removed their assignment Jan 12, 2016
@pixelzoom pixelzoom self-assigned this Aug 22, 2016
@pixelzoom
Copy link
Contributor Author

Well, it's MOTHA time, so I guess I'll need to do this. Self assigning.

@pixelzoom pixelzoom changed the title need a wavelength slider that supports non-visible wavelengths WavelengthSlider: support UV and IR wavelengths Aug 25, 2016
@pixelzoom
Copy link
Contributor Author

Consider renaming WavelengthSlider, since it's not just a slider, it also has tweaker (arrow) buttons. Convention suggests that this should be named WavelengthControl, which was in fact the name of the Java implementation.

If renamed, it would also make sense to move this to the "Components" screen in scenery-phet demo.

@pixelzoom
Copy link
Contributor Author

In order to add support for UV and IR wavelengths to WavelengthSlider, we'll need to add this support to SpectrumNode, which renders the slider track. See Java implementation at edu.colorado.phet.common.phetcommon.view.util.SpectrumImageFactory.

@pixelzoom
Copy link
Contributor Author

Deferred until work resumes on MOTHA, probably sometime in early 2017.

@pixelzoom
Copy link
Contributor Author

MOTHA keeps getting pushed out into the future, currently looking like late Summer or Fall 2017 before work resumes on it. So I'm going to unassign this issue until then.

@pixelzoom pixelzoom removed their assignment Dec 8, 2016
@samreid
Copy link
Member

samreid commented Apr 13, 2018

Please see related work on WavelengthSlider in #371 (comment), particularly this comment:

But hopefully none of these changes make it difficult to add UV and IR to WavelengthSlider, as is required for #211 (needed by MOTHA).

I introduced a new type SpectrumSlider which takes a min value, max value and color mapping function. I expect it would make it easier to add UV and IR. For instance, in the visible range, you would return VisibleColor.wavelengthToColor(), and in the UV range you could return Color.gray. You could even use that function to add the vertical lines, if they are still desired. The trick will be adding the text in the track--we may wish to add getter for the track node to make that easy, or a add/removeTrackChild method on SpectrumSlider.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jun 24, 2022

Un-deferring and self assigning. This is needed for MOTHA, which has resume development.

Labeling this as a proposed "epic" for Q3 2022.

@pixelzoom
Copy link
Contributor Author

MOTHA is on hold indefinitely, so this issue is no longer a priority. Unassigning until MOTHA is scheduled.

@pixelzoom pixelzoom removed their assignment Oct 17, 2022
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

2 participants