I am trying to make a python script that is able to create randomized 2d faces. I'm using turtle at the moment but, I was wondering if there is a better library that is capable for example of auto-completion (auto connecting of lines that are distant from each other) say for example you wanted to divide a face into three portions upper mid and bottom and these three sections have different widths. but, at the end, you connect them together.
Asked
Active
Viewed 52 times
0
-
put all points on list in correct order and you can draw one line using polygon in every library. BTW: `turtle` in background uses `tkinter` – furas Dec 31 '16 at 20:40
-
what is the name of the polygon connecting method? – coguy Dec 31 '16 at 21:28
-
`tkinter` has `canvas` (which is used by `turtle) and it has function [create_polygon()](http://effbot.org/tkinterbook/canvas.htm#Tkinter.Canvas.create_polygon-method), – furas Dec 31 '16 at 21:31
-
`PyQt` has [QPolygon()](http://pyqt.sourceforge.net/Docs/PyQt4/qpolygon.html), `PyGame` has [pygame.draw.polygon()](http://pygame.org/docs/ref/draw.html#pygame.draw.polygon), `wxPython` has [DrawPolygon](https://wxpython.org/docs/api/wx.DC-class.html#DrawPolygon), `pyglet` use OpenGL which has [pyglet.gl.GL_POLYGON](http://pyglet.readthedocs.io/en/pyglet-1.2-maintenance/programming_guide/graphics.html) – furas Dec 31 '16 at 21:34