ENTRY | DOWNLOAD | MANUAL | ONGOING | |
shape3D.py"""Draw 3D shapes. by stephan) """ from slut import * class Atlantis(World): def onSetup(self): self.width = 400 self.height = 400 self.name = "3D Shapes" def onDraw(self): glColor4f(0.5, 0.5, 0.5, 1.0) #point/line glPointSize(3) point(0, 1, 0) point(0, 1, -1) point(0, 1, 1) glLineWidth(1) line(-1, 0, 0, 1, 0, 0) circle(0, 0, 2) rect(0, 0, -2, 1, 1) #filled plane(0, 0, 0, 0.3, 0.6) cuboid(0, -1.35, 1, 0.1, 0.3, 0.5) sphere(1.46, 0, 0, 0.5) disc(-1.3, 0, 1, 0.3) atlantis = Atlantis() atlantis.run() |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |