Skip to content

Commit

Permalink
change default ROC to 180, default FL to 90, adjust initial positions…
Browse files Browse the repository at this point in the history
… of framed object and arrows, #227
  • Loading branch information
pixelzoom committed Feb 22, 2022
1 parent 40d0714 commit eaceec3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions js/lens/model/Lens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class Lens extends Optic {
}, providedOptions ) as OpticOptions; //TODO don't use 'as'

assert && assert( !options.opticShapes.includes( 'flat' ), 'flat lens is not supported' );
assert && assert( options.directFocalLengthModelOptions.focalLengthMagnitudeRange.defaultValue ===
options.indirectFocalLengthModelOptions.radiusOfCurvatureMagnitudeRange.defaultValue );
assert && assert( options.indirectFocalLengthModelOptions.indexOfRefractionRange.contains( DIRECT_INDEX_OF_REFRACTION ) );

super( options );
Expand Down
7 changes: 5 additions & 2 deletions js/mirror/model/Mirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,20 @@ class Mirror extends Optic {
diameterRange: GOConstants.DIAMETER_RANGE, // in cm
sign: -1,
directFocalLengthModelOptions: {
focalLengthMagnitudeRange: new RangeWithValue( 75, 125, 100 ), // in cm
focalLengthMagnitudeRange: new RangeWithValue( 75, 125, 90 ), // in cm
indexOfRefractionRange: new RangeWithValue( INDEX_OF_REFRACTION, INDEX_OF_REFRACTION, INDEX_OF_REFRACTION ), // fixed and unitless
tandem: focalLengthModelsTandem.createTandem( 'directFocalLengthModel' )
},
indirectFocalLengthModelOptions: {
radiusOfCurvatureMagnitudeRange: new RangeWithValue( 150, 300, 200 ), // in cm
radiusOfCurvatureMagnitudeRange: new RangeWithValue( 150, 300, 180 ), // in cm
indexOfRefractionRange: new RangeWithValue( INDEX_OF_REFRACTION, INDEX_OF_REFRACTION, INDEX_OF_REFRACTION ), // fixed and unitless
tandem: focalLengthModelsTandem.createTandem( 'indirectFocalLengthModel' )
}
}, providedOptions ) as OpticOptions; //TODO don't use 'as'

assert && assert( 2 * options.directFocalLengthModelOptions.focalLengthMagnitudeRange.defaultValue ===
options.indirectFocalLengthModelOptions.radiusOfCurvatureMagnitudeRange.defaultValue );

super( options );

this.shapesProperty = new DerivedProperty(
Expand Down
6 changes: 3 additions & 3 deletions js/mirror/model/MirrorModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class MirrorModel extends GOModel {
OpticalObjectChoice.ARROW
],

arrowObject1Position: new Vector2( -200, 60 ),
arrowObject2Position: new Vector2( -150, 30 ),
arrowObject1Position: new Vector2( -130, 60 ),
arrowObject2Position: new Vector2( -145, 30 ),

//TODO give FramedObject a bisector line so this isn't empirical
// Initial position of the framed object, empirically set so that it appears to sit on the optical axis
framedObjectPosition: new Vector2( -170, 72.5 )
framedObjectPosition: new Vector2( -130, 72.5 )

}, providedOptions );

Expand Down

0 comments on commit eaceec3

Please sign in to comment.