필터 지우기
필터 지우기

Need help making Delaunay's Disk in a figure.

조회 수: 2 (최근 30일)
Christophre Dennen
Christophre Dennen 2019년 10월 7일
댓글: Christophre Dennen 2019년 10월 11일
Robert_Delaunay,_1913,_Premier_Disque,_134_cm,_52.7_inches,_Private_collection.jpg
Essentially what the title says. If you're not sure what the disk is, I've uploaded a picture of it. I tried mapping it out this way:
figure
hold on
x=n*[cos(pi/2),cos(pi),cos(3*pi/2),cos(2*pi)];
y=n*[sin(pi/2),sin(pi),sin(3*pi/2),sin(2*pi)];
plot(x,y)
fill(x,y, [ ])
But realized that this would only map a square with those points as vertices. I'm not entirely sure what steps to take next, though. I'm sorry ahead of time if anything about the code is wrong, I'm in my first semester of learning matlab.

답변 (1개)

Akshit Agarwal
Akshit Agarwal 2019년 10월 11일
편집: Akshit Agarwal 2019년 10월 11일
Hi Christophre,
Thats a interesting problem statement you got there. You can refer to these queries that have already been answered:
Solutions provided in above links should be enough for you to write the code for your problem statement.
  댓글 수: 1
Christophre Dennen
Christophre Dennen 2019년 10월 11일
Hey Akshit,
This is the script I ended up using to get it to work, for anyone who might find it interesting or helpful!
clc
figure
hold on
t=linspace(0,0.5*pi,70);
x=[0 cos(t) 0];
y=[0,sin(t),0];
fill(x,y,[rand,rand,rand])
fill(x/1.15,y/1.15,[rand,rand,rand])
fill(x/1.35,y/1.35,[rand,rand,rand])
fill(x/1.65,y/1.65,[rand,rand,rand])
fill(x/2.05,y/2.05,[rand,rand,rand])
fill(x/2.75,y/2.75,[rand,rand,rand])
fill(x/4.35,y/4.35,[rand,rand,rand])
fill(-x,y,[rand,rand,rand])
fill(-x/1.15, y/1.15,[rand,rand,rand])
fill(-x/1.35,y/1.35,[rand,rand,rand])
fill(-x/1.65,y/1.65,[rand,rand,rand])
fill(-x/2.05,y/2.05,[rand,rand,rand])
fill(-x/2.75,y/2.75,[rand,rand,rand])
fill(-x/4.35,y/4.35,[rand,rand,rand])
fill(x,-y,[rand,rand,rand])
fill(x/1.15,-y/1.15,[rand,rand,rand])
fill(x/1.35,-y/1.35,[rand,rand,rand])
fill(x/1.65,-y/1.65,[rand,rand,rand])
fill(x/2.05,-y/2.05,[rand,rand,rand])
fill(x/2.75,-y/2.75,[rand,rand,rand])
fill(x/4.35,-y/4.35,[rand,rand,rand])
fill(-x,-y,[rand,rand,rand])
fill(-x/1.15,-y/1.15,[rand,rand,rand])
fill(-x/1.35,-y/1.35,[rand,rand,rand])
fill(-x/1.65,-y/1.65,[rand,rand,rand])
fill(-x/2.05,-y/2.05,[rand,rand,rand])
fill(-x/2.75,-y/2.75,[rand,rand,rand])
fill(-x/4.35,-y/4.35,[rand,rand,rand])
saveas(gcf, 'disk','jpg')

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by