I'm trying to generate a mask based off a periodic noisy line that is wrapped into a circle.
I can generate a path for the circle around the x,y plane. However I'm stuggling on making it into a mask.
Essentially, I want everything inside the circle to have value 0 and everything outside it to have value 1.
This mask should be returned as an array of dimensions (x,y)
I really need this doing without any fancy inbuilt functions, as I will be porting this to another language.
I feel there must be some solution using loops but I cant quite get it.
Please find the code to generate the noisy circle below:
clear all ; clc; clf
radius = 50;
Pot_rad = radius + V;
xnew(i) = Pot_rad(i)*cos(x(i)*(2*pi/L));
ynew(i) = Pot_rad(i)*sin(x(i)*(2*pi/L));
TLDR; Make Array mask V2D(x,y) from noisy line V(x) wrapped into circle.
Thanks in advance :)