Question: Java 2D An equilateral triangle can be constructed by rotating one vertex of its vertices around its centroid by 120 and 240 degrees. a. Can

Java 2D

An equilateral triangle can be constructed by rotating one vertex of its vertices around its centroid by 120 and 240 degrees.

a. Can you use the mentioned fact to define a function that draw an equilateral triangle given its centroid and one vertex? If so, write the code for this function.

b. Please use the function in a) to construct a sample triangle.

c. use suitable scaling and reflection to reflect the triangle with respect to each of its vertices while it is scaled down by 0.5.

The output may be similar to the below shape

d. use suitable texture to fill the center triangle and use another texture image to fill the small triangles.

e. write java code segment to form single shape from the above 4 triangles then apply rotation transformation to rotate that single shape around the centroid point of the triangle.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!