I have a list of vertices (mathutils.Vector), which form a rectangle in 3d space. I need to rotate these vertices around the pivot point. So I have two tasks:
- Find the pivot point
- rotate the vertices in 5 degree steps.
For the shape I can store the view_rotation, I guess I will need it:-)
def get_view_rotation(context): rv3d = context.space_data.region_3d view_rot = rv3d.view_rotation return view_rot
Just saw the normal vector could be calculated like this:
I think I can rotate the vertices now around this normal vector, but how to do it?