diff options
author | epoch <epoch@hacking.allowed.org> | 2018-12-16 19:28:39 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2018-12-16 19:28:39 -0600 |
commit | f479b438e6119e83c95b19aaeccd61a8e5eded27 (patch) | |
tree | 726a3916d9128f6c970f49431ef8b27140e49747 /share/hackvr/meshes/radial_to_cartesian.py | |
parent | 13dd5a6d313a2086647751286ca8315a12c804f1 (diff) | |
download | hackvr-f479b438e6119e83c95b19aaeccd61a8e5eded27.tar.gz hackvr-f479b438e6119e83c95b19aaeccd61a8e5eded27.zip |
fuck if I know. lots of shit. moved files.
Diffstat (limited to 'share/hackvr/meshes/radial_to_cartesian.py')
-rwxr-xr-x | share/hackvr/meshes/radial_to_cartesian.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/share/hackvr/meshes/radial_to_cartesian.py b/share/hackvr/meshes/radial_to_cartesian.py new file mode 100755 index 0000000..4f4370a --- /dev/null +++ b/share/hackvr/meshes/radial_to_cartesian.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +### +### so... instead of x,y,z then more x,y,z we take x,y,z then x,y,z rotations and a distance. +### so input would look like... 0 0 0 0 0 90 10 +### and the output should be... addshape 0 2 0 0 0 0 0 10 +import sys +import math +x=int(sys.argv[1]); +y=int(sys.argv[2]); +z=int(sys.argv[3]); +d=int(sys.argv[4]); +r=int(sys.argv[5]); +#print("{} {} {}\n".format(x, y, z)) +x=math.sin(d * 2.0 * math.pi / 360.0)*r +y=math.cos(d * 2.0 * math.pi / 360.0)*r +print("{} {} 0".format(x,y)) |