I didn't quite understand why choosing a length along our spiral, then choosing based on the width at that point on the spiral where to locate our point would not give uniformly random points on the spiral...would it be a similar reasoning to the circle where the thicker parts on the spiral would have less dense randomly generated points while the thinner parts of the spiral would have more dense randomly generated points?

If we did want to generate random points along the spiral, would we have to use some equation for the thickness of the spiral versus its length or its area to change our random variables like we did with the circle?

adilets

How would you "warp" random variables if you have a shape that can't be nicely represented in a mathematical equation? Are there some numerical methods you can use?

merc

@jzhanson yeah, I think in class prof mentioned that because the range of thickness at certain points would be wider than others, the density of like the thinner parts would be higher, but I'm not sure. Would it help if we could weight the random generation instead of creating a totally accurate equation?

HelloWorld

I believe you can actually use any parameterization of the 2D region as long as you warp the random variables correctly. If you wanted, you could use the first random variable, A to determine the X coord and the second variable, B for the Y coord in the spiral. Then you would need a function f(x) that determines the area of the spiral to the left of x (divided by the total area). Apply f^-1(A) to determine the X coord. Then make a function g_x(y) that returns the "length along" that vertical slice of the region (divided by the total length of the region). compute g_x^-1(y) to get the Y coord.

I didn't quite understand why choosing a length along our spiral, then choosing based on the width at that point on the spiral where to locate our point would not give uniformly random points on the spiral...would it be a similar reasoning to the circle where the thicker parts on the spiral would have less dense randomly generated points while the thinner parts of the spiral would have more dense randomly generated points?

If we did want to generate random points along the spiral, would we have to use some equation for the thickness of the spiral versus its length or its area to change our random variables like we did with the circle?

How would you "warp" random variables if you have a shape that can't be nicely represented in a mathematical equation? Are there some numerical methods you can use?

@jzhanson yeah, I think in class prof mentioned that because the range of thickness at certain points would be wider than others, the density of like the thinner parts would be higher, but I'm not sure. Would it help if we could weight the random generation instead of creating a totally accurate equation?

I believe you can actually use any parameterization of the 2D region as long as you warp the random variables correctly. If you wanted, you could use the first random variable, A to determine the X coord and the second variable, B for the Y coord in the spiral. Then you would need a function f(x) that determines the area of the spiral to the left of x (divided by the total area). Apply f^-1(A) to determine the X coord. Then make a function g_x(y) that returns the "length along" that vertical slice of the region (divided by the total length of the region). compute g_x^-1(y) to get the Y coord.