Closed veillette closed 1 year ago
I may have been too opinionated about the labels, as a see a handful of diagrams where the center is labeled 2F. In any case, the main point is that there should only be one such point for a mirror.
The 2F vs C debate came up previously in https://github.com/phetsims/geometric-optics/issues/274. I raised similar concerns to what @veillette has expressed here. But in https://github.com/phetsims/geometric-optics/issues/274#issuecomment-998216778, we concluded:
- Would we call it C or 2F for the mirror? Curvature is likely Hollywooded, so might not want to call it C if it’s not C. Better to have a consistent language across screens. Teacher can handle the C vs. 2F discussion.
@veillette said:
... In any case, the main point is that there should only be one such point for a mirror.
Understood. But please clarify: presumably you mean that a mirror should have only one F and 2F point, not 2 of each? And are the relevant points always to the left of the mirror in this sim?
If so... To do this correctly is going to be a major change. We'll need to address not only the points, but the point labels.
In GOSceneNode.ts:
rightFocalPointNode
and right2FPointNode
, only if optic instanceof Lens
.rightFocalPointNode
and right2FPointNode
exist (e.g., add jump points for keyboard navigation)In GOLabelsNodes.ts:
rightFocalPointLabel
and right2FPointLabel
, only if optic instanceof Lens
.... and probably some other things that I haven't thought of.
This will change the PhET-iO API, so should be done before publishing.
I asked
... And are the relevant points always to the left of the mirror in this sim?
Based on https://github.com/phetsims/geometric-optics/issues/457#issuecomment-1515081333, it sounds like f and 2F are on the left of a concave mirror, and on the right of a convex mirror. So what I described in https://github.com/phetsims/geometric-optics/issues/458#issuecomment-1515214876 will be more complicated, and will need to consider not only the type of optic (lens vs mirror) but OpticSurfaceType (convex, concave, flat).
Some of the heavy lifting in the model is done for you by the sign of the focal length. Currently the sign of the focal length is stripped away to set them to the points to the left or right.
// left 2F point
this.left2FProperty = new DerivedProperty(
[ this.positionProperty, this.twiceFocalLengthProperty ],
( position, twiceFocalLength ) => position.plusXY( -Math.abs( twiceFocalLength ), 0 ), {
units: 'cm',
tandem: options.tandem.createTandem( 'left2FProperty' ),
phetioValueType: Vector2.Vector2IO,
phetioDocumentation: 'point 2F, at a distance 2f to the left of the optic'
} );
// right 2F point
this.right2FProperty = new DerivedProperty(
[ this.positionProperty, this.twiceFocalLengthProperty ],
( position, twiceFocalLength ) => position.plusXY( Math.abs( twiceFocalLength ), 0 ), {
units: 'cm',
tandem: options.tandem.createTandem( 'right2FProperty' ),
phetioValueType: Vector2.Vector2IO,
phetioDocumentation: 'point 2F, at a distance 2f to the right of the optic'
} );
These absolute operations would need to be taken out and we should rename the leftFocalPoint
to something more appropriate, say firstPrincipalFocalPoint
. However you are correct that we will need to know if the optics is a mirror or a lens,
On the view side, we have
const left2FPointNode = new TwoFPointNode( scene.optic.left2FProperty, modelViewTransform, {
visibleProperty: visibleProperties.twoFPointsVisibleProperty,
tandem: twoFPointTandem.createTandem( 'left2FPointNode' )
} );
const right2FPointNode = new TwoFPointNode( scene.optic.right2FProperty, modelViewTransform, {
visibleProperty: visibleProperties.twoFPointsVisibleProperty,
tandem: twoFPointTandem.createTandem( 'right2FPointNode' )
} );
However, they should be renamed and one of them should have a visibility that is conditional to the fact this is a mirror screen.
... However, they should be renamed and one of them should have a visibility that is conditional to the fact this is a mirror screen.
Agreed about the renaming. But I don't think visibility (and PhET-iO instrumentation) should be conditional. Instantiation should be conditional.
You are correct about the
... However, they should be renamed and one of them should have a visibility that is conditional to the fact this is a mirror screen.
Agreed about the renaming. But I don't think visibility (and PhET-iO instrumentation) should be conditional. Instantiation should be conditional.
That's correct since we never mix Lens and Mirror on a given screen.
It seems like this should be addressed for the 1.3 release. That is the first PhET-iO release, and addressing this will change the API. Deferring to a future release would require migration rules.
@arouinfar do you agree? If so, we should meet and summarize exactly what we're going to change.
@arouinfar and I discussed. We're going to make no changes here, sticking with the original consensus that's summarized in https://github.com/phetsims/geometric-optics/issues/458#issuecomment-1515192602. @arouinfar will add any additional notes, then close this issue.
We will address the issue of extraneous focal points for mirrors in #457. @pixelzoom and I discussed the possibility of using 'C' instead of '2F' for mirrors, but it's complex. Both screens have a '2F Points' checkbox which is enabled from the Preferences dialog, which also references '2F'.
I will add clarification about this choice of terminology to the Teacher Tips. PhET-iO clients can edit the StringProperty
so 'C' appears instead, but with the caveat that they should only do this if the Lens screen is hidden. I'll document in examples.md.
Related to #457:
For mirrors there is no concept ot 2F points. Rather one talks about a center, usually labeled by a 'C'. The center is literally the center of the arc of the mirror. There is only one center for a given mirror. For our convex mirror, it will appear to the right of the mirror.
For our concave mirror, it will appear to the left.
Note that the center 'C' location is currently occupied by a 2F point. In other words, the simulation is still useful as is, but we should relabeled one of the 2F point and we should make the second one invisible.