Graphics Library Python

By admin  



Hοw tο draw a moving circle іn python using thе graphics library аnd class?

frοm graphics import *

win = GraphWin(‘Solar System’,800,800)

class test:
def __init__(self,x,y,r):
self.x = x
self.y = y
self.r = r

def d(self):
x = Circle(Point(self.x,self.y),self.r)
# x.setFill(‘cyan4′)
x.draw(win)

sun=test(400,400,20)
sun.d()

mercury=test(450,360,10)
mercury.d()
mer_orb=test(400,400,68)
mer_orb.d()

venus=test(480,330,15)
venus.d()
venus_orb=test(400,400,110)
venus_orb.d()

earth=test(520,290,25)
earth.d()
earth_orb=test(400,400,175)
earth_orb.d()

mars=test(550,250,10)
mars.d()

jupiter=test(590,210,30)
jupiter.d()

saturn=test(650,170,30)
saturn.d()

uranus=test(700,120,20)
uranus.d()

win.getMouse()

ACTUALLY I HAD TO DRAW THE SOLAR SYSTEM AND MADE THE PLANET TO MOVE ACROSS THE ORBITS.I AM NOT BEEN ABLE THE SLEEP COMMAND IN THIS PROG TO MAKE THE PLANET MOVE..PLZZ IF ANYONE HAS AN IDEA ABOUT IT JUST LET ME KNOW..THANKS..

Shοw уουr code.
=
Wе wіll try tο hеlр.


Poser 9


Poser 9


$129.95


Poser 9 provides the world s easiest way to create captivating art and animation with 3D characters. Simple-to-learn tools and included characters let artists focus on making art. Poser es with over 3GB of ready-to-pose humans and animals textures props and 3D scene elements. In the Face Room customize Poser characters from facial photographs; add dynamic hair and clothing; dress the Poser virtual…

Poser 7 3D Figure Design and Animation [OLD VERSION]


Poser 7 3D Figure Design and Animation [OLD VERSION]


$49.99


Poser provides the easiest way to design with the human form in 3D. Using the rich collection of content included and powerful rendering to produce any style art, creative professionals, graphic artists and hobbyists can create stunning art, fine illustration and breathtaking animation for applications that integrate the diversity and spirit of human imagery….

C++ GUI Programming with Qt 4 (2nd Edition) (Prentice Hall Open Source Software Development Series)


C++ GUI Programming with Qt 4 (2nd Edition) (Prentice Hall Open Source Software Development Series)


$48.80


The Only Official, Best-Practice Guide to Qt 4.3 ProgrammingUsing Trolltech’s Qt you can build industrial-strength C++ applications that run natively on Windows, Linux/Unix, Mac OS X, and embedded Linux without source code changes. Now, two Trolltech insiders have written a start-to-finish guide to getting outstanding results with the latest version of Qt: Qt 4.3. Packed with realistic examples an…

Beginning Python Visualization: Crafting Visual Transformation Scripts (Books for Professionals by Professionals)


Beginning Python Visualization: Crafting Visual Transformation Scripts (Books for Professionals by Professionals)


$29.99


We are visual animals. But before we can see the world in its true splendor, our brains, just like our computers, have to sort and organize raw data, and then transform that data to produce new images of the world. Beginning Python Visualization: Crafting Visual Transformation Scripts discusses turning many types of small data sources into useful visual data. And, you will learn Python as part of…

Django: Visual QuickPro Guide


Django: Visual QuickPro Guide


$6.90


DJango is a open source web application framework written in Python. It follows the MVC (model view controller) design pattern; this software design pattern separates business logic from the user interface making it easier to make changes to the logic or interface without affecting the other. Django’s primary goal is to ease the creation of complex, database-driven websites. The framework emphasiz…



Post a Comment

Your email is never shared. Required fields are marked *

*
*
The owner of this website Susie Mills is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking JMP Live Movies & Videos to Amazon Properties including, but not limited to amazon.com, endless.com, smallparts.com, myhabit.com or amazonwireless.com