How to draw every type of triangle?
4 次查看(过去 30 天)
显示 更早的评论
I was only able to generate a equilateral triangle with my code below;
%Triangle=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
sides = 3;
t = (1/(2*sides):1/(sides):1)*2*pi-pi/3;
b = User_input(3);
x = b*sin(t)+5/8*xmax;
y = b*cos(t)+3/4*ymax;
fill(x,y,'black');
1 个评论
Jan
2015-5-25
Notice that we cannot guess what you want to achieve and what "User_input(3)" is. So please edit the question and append more information.
回答(1 个)
Image Analyst
2015-5-25
My response is in your duplicate question: http://www.mathworks.com/matlabcentral/answers/217638-how-do-i-insert-the-area-of-each-shape-in-the-centre-of-it#comment_287731
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!