__author__ = 'thoth'
import bpy
from mathutils import *
from math import *
if False:
v1 = Vector([3,2,0])
v2 = Vector([3,2,1])
v3 = Vector([3,3,0])
A = v2-v1
B = v3-v1
C = A.cross(B)
else:
C = Vector([0,1,0])
sin_theta = C.normalized()[2]
sin_theta = abs(sin_theta)
theta = asin(sin_theta)
print(theta)
|
Blender python API quick-start
Syntax highlighting by Pygments.