필터 지우기
필터 지우기

Calculate 2 opposing fibonacci spirals from every point of a circle circumfrence

조회 수: 1 (최근 30일)
phi = 0.5*(1+sqrt(5)); % golden ratio
r = phi.^(2*theta/pi); % fibonacci spiral
polarplot(-theta,r,theta,r,theta,-r,-theta,-r) % 2 opposing fibonacci spirals
How can I calculate the trajectories of opposing fibonacci spirals starting from every point of a circle's circumfrence

채택된 답변

Pseudoscientist
Pseudoscientist 2020년 8월 28일
clear all
theta = 0:pi/36:2*pi;
phi = 0.5*(1+sqrt(5));
r = phi.^(2*theta/pi);
r_1=phi.^(2*(-theta)/pi);
testi = exp(1i*theta);
x = r.*cos(theta);
y = r.*sin(theta);
angle=0:pi/36:2*pi;
for i=1:numel(angle)
rot_1{i} = [cos(angle(i)) -sin(angle(i));sin(angle(i)) cos(angle(i))] * [x-1;y+1];
rot_2{i} = [cos(angle(i)) -sin(angle(i));sin(angle(i)) cos(angle(i))] * [1-x;y+1];
end
figure(2)
hold on
for i = 1:numel(rot_1)
plot(rot_1{1,i}(1,:),rot_1{1,i}(2,:),rot_2{1,i}(1,:),rot_2{1,i}(2,:))
end

추가 답변 (2개)

Pseudoscientist
Pseudoscientist 2020년 8월 27일
Like this

Pseudoscientist
Pseudoscientist 2020년 8월 27일
theta = 0:pi/30:2*pi;
phi = 0.5*(1+sqrt(5));
r = phi.^(2*theta/pi);
x = r.*cos(theta);
y = r.*sin(theta);
figure(1);hold on
plot(x-1,1+y,x-1,-1-y,-x+1,1+y,-x+1,-1-y)
plot(cos(theta),sin(theta))

카테고리

Help CenterFile Exchange에서 Coordinate Transformations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by