-
Notifications
You must be signed in to change notification settings - Fork 0
/
testwowin.py
38 lines (29 loc) · 955 Bytes
/
testwowin.py
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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math
from physvis import *
def main():
fps = 30
ctx1 = display()
ctx2 = display()
if (scene() is ctx1):
print("scene is ctx1")
if (scene() is ctx2):
print("scene is ctx2")
cube = box(width=0.5, height=0.25, length=0.75, color=color.red)
ctx2.select()
cube2 = box(width=1., height=0.175, length=0.5, color=color.green)
cyl = cylinder(radius=0.5, axis=(1.5, 1.5, -0.25), color=color.blue)
scene().select()
spring = helix(radius=0.5, pos=(0.5, 0.5, 0.5), axis=(-1, -1, -1), thickness=0.05, color=color.magenta)
counter = 0
while True:
counter +=1
if (counter == 60):
ctx1.width = 600
ctx1.height = 600
ctx1.title = "has been resized"
rate(fps)
# ======================================================================
if __name__ == "__main__":
main()