How to set a specific distance between new point and previous calculated points?
Show older comments
Hello, I try to generate a set of points using the fermat spiral equations teta(i)=2*pi*(phi^-2)*i; r(i)=a*i^b These points represent heliostats and I would like to avoid overlapping or collision so my question is i would like to ensure a certain euclidien distance between new point (xi,yi) and previous calculated points. Looking for your reply.
2 Comments
Torsten
on 27 Apr 2018
Distance along the spiral or euclidean distance ?
zouhir zeroual
on 27 Apr 2018
Accepted Answer
More Answers (1)
ritika malik
on 27 Nov 2019
r = zeros(25,1);
c= 20;
theta = zeros(25,1);
for i = 1:25
r(i) = c*sqrt(i);
theta(i) = i*137.508;
end
theta = deg2rad(theta);
[M,N]= size(f);
x = r.*cos(theta);
y = r.*sin(theta);
b = zeros(M,N);
for i = 1:25
b(round(M/2+x(i)) , round(N/2+y(i))) = 1;
end
figure();imagesc(abs(b));colormap('gray')
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!