File: glasscube.py

package info (click to toggle)
minetest-mod-pycraft 0.22-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,744 kB
  • sloc: python: 79,282; makefile: 10
file content (38 lines) | stat: -rwxr-xr-x 486 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Code under the MIT license by Alexander Pruss
#

from mcturtle import *

t = Turtle()
t.turtle(None)
t.pendelay(0)
t.angle(0) # align to grid

def face():
  t.startface()
  for i in range(4):
    t.go(20)
    t.yaw(90)
  t.endface()

t.penblock(GLASS)
for i in range(2):
  face()
  t.roll(-90)
  face()
  t.roll(90)
  t.pitch(90)
  face()
  t.pitch(-90)
  t.penup()
  t.go(20)
  t.yaw(90)
  t.go(20)
  t.pitch(90)
  t.go(20)
  t.pitch(-90)
  t.yaw(90)
  t.pitch(-90)
  t.pendown()