- 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
2 views (last 30 days)
Show older comments
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).
The same goes for other shapes.
Please help to create these shapes with changable edges and their corresponding matrices.
0 Comments
Answers (1)
Walter Roberson
on 3 Jun 2021
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 Comments
Walter Roberson
on 7 Jun 2021
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.
See Also
Categories
Find more on Elementary Polygons 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!