Python code to form a five sided polygon using a list of triangles

:grin: please help me write the code as i dont have any idea about this topic and im just a begineer in python

Since this is not a track lesson, we will need to treat it as a Corner Bar discussion and move this topic to that category. If it happens to be a homework assignment, then we are left to decide how we should help… By spelling it out, or by discussing the concepts and deriving a solution. I think deriving a solution is best.

First, let’s start with some questions.

  1. How many diagonals does a five-sided polygon have?
  2. Do the diagonals have to be the same length?
  3. How many dimensions in all would we need to perform the construction?

Number 1 is easy enough to answer… 5. Five sides, five diagonals.

Number 2 is also simple enough to reason out. If all the diagonals are equal length than we can infer that all the sides are also equal in length. That would make this a regular polygon. I’ll leave the reader to prove this out.

The answer, though, is no, the sides of a polygon don’t have to be equal, and so therefore the diagonals will also not be equal. But we know that for each pair of triangles, they share one side in common.

Number 3, then, is something we can deduce from the above information: 5 diagonals, 5 sides, giving 10 dimensions in all. So now we have a basis from which to form our data.

There would be at least one control proviso though, given 5 triangles, each triangle must have a corresponding triangle with an equal side. These sides are co-linear.

I’m going to stop here, and let the reader mull over these criteria before getting into the numbers and equations. Suggest tackling this on paper and then give us some starting data with which to work.

If the OP were remotely interested in this topic he/she would have called me out on this post. It’s complete balderdash and anyone who knows geometry knows it.

I don’t know now whether to leave it as a spoof, or remove it. The problem does have a solution that can be derived from a real analysis of the facts. We definitely need new answers to those three questions.