Draw filled triangle and possibly change aspect ratio
Show older comments
How can I draw a filled equilateral triangle (actually white) with background black? I don't want to have any x and y axis on the drawing. I just need the graph.
And also how can I define an aspect ratio (hight:width) of the triangle and then get the different triangles of different aspect ratio from an equilateral triangle?
I think some logic for the length of pixels should work but I could not figure out.
Thanks in adavance!!
1 Comment
Rik
on 25 May 2020
You can probably solve your question with the patch function. You only need to calculate the coordinates of the corners.
Accepted Answer
More Answers (1)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!