Need help with the assignment from uni
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a question to draw a 3D cup of coffe (no need to draw a handle), I dont have any idea and knowledge yet to draw a specific object in matlab, can anyone help me with this please, many thanks.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1332565/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1332565/image.png)
댓글 수: 0
답변 (1개)
Sulaymon Eshkabilov
2023년 3월 22일
편집: Sulaymon Eshkabilov
2023년 3월 22일
R1 = 7.3/2;
R2 = 5.5/2;
T = asin(R2/R1);
X = @(x,y) R1*cos(x).*sin(y);
Y = @(x,y) R1*sin(x).*sin(y);
Z = @(x,y) -R1*cos(y);
fsurf(X,Y,Z,[0 2*pi 0 T], 'EdgeColor','none')
colormap parula
axis off
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!