summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/dothack
diff options
context:
space:
mode:
authorepoch <epoch@thebackupbox.net>2022-08-17 21:34:02 -0500
committerepoch <epoch@thebackupbox.net>2022-08-17 21:34:02 -0500
commit6492ba6b4107a4da228e18db4fc5fc871bfb0579 (patch)
tree11301c4e20d9a1448337e73b62a16ab1bfeba457 /share/hackvr/examples/dothack
parent49d54d7582bdcbdcff5637e72e9f29bb5cc571bd (diff)
downloadhackvr-6492ba6b4107a4da228e18db4fc5fc871bfb0579.tar.gz
hackvr-6492ba6b4107a4da228e18db4fc5fc871bfb0579.zip
updated README to show that everything that got deleted went to an -extras repo. also, hackvr script updated to be better bashHEADmaster
Diffstat (limited to 'share/hackvr/examples/dothack')
-rwxr-xr-xshare/hackvr/examples/dothack/chaosgate.py63
-rwxr-xr-xshare/hackvr/examples/dothack/test.sh6
2 files changed, 0 insertions, 69 deletions
diff --git a/share/hackvr/examples/dothack/chaosgate.py b/share/hackvr/examples/dothack/chaosgate.py
deleted file mode 100755
index b1cea43..0000000
--- a/share/hackvr/examples/dothack/chaosgate.py
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env python
-
-import math
-
-def fp(p):
- return " {} {} {}".format(p[0],p[1],p[2])
-
-def print_rect(r):
- print("gate addshape 3 4 {} {} {} {}".format(fp(r[0]),fp(r[1]),fp(r[2]),fp(r[3])))
-
-d=1
-
-sides = 16.0
-step = 360.0/sides
-rot=0.0
-zoff = 0.0
-while rot < 360:
-# print("rot: {}".format(rot))
- x1=math.sin(rot * math.pi / 180.0)
- y1=math.cos(rot * math.pi / 180.0)
- rot = rot + step
- x2=math.sin(rot * math.pi / 180.0)
- y2=math.cos(rot * math.pi / 180.0)
-
-# print("{} {}".format(x1,y1))
-
- ### now to calculate points for the 4 rectangles we need to draw...
- v1 = x1 * (d+30.0) # inner first point
- v2 = x1 * (d+32.0) # outer first point
- v3 = x1 * (d+31.0) # center first point
-
- v4 = y1 * (d+30.0)
- v5 = y1 * (d+32.0)
- v6 = y1 * (d+31.0)
-
- v7 = x2 * (d+30.0)
- v8 = x2 * (d+32.0)
- v9 = x2 * (d+31.0)
-
- v10 = y2 * (d+30.0)
- v11 = y2 * (d+32.0)
- v12 = y2 * (d+31.0)
-
- p1 = (v1, v4, zoff + 0.0)
- p2 = (v2, v5, zoff + 0.0)
- p3 = (v3, v6, zoff + 1.0)
- p4 = (v3, v6, zoff - 1.0)
-
- p5 = (v7, v10, zoff + 0.0)
- p6 = (v8, v11, zoff + 0.0)
- p7 = (v9, v12, zoff + 1.0)
- p8 = (v9, v12, zoff - 1.0)
-
- r1 = (p1, p5, p7, p3) #inner near
- r2 = (p1, p5, p8, p4) #inner far
- r3 = (p2, p6, p7, p3) #outer near
- r4 = (p2, p6, p8, p4) #outer far
-
- ### first rectange is...
- print_rect(r1)
- print_rect(r2)
- print_rect(r3)
- print_rect(r4)
diff --git a/share/hackvr/examples/dothack/test.sh b/share/hackvr/examples/dothack/test.sh
deleted file mode 100755
index 7a30544..0000000
--- a/share/hackvr/examples/dothack/test.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-nonblocktail \
- <(./chaosgate.py) \
- <(echo gate move 0 0 150) \
- <(while true;do for i in $(seq 0 5 360);do echo "gate rotate 0 $i 0";sleep .1;done;done) \
- | hackvr_open