From 83d23a8c990caaa45d3ec33cd57c7437a9d96bc4 Mon Sep 17 00:00:00 2001 From: Star Brilliant Date: Mon, 28 Apr 2014 21:36:53 +0800 Subject: [PATCH] Experimental rotation conversion --- danmaku2ass.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/danmaku2ass.py b/danmaku2ass.py index 6419566..dc6fd40 100755 --- a/danmaku2ass.py +++ b/danmaku2ass.py @@ -548,7 +548,8 @@ def ConvertFlashRotation(rotY, rotZ, X, Y, FOV=math.tan(2*math.pi/9.0)): outY = math.atan2(-math.sin(rotY)*math.cos(rotZ), math.cos(rotY))*180/math.pi outZ = math.atan2(-math.cos(rotY)*math.sin(rotZ), math.cos(rotZ))*180/math.pi #outX = math.asin(math.sin(rotY)*math.sin(rotZ))*180/math.pi - outX = math.acos(math.cos(rotY)/math.cos(outY*math.pi/180.0))*180/math.pi + #outX = math.acos(math.cos(rotY)/math.cos(outY*math.pi/180.0))*180/math.pi + outX = math.atan2(-math.sin(rotY)*math.cos(rotZ)*math.cos(outY*math.pi/180.0), math.cos(rotY)*math.sin(outY*math.pi/180.0))*180/math.pi ''' print( (rotY*180.0/math.pi, rotZ*180.0/math.pi),