Open Kevinktv opened 1 month ago
The spherical coordinate mapping transforms the domain [0, π] × [0, 2π], and when computing the UV coordinates, this domain can easily be scaled to [0, 1] × [0, 1]. I'm not sure where the expression "std::log(std::tan((phi + (M_PI/2))/2));" comes from. Please refer to this link: https://en.wikipedia.org/wiki/Spherical_coordinate_system#:~:text=Conversely%2C%20the%20Cartesian%20coordinates%20may%20be%20retrieved%20from%20the%20spherical%20coordinates%20(radius%20r%2C%20inclination%20%CE%B8%2C%20azimuth%20%CF%86)%2C%20where%20r%20%E2%88%88%20%5B0%2C%20%E2%88%9E)%2C%20%CE%B8%20%E2%88%88%20%5B0%2C%20%CF%80%5D%2C%20%CF%86%20%E2%88%88%20%5B0%2C%202%CF%80)%2C%20by
Hello, I was referring to this: https://www.math.brown.edu/tbanchof/balt/ma106/Mercator.html which was linked in https://github.com/dilevin/computer-graphics-meshes/issues/46.
I thought we were supposed to use the Mercator projection so I was trying to make it work.
Is using just spherical coordinates okay?
Thanks!
Is using just spherical coordinates okay?
Yes.
Hello!
How exactly do I normalize the mercator projections?
merc_u is easy but merc_v ranges from -inf to inf. The UV takes in values between 0 and 1 if I'm not wrong. (My phi is between -pi/2 to pi/2 if it matters)
Thanks!