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

implementation-notes.md issues #264

Closed
pixelzoom opened this issue Dec 18, 2018 · 13 comments
Closed

implementation-notes.md issues #264

pixelzoom opened this issue Dec 18, 2018 · 13 comments

Comments

@pixelzoom
Copy link
Contributor

Related to code review #259, where @samreid said:

I recommend to start with the documentation:
wave-interference/doc/implementation-notes.md
wave-interference/doc/model.md

There are some formatting problems, and I have a couple of specific questions.

@pixelzoom pixelzoom self-assigned this Dec 18, 2018
pixelzoom added a commit that referenced this issue Dec 18, 2018
pixelzoom added a commit that referenced this issue Dec 18, 2018
pixelzoom added a commit that referenced this issue Dec 18, 2018
pixelzoom added a commit that referenced this issue Dec 18, 2018
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Dec 18, 2018

I fixed quite a bit of formatting in the above commits. Remaining issues for @samreid to address:

  • The equations that begins f(x,y,t+1) is malformed, probably just missing a closing paren on the right side of the equation.
  • As a courtesy to the reader, I've typically linked class names to their source files. E.g. WaveInterferenceQueryParameters. Up to you whether to do this.
  • In "the observed Wavelength and Oscillation Time", why are "Wavelength" and "Oscillation Time" in caps?
  • In "you can show the IdealInterferenceOverlay" what is "IdealInterferenceOverlay"? I thought it was a class name, but not found.

@pixelzoom pixelzoom assigned samreid and unassigned pixelzoom Dec 18, 2018
@samreid samreid mentioned this issue Dec 18, 2018
@samreid
Copy link
Member

samreid commented Dec 18, 2018

The equations that begins f(x,y,t+1) is malformed, probably just missing a closing paren on the right side of the equation.

I'm not seeing the problem. The current value is:

f(x,y,t+1) = c*c(f(x+1,y,t) + f(x-1,y,t) + f(x,y-1,t) + f(x,y+1,t) - 4*f(x,y,t)) - f(x,y,t-1) + 2*f(x,y,t)

Giving each function call a "nickname", this is equivalent to:

f(x,y,t+1) = c*c(f1 + f2 + f3 + f4 - 4*f5) - f6 + 2*f7

Can you please elaborate? I'm probably missing something.

samreid added a commit that referenced this issue Dec 18, 2018
@pixelzoom
Copy link
Contributor Author

You're right, it's wellformed - I got lost in the parens.

@samreid
Copy link
Member

samreid commented Dec 18, 2018

In "the observed Wavelength and Oscillation Time", why are "Wavelength" and "Oscillation Time" in caps?

Fixed in aforementioned commit.

samreid added a commit that referenced this issue Dec 18, 2018
samreid added a commit that referenced this issue Dec 18, 2018
@samreid
Copy link
Member

samreid commented Dec 18, 2018

In "you can show the IdealInterferenceOverlay" what is "IdealInterferenceOverlay"? I thought it was a class name, but not found.

I fixed the type name, thanks!

As a courtesy to the reader, I've typically linked class names to their source files. E.g. WaveInterferenceQueryParameters. Up to you whether to do this.

Good idea! I added numerous links to source files.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Dec 18, 2018

implementation-notes.md says:

There are 3 coordinate frames:

  • view coordinates
  • lattice coordinates (integer), with damping regions
  • Scene-specific physical coordinates (such as cm or nm)

I had a difficult time locating the transforms related to these. How about some "see..." pointers for each?

@pixelzoom
Copy link
Contributor Author

... for example, I see this in BarriersNode:

      // @private - Convert from model coordinates to view coordinates
      this.modelViewTransform = ModelViewTransform2.createRectangleMapping(
        this.scene.getWaveAreaBounds(),
        viewBounds
      );

      var latticeBounds = new Bounds2( 0, 0, 1, 1 );
      var modelBounds = scene.modelToLatticeTransform.viewToModelBounds( latticeBounds );
      var tempViewBounds = this.modelViewTransform.modelToViewBounds( modelBounds );

      //REVIEW missing visibility annotation
      this.latticeToViewTransform = ModelViewTransform2.createRectangleMapping( latticeBounds, tempViewBounds );

... and I suspect that these are what is being referred to in implementation-notes.md. But why are the transforms in BarrierNode, a view component that is specific to the Slits screen?

@samreid
Copy link
Member

samreid commented Dec 19, 2018

But why are the transforms in BarrierNode, a view component that is specific to the Slits screen?

latticeToViewTransform is only needed to shape and position the barriers, hence it is defined in BarrierNode. Anything else to do for this issue other than to add "see..." pointers for the coordinate frames in implementation-notes?

@pixelzoom
Copy link
Contributor Author

Adding "see..." pointers should do it.

@pixelzoom pixelzoom removed their assignment Dec 19, 2018
@samreid
Copy link
Member

samreid commented Dec 20, 2018

On hold until #292 is resolved.

@samreid
Copy link
Member

samreid commented Jan 2, 2019

I updated the docs as part of #292, @pixelzoom can you please review and advise?

@samreid samreid assigned pixelzoom and unassigned samreid Jan 2, 2019
pixelzoom added a commit that referenced this issue Jan 2, 2019
@pixelzoom
Copy link
Contributor Author

Description of coordinate frames and transforms looks good. I made some minor changes in the above commit.

Looks like all other points have been addressed, so feel free to close this if there's nothing else to do.

@pixelzoom pixelzoom assigned samreid and unassigned pixelzoom Jan 2, 2019
@samreid
Copy link
Member

samreid commented Jan 2, 2019

Thanks for the link and formatting, closing.

@samreid samreid closed this as completed Jan 2, 2019
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