-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tools jump to non-existent points of interest in light scene #426
Comments
Really nice find @Nancy-Salpepi. I only see this happing with the light/concave lens combo. The markers also jump to the same x-coordinates as the horizontal ruler, but reveal a non-zero y-coordinate. I have no idea what these points of interest are meant to represent, but if you add the second light and move the lights around, the marker always touches the central ray. As weird as this looks, I really would like to punt on it until 1.2. It is critical to publish the maintenance release to fix #424 as soon as possible because it is a very visible bug that users are going to notice. |
This "jump" feature is so complicated and fragile. I hope someone finds it useful, but I'll be surprised if most people can figure out what it does without scaffolding. That said... Agreed, let's defer this to 1.2 release. |
The problem occurs with all tools. As @Nancy-Salpepi surmised, these are the optical image points, where an optical image would be formed. No optical image is formed in the Light scene, but these points are nevertheless interesting -- sometimes. When the optic is converging (convex lens) these points are were the rays converge, on the right side of the lens, and they are useful measurement points -- see screenshot below. When the optic is diverging (concave lens), the rays do not converge, and these points are NOT useful. I'll investigate ignoring these points for the Light scene when the lens is concave. |
I also realized that the positions of the light spots are not really "interesting" for the concave lens. The diameter of the spot is huge, so there's no distint "spot" on the screen. And the position doesn't aligned with the center marginal ray (see screenshot below) -- I'm not sure if that's correct or incorrect, and it's not easy to determine. So... I've also exlcuded the positions of the light spots for the concave lens. |
Another problem (?), related to convex lens. There's currently nothing that knows whether a light spot intersects the project screen. A light spot is always drawn, and it is simply clipped (via scenery) to the projection screen. So if the center of a light spot is not on the projection screen, jumping to that light spot can look like the 2 examples below -- note the position marker. The position marker is at the position of the light spot in the vertical plane of the screen. @arouinfar do you think this needs to be addressed? |
@arouinfar while you're replying.... Please review the changes that I've made so far. For concave lens in the Light scene, I've removed (1) the optical image positions and (2) the light spot positions from the jump points. |
I thought of a way to address #426 (comment). It involves several changes, but nothing particularly tricky:
this.visibleProperty = new DerivedPropery(
[ this.positionProperty, this.diameterProperty, projectionScreen.positionProperty, opticalImage.visibleProperty ],
( postion, diameter, projectionScreenPosition, opticalImageVisible ) =>
opticalImageVisible &&
position.y >= projectionScreenPosition.y - projectionScreen.height / 2 - diameter / 2 &&
position.y < = projectionScreenPosition.y + projectionScreen.height / 2 + diameter / 2, {
...
} );
* Change `visibleProperty` for each LightSpotNode to be simply be something like this in LightSpotNode.ts:
```js
visibleProperty: lightSpot1.visibleProperty
- visibleProperty: DerivedProperty.and( [ lightPropagationEnabledProperty, scene.opticalImage1.visibleProperty ], {
+ visibleProperty: DerivedProperty.and( [ lightSpot1.visibleProperty, lightPropagationEnabledProperty ], {
...
- visibleProperty: DerivedProperty.and(
[ lightPropagationEnabledProperty, scene.opticalImage2.visibleProperty, visibleProperties.secondPointVisibleProperty ], {
+ visibleProperty: DerivedProperty.and(
[ lightSpot2.visibleProperty, lightPropagationEnabledProperty, visibleProperties.secondPointVisibleProperty ], { |
…ility of LightSpotNode and therefore filter out tool jump points, #426
Well, that went smoother than expected... I did not exactly follow the plan outlined in #426 (comment). Instead of LightSpot @arouinfar ready for review in master. |
Thanks @pixelzoom. Here are the notable changes:
It's not clear if (4) is intentional or not. In general, the optical image isn't particularly interesting for the Light scene. I am fine with skipping it altogether. It seems odd to jump there only when the lens is convex and the light spot is visible on the screen. |
Re:
@arouinfar and I met on Zoom, and decided to delete the optical image positions from the Light scene jump points. Done in the above commit, and we both verified. Labeling as fixed-awaiting-deploy until the next 1.2 RC. |
Things are looking good in dev.1 |
Test device
MacBook Air (m1 chip)
Operating System
12.3.1
Browser
Chrome
Problem description
For phetsims/qa#796 and related to #395
In lens screen, with the light and the concave lens: using the 'J' key to jump to points of interest takes the rulers and position markers to non-existent points of interest. It seems like they are moving to where the virtual image and second point of virtual image would be if it was a framed object.
Steps to reproduce
Visuals
lighthorizontalruler.mp4
The text was updated successfully, but these errors were encountered: