ok

Mini Shell

Direktori : /proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/turtle/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyo

�
Afc@s�dZddlmZmZmZmZddlmZdZ	de
fd��YZdefd��YZd	�Z
ed
kr�e
�e�ndS(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����(tShapetTurtletmainlooptVec2D(tsleepitGravSyscBs#eZd�Zd�Zd�ZRS(cCsg|_d|_d|_dS(Nig{�G�z�?(tplanetstttdt(tself((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt__init__s		cCs"x|jD]}|j�q
WdS(N(Rtinit(R	tp((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyRscCsKxDtd�D]6}|j|j7_x|jD]}|j�q/Wq
WdS(Ni'(trangeRRRtstep(R	tiR((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pytstart!s(t__name__t
__module__R
RR(((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyRs		tStarcBs,eZd�Zd�Zd�Zd�ZRS(cCsptj|d|�|j�||_|j|�||_|jj|�||_|j	d�|j
�dS(Ntshapetuser(RR
tpenuptmtsetpostvRtappendtgravSyst
resizemodetpendown(R	RtxRRR((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR
(s
	
		
cCs:|jj}|j�|_|jd||j|_dS(Ng�?(RRtacctaR(R	R((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR2scCsrtdd�}x\|jjD]N}||kr|j�|j�}|t|jt|�d|7}qqW|S(Nii(tVecRRtpostGRtabs(R	R tplanetR((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR6s*cCs�|jj}|j|j�||j�|jjj|�dkrh|j|j|jjd��n|j	�|_
|j||j
|_dS(Ni(RRRR"RRtindext
setheadingttowardsRR (R	R((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR=s#(RRR
RRR(((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyR's	
		cCs�t�}|j�|jdd�|j�|j�|jd�|jd�|j�|jdd�|j	�|j
�}|j�|jdd�|j	�|j
�}td�}|j|d�|j|d�|j
�jd|�|jd	d�t�}td
tdd�tdd�|d�}|jd
�|jd�|j�tdtdd�tdd�|d�}|jd�|jd�td	tdd�tdd�|d�}|jd�|jd�|j�|j�dS(NiiiZi�tcompoundtorangetblueR%ii@Bg�tcircletyellowg������?i�0i�i�tgreeng�������?i�i'g�?sDone!(Rtresetttracerthttputfdtltt
begin_polyR,tend_polytget_polyRtaddcomponentt	getscreentregister_shapeRRR!tcolort	shapesizetpencolorRR(tstm1tm2tplanetshapetgstsuntearthtmoon((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pytmainGsD	








	*


*

*



t__main__N(t__doc__tturtleRRRRR!ttimeRR#tobjectRRRFR(((s9/usr/lib64/python2.7/Demo/turtle/tdemo_planet_and_moon.pyt<module>s" 	'

Zerion Mini Shell 1.0