I have the following polar equation: r(theta) = R + a*Sin(n*theta) which makes this kind of plot (for which I have used R=1, a=0.1, and n=5):
I want to end up with a 2D Cartesian array which is 0 inside this boundary, and 1 outisde of it (red pen marks).
Does anyone know of an "elegant" and simple way to do this?
My attempts so far (and ongoing) are just trying to convert a polar meshgrid to a cartesian grid...
