spirograph.py revision 79ec30eb098ea1053718e7b5b0e92b8ff59488a2
'''
Copyright (C) 2007 Joel Holdsworth joel@airwebreathe.org.uk
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
help="The radius of the outer gear")
help="The radius of the inner gear")
help="The distance of the pen from the inner gear")
help="Selects whether the gear is inside or outside the ring")
help="The number of degrees to rotate the image by")
help="The quality of the calculated output")
return
return
flip = -1
else:
flip = 1
if ratio == 0:
return
s = {'stroke-linejoin': 'miter', 'stroke-width': '1.0px',
'stroke-opacity': '1.0', 'fill-opacity': '1.0',
'stroke': '#000000', 'stroke-linecap': 'butt',
'fill': 'none'}
pathString = ''
maxPointCount = 1000
for i in range(maxPointCount):
if i <= 0:
else:
pathString += 'Z'
break
else:
if i == maxPointCount - 1:
pass # we reached the allowed maximum of points, stop here
else:
e = Spirograph()
e.affect()