iancze / million-points-of-light

A few orders of magnitude more than a thousand. About how many pixel intensities we need to calculate to fit spectral line datasets from ALMA.
MIT License
1 stars 1 forks source link

Line intersection #4

Open iancze opened 5 years ago

iancze commented 5 years ago

The imagined order of operations for the simple optically thick cone is

  1. for a given x', y' pixel, calculate the z' where it intersects the cone. Then calculate this in terms of disk r, z
  2. calculate the projected velocity at the intersection v_z'
  3. using the emissivity profile of the disk w/ radius and some "line profile," (as defined by #3), estimate the intensity of this pixel.

The tricky part that requires some thought is calculating where the ray intersects the cone. We'll need to consider whether we are within the cone opening angle (the most common case, as cone opening angles are expected to be small, so most randomly oriented disks will have this approach) or whether we are coming at it from the outside. Second, given a finite height of the cone (i.e., extent of the disk) we'll need to also calculate if the ray ever actually intersects the cone. So, like before, there's going to need to be some sort of branching logic for pixels, which we can probably be smart about implementing on the GPU.

We have some notes on this from the ErsatzDisk project, which are helpful. But, it would probably be most helpful to work through all of the vector math in the reference Katherine provided, https://www.geometrictools.com/Documentation/IntersectionLineCone.pdf

Another helpful reference is here: http://lousodrome.net/blog/light/2017/01/03/intersection-of-a-ray-and-a-cone/