I'm currently working with some algorithmes that required sampling a sphere using various mapping distributions. I'm using a Hammersley sequence to do so, which gives me 2 values in the [0, 1] range, and then I use those values to convert to a spherical coordinate, and finally convert to a cartesian coordinate. My source is this page : http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
Now what I'm having trouble with is the mapping from the hammersley values to spherical. In the linked page, there are 2 mappings : uniform and cosinus. I perfectly understand the math behind the uniform mapping (e.g. I can find the equation to go from hammersley to cartesian on a piece of paper) but I'm totally lost when I look at the cosine weighted mapping.
I can't understand the signification of the square root, and where does it come from. And I can't find any explanation on the web has to how to obtain this equation. I kind of understand the principle of the cosine weighted mapping, but I can't take a piece of paper and write the equations to go from hammersley to the final cartesian coordinate using this mapping.
Is there anyone here that knows where does this square root comes from and cares explaning it to me ?
Thanks in advance for any help !