0

While creating a regular polygon in the Icon/Diagram Layer in OpenModelica, I can understand that the origin is the centre/centroid of the polygon and the co-ordinates of the points of the polygon are calculated using the origin as a reference.

Can anyone tell me how the origin co-ordinate and the point co-ordinates of an irregular ploygon are generated in OpenModelica?

MSK
  • 448
  • 2
  • 5
  • 18

1 Answers1

2

Each graphic shape has a bounding rectangle http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#boundingRect. The center of this rectangle is used as an origin.

What do you want to achieve?

Adeel Asghar
  • 577
  • 2
  • 7
  • I just just curious to know how it works. I thought that the centre was the centroid of the polygon. But when I calculated the distance of the points of the polygon from the centre, all the distances were different. – MSK Jul 07 '14 at 04:23