求在一个圆内均匀分布n个点(如n=360)的坐标,用matlab怎么实现?

求在一个圆内均匀分布n个点(如n=360)的坐标,用matlab怎么实现?,第1张

面积分布,就是把圆分成很多块面积相等的区域
n=360;
R=5;
t=0:002:2pi;
plot(Rcos(t),Rsin(t),'r');
axis square
hold on
r=Rsqrt(rand(1,n));
seta=2pirand(1,n);
x=rcos(seta);
y=rsin(seta);
plot(x,y,'')
如果是等角度等半径。会感觉中心会比上面那个图很密。
n=360;
R=5;
t=0:002:2pi;
plot(Rcos(t),Rsin(t),'r');
axis square
hold on
r=Rrand(1,n);
seta=2pirand(1,n);
x=rcos(seta);
y=rsin(seta);
plot(x,y,'')

1求在一个圆内均匀分布n个点的坐标,用matlab怎么实现
等面积分布,就是把圆分成很多块面积相等的区域
n=360;
R=5;
t=0:002:2pi;
plot(Rcos(t),Rsin(t),'r');
axis square
hold on
r=Rsqrt(rand(1,n));
seta=2pirand(1,n);
x=rcos(seta);
y=rsin(seta);
plot(x,y,'')


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13388997.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-26
下一篇 2023-07-26

发表评论

登录后才能评论

评论列表(0条)

保存