10-12-2021, 10:02 AM
(This post was last modified: 10-12-2021, 10:05 AM by josemendez.)
(09-12-2021, 07:22 AM)littleaa Wrote: I got confused on this part too. And I also think it should be the square of \widetilde{r}. So which one is correct? Please let me know of the progress.
Quoting the paper:
Quote:By dividing the coordinates by r, the in this way normalized x- and y- coordinates need to be inside the easier to handle unit circle.
That's why r2 is divided by mapping.w (which is the radius, r). This equation:
Quote:square(q) = 1/r * (x*x + y*y);
in code:
Code:
float r2 = dot(mapping.xy, mapping.xy);
float iq = 1 - r2/mapping.w;
r2 is the sum of the squares of x and y. then, we multiply it by 1/r: r2/mapping.w
So iq = 1- square(q)., used in the denominator of equation (11) - the one that calculates lambda. In the IntersectEllipsoid function you can see it being used:
Code:
float lambda = 1/(1 + mapping.z * sqrt(iq));
Hope this clarifies it. let me know if you need further help!
cheers,