ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
Afc           @   s   d  Z  d d l m Z m Z m Z m Z d d l m Z d Z	 d e
 f d     YZ d e f d     YZ d	   Z e d
 k r e   e   n  d S(   s         turtle-example-suite:

        tdemo_planets_and_moon.py

Gravitational system simulation using the
approximation method from Feynman-lectures,
p.9-8, using turtlegraphics.

Example: heavy central body, light planet,
very light moon!
Planet has a circular orbit, moon a stable
orbit around the planet.

You can hold the movement temporarily by
pressing the left mouse button with the
mouse over the scrollbar of the canvas.

i(   t   Shapet   Turtlet   mainloopt   Vec2D(   t   sleepi   t   GravSysc           B   s#   e  Z d    Z d   Z d   Z RS(   c         C   s   g  |  _  d |  _ d |  _ d  S(   Ni    g{Gz?(   t   planetst   tt   dt(   t   self(    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt   __init__   s    		c         C   s"   x |  j  D] } | j   q
 Wd  S(   N(   R   t   init(   R	   t   p(    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR      s    c         C   sK   xD t  d  D]6 } |  j |  j 7_ x |  j D] } | j   q/ Wq Wd  S(   Ni'  (   t   rangeR   R   R   t   step(   R	   t   iR   (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt   start!   s    (   t   __name__t
   __module__R
   R   R   (    (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR      s   		t   Starc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   sp   t  j |  d | |  j   | |  _ |  j |  | |  _ | j j |   | |  _ |  j	 d  |  j
   d  S(   Nt   shapet   user(   R   R
   t   penupt   mt   setpost   vR   t   appendt   gravSyst
   resizemodet   pendown(   R	   R   t   xR   R   R   (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR
   (   s    
			c         C   s:   |  j  j } |  j   |  _ |  j d | |  j |  _ d  S(   Ng      ?(   R   R   t   acct   aR   (   R	   R   (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR   2   s    c         C   sr   t  d d  } x\ |  j j D]N } | |  k r | j   |  j   } | t | j t |  d | 7} q q W| S(   Ni    i   (   t   VecR   R   t   post   GR   t   abs(   R	   R    t   planetR   (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR   6   s    *c         C   s   |  j  j } |  j |  j   | |  j  |  j  j j |   d k rh |  j |  j |  j  j d   n  |  j	   |  _
 |  j | |  j
 |  _ d  S(   Ni    (   R   R   R   R"   R   R   t   indext
   setheadingt   towardsR   R    (   R	   R   (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR   =   s    #(   R   R   R
   R   R   R   (    (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR   '   s   	
		c          C   s  t    }  |  j   |  j d d  |  j   |  j   |  j d  |  j d  |  j   |  j d d  |  j	   |  j
   } |  j   |  j d d  |  j	   |  j
   } t d  } | j | d  | j | d  |  j   j d |  |  j d	 d  t   } t d
 t d d  t d d  | d  } | j d  | j d  | j   t d t d d  t d d  | d  } | j d  | j d  t d	 t d d  t d d  | d  } | j d  | j d  | j   | j   d S(   Ni    i   iZ   i   t   compoundt   oranget   blueR%   i   i@B g      t   circlet   yellowg?i0  i   i   t   greeng?i   i'  g      ?s   Done!(   R   t   resett   tracert   htt   put   fdt   ltt
   begin_polyR,   t   end_polyt   get_polyR    t   addcomponentt	   getscreent   register_shapeR   R   R!   t   colort	   shapesizet   pencolorR   R   (   t   st   m1t   m2t   planetshapet   gst   sunt   eartht   moon(    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt   mainG   sD    	






	*
**

t   __main__N(   t   __doc__t   turtleR    R   R   R   R!   t   timeR   R#   t   objectR   R   RF   R   (    (    (    s9   /usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt   <module>   s   " 	'