Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- import math
- from mathutils import *
- import os
- #set your own target here
- target = bpy.data.objects['Syma_X8C.001']
- cam = bpy.data.objects['Camera']
- count = 0
- radius = 25
- for alpha in range(90,160,20):
- alpha = math.radians(alpha)
- for betta in range(0,360,25):
- count += 1
- if count>36:
- break
- betta = math.radians(betta)
- cam.location.x = math.sin(alpha)*math.cos(betta)*radius
- cam.location.y = math.sin(alpha)*math.sin(betta)*radius
- cam.location.z = math.cos(alpha)*radius
- cam.rotation_euler[2] = betta + math.pi/2
- cam.rotation_euler[0] = alpha
- cam.rotation_euler[1] = 0
- file = os.path.join('C:\project\Computer_Vision\\term_paper_2023\drone-blend', str(count))
- print(file)
- bpy.context.scene.render.filepath = file
- bpy.ops.render.render( write_still=True )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement