- /
-
Vortex Pattern
on 29 Nov 2023
- 14
- 34
- 0
- 1
- 699
drawframe(1);
Write your drawframe function below
% GUHAN R B.E.,ECE
% K.S.Rangasamy College of Technology, Tiruchengode
function drawframe(f)
t = linspace(0,1);
t1 = linspace(0,6.3);
h = linspace(0,10,720);
a=h(f)
b=60*cos(2*pi*a)+10*cos(6*pi*a)
c=60*sin(2*pi*a)+10*sin(6*pi*a)
m=60*cos(2*pi*a+(2*pi)/3)+10*cos(6*pi*a+2*pi)
g=60*sin(2*pi*a+(2*pi)/3)+10*sin(6*pi*a+2*pi)
k=60*cos(2*pi*a+(4*pi)/3)+10*cos(6*pi*a+4*pi)
p=60*sin(2*pi*a+(4*pi)/3)+10*sin(6*pi*a+4*pi)
x=m*t-b*t+b
y=g*t-c*t+c
x1=k*t-m*t+m
y1=p*t-g*t+g
x2=k*t-b*t+b
y2=p*t-c*t+c
x3=60*cos(t1)+10*cos(3*t1)
y3=60*sin(t1)+10*sin(3*t1)
x4=20*cos(2*pi*t)
y4=20*sin(2*pi*t)
x5=((b+m+k)/3)+30*cos(2*pi*t)
y5=((c+g+p)/3)+30*sin(2*pi*t)
x6=((b+m+k)/3)+5*cos(2*pi*t)
y6=((c+g+p)/3)+5*sin(2*pi*t)
plot(x,y,x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6,'LineWidth',2,'Color',[0 0 1])
MeshDensity=6666
axis equal
axis([-80 80 -60 60])
end