Plot elipses with a foci based on equations to plot flowers
이전 댓글 표시
I am trying to practice with matlab with various equations out there. Does anyone know how to plot this picture (see image below) based on these equations? I have coded the equations (see below picture), but have no idea how to plot it.

I have coded the equations A(k), B(k), C(k), D(k), E(k) but I do not know where to go from here.
Any help would be appreciated.
close all; clc; clear;
sin48 =@(k) sin((48*pi*k)./1000000);
cos48 =@(k) cos((48*pi*k)./1000000);
sin8 =@(k) sin((8*pi*k)./1000000);
cos8 =@(k) cos((8*pi*k)./1000000);
sin24 =@(k) sin((24*pi*k)./1000000);
cos24 =@(k) cos((24*pi*k)./1000000);
sin72 =@(k) sin((72*pi*k)./1000000);
cos72 =@(k) cos((72*pi*k)./1000000);
cos648=@(k) cos((648*pi*k)./1000000);
cos64 =@(k) cos((64*pi*k)./1000000);
Ek = 0.1 + 0.25*sin48(x).^2 + 0.2*cos18(x).^18 *...
(1 + (1/3)*cos24(x).^8 + 0.1*cos24(x)^20) + (1/6)*sin8(x).^16 +...
(8/20)*sin8(x).*(1 - 0.4*cos72(x).^4) + 0.0625*sin(x).^18.*...
sin24(x).^20.*sin72(x).^30 - (0.1*sin24(x).^6 + (1/6)*sin24(x).^30)...
(1-sin8(x));
Dk = (pi/2) + (1686*pi*x/1000000);
Ck = 0.003 + 0.097*cos648(x).^40;
Bk = -cos64(x).*Ek - 0.1*cos64(x);
Ak = 1.2*sin64(x)*Ek;
댓글 수: 2
Sam Chak
2022년 10월 6일
Hmm... Didn't you have few examples posted on the last few days?
Can you put the scatter() and colormap(jet) functions in the code?
Ahmed Mohamed Mansoor
2022년 10월 6일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
