Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'turtle': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'wrote': 0.14; 'angle': 0.16; 'geometry,': 0.16; 'polygon,': 0.16; 'polygons': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'star.': 0.16; 'subject:Drawing': 0.16; 'subject:turtle': 0.16; 'subject:python': 0.16; 'alex': 0.19; 'example': 0.22; 'import': 0.22; 'header:X-Complaints-To:1': 0.27; 'fixed': 0.29; "doesn't": 0.30; '120': 0.31; 'anyone': 0.31; 'regular': 0.32; 'but': 0.35; 'turn': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'tell': 0.60; 'email addr:gmail.com': 0.63; 'different': 0.65; 'distance': 0.65; '180': 0.84; '216': 0.84; 'received:myvzw.com': 0.84; 'square,': 0.84; 'subject::': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re:Drawing polygons in python turtle Date: Mon, 10 Feb 2014 19:00:52 -0500 (EST) Organization: news.gmane.org References: <4fa08222-582c-4585-b945-e67468c66f6d@googlegroups.com> X-Gmane-NNTP-Posting-Host: 137.sub-70-208-139.myvzw.com X-Newsreader: PiaoHong Usenet NewsReaders 1.36 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392076659 news.xs4all.nl 2921 [2001:888:2000:d::a6]:51761 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:65851 geniusrko@gmail.com Wrote in message: > Hi > can anyone help finding the angle to draw different polygons shapes > > in this example > > import turtle > wm = turtle.Screen() > alex = turtle.Turtle() > for i in range(5): > alex.left(216) > alex.forward(50) > wm.exitonclick() > > Why do we use 216 > 216 degrees doesn't seem to me that it would make a polygon, but rather a star. I can tell you what I remember about geometry, however. To make a regular polygon, you need to turn by a fixed amount and go a fixed distance each time. For an equilateral triangle, you turn 120 degrees. For a square, 90. For a pentagon, 108. 180 - (360/n) degrees. -- DaveA