Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Determining the angle in python turtle graphics

The task is to draw an equilateral triangle that will be positioned in the first quadrant, so that it is symmetrical with respect to the bisector of the first and fourth quadrants.
Image of triangle

How would i determine the initial angle that i need to turn.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

The y = x forms a 45-degree angle with the x-axis, an equilateral triangle has internal angles of 60 degrees by definition.
Because the triangle is symmetrical on the y = x line, the angle formed between the y = x line and the triangle would be 30 degrees. Now we just calculate 45 - 30 = 15, so we have a 15-degree angle to the x-axis and the triangle.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading