Menu

Triangle

Nicolas Hainaux
Attachments
memo_triangle.png (18156 bytes)

A Triangle is composed of three Points defining three sides and three angles.
Its main methods are into_euk() and work_out_euk_box().

The labels that are displayable along the sides and in the angles allow to draw a Triangle of a desired shape and display other datas, as in a sketch.

Possible args for __init__():

  • another Triangle
  • ((str, str, str), {'side0':nb0, 'angle1':nb1, 'side1':nb2})

The three strings will be the vertices' names; nb0 and nb2 will be side0's and side1's lengths; nb1 will be the measure of angle1.

other possibilities to create a Triangle will be implemented...

Options:

  • rotate_around_barycenter='randomly'|nb: to let the Triangle rotate around its barycenter

Fields:

  • vertex0, vertex1, vertex2: (read-only) the vertices of the Triangle (as Points)
  • vertices: (read-only) the vertices of the Triangle (as a list of Points)
  • angle0, angle1, angle2: (read-only) the angles of the Triangle (as Angles)
  • angles: (read-only) the angles of the Triangle (as a list of Angles)
  • side0, side1, side2: (read-only) the sides of the Triangle (as Segments)
  • sides: (read-only) the sides of the Triangle (as a list of Segments)
  • rotation_angle: (read-only) this is used to rotate the Triangle around its barycenter, to allow the displaying of Triangles in any position

Debugging info: no dbg_str() method, so far

Check Triangle's complete doc

Back


Related

Doc for dev: Core Objects

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.