- take an equilateral triangle. Start from the bottom left point and draw an arc of a circle connecting the top centre point and the bottom right point. Start from the bottom right point and drawn an arc of a circle connecting the top centre point and the bottom left point. Now take an additional point that is as far below the base of the triangle as the center point is above the triangle, and use it as a center to draw an arc of a circle connecting the left and right points.
Display geometric shapes and output matrices
3 次查看(过去 30 天)
显示 更早的评论
I want the following types of triangles to be displayed with the curvature of the edges and corners, and their matrix to be created as well.
I have no idea how to create them. I need both a matrix and a representation of it. I also want to be able to change the amount of curvature and the size of the sides(edges/curves).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640730/image.png)
The same goes for other shapes.
Please help to create these shapes with changable edges and their corresponding matrices.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640735/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640740/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640745/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640750/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640755/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640760/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640765/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/640770/image.png)
0 个评论
回答(1 个)
Walter Roberson
2021-6-3
First row, first element:
To phrase it another way, create an equilateral triangle that is pointed down, and subdivide each of each edges
A----1----B
\ / \ /
2 --- 3
\ /
C
and the first three shapes are based upon using different combinations of A/B/C or 1/2/3 as the center of circles joining 1/2/3
4 个评论
Walter Roberson
2021-6-7
This is academic work that has been assigned to you, right? That is generally known as "homework".
If, hypothetically, this is a "project" for your employment, then
- you have strange (hypothetical) employment
- providing complete code for commercial use is the sort of task that my consulting arm gets paid for
You should be able to find the coordinates of the vertices of triangle ABC easily. You can write down two of the three through simple inspection:
A -> (0,0)
B -> (1,0)
C -> (1/2, something)
What is the value of something ? Well, you have a right triangle
1/2
A----1
\ |
\ | something
\ |
C
and the length of AC is 1. So by the pythagorean theorem, 1/2^2 + something^2 = 1^2 ?
You now have everything you need to know the positions A, B, C and 1, and you should be able to easily calculate the positions of 2 and 3 by bisecting the respective edges.
So... coordinates of the six locations can be calculated without difficulty.
And after that, start drawing circles of radius 1/2.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Elementary Polygons 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!