سؤال

I need to generate random shapes that are similar to the pattern of the white stripes in the image i am uploading.... enter image description here

Any ideas or algorithms on how to do this ?? The software I am going to use is matlab

هل كانت مفيدة؟

المحلول

Well I decided to use the spiral suggested in the previous comments...

t = linspace(0,(rand()*4 +1)*pi,100);
k = rand()/2;
laminatedx = t.*cos(t) + k*rand(size(t));
laminatedy = t.*sin(t) + k*rand(size(t));
h = plot(laminatedx,laminatedy);
set(h,'linewidth',30);
set(h,'LineStyle','-.');
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top