import bpy, math
bpy.ops.wm.read_factory_settings(use_empty=True)
bpy.ops.mesh.primitive_cube_add()
bpy.ops.object.camera_add(location=(0,-6,2))
cam = bpy.context.active_object
bpy.context.scene.camera = cam
target = bpy.data.objects.new("EMPTY_CamTarget", None)
bpy.context.collection.objects.link(target)
target.location = (0,0,0)
con = cam.constraints.new('TRACK_TO')
con.target = target
scene = bpy.context.scene
scene.render.engine = 'BLENDER_WORKBENCH'
scene.render.resolution_x, scene.render.resolution_y = 320, 240
scene.frame_start, scene.frame_end = 1, 60
cam.location = (0,-6,2)
cam.keyframe_insert(data_path="location", frame=1)
cam.location = (0,-2,1.2)
cam.keyframe_insert(data_path="location", frame=60)
for f in (1, 30, 60):
    scene.frame_set(f)
    scene.render.filepath = f"/tmp/blender_cam_smoke_f{f}.png"
    bpy.ops.render.render(write_still=True)
    print(f"FRAME_{f}_CAM_POS", tuple(round(v,2) for v in cam.location))
print("SMOKE_OK")
