Make a dolly
There are already a number of answers re rendering from different angles.
How to automatically render from several camera angles?
Here is take that sets up an empty on your object as a dolly. A camera is parented to the empty, such that when the empty has no rotation the camera is a front view.
Adjusting the empties rotaion x and z is equivalent of latitude and longitude.
Here is a helper script to add the empty camera setup in 2.80
import bpy
from math import radians
context = bpy.context
bpy.ops.object.empty_add(location=(0, 0, 0))
mt = context.object
mt.empty_display_type = 'ARROWS'
mt.empty_display_size = 4
bpy.ops.object.camera_add(location=(0, -1, 0))
cam = context.object
cam.rotation_euler = (radians(90), 0, radians(0))
cam.parent = mt
cam.data.type = 'ORTHO'
context.scene.camera = cam
I have made the camera ORTHO to take advantage of method outlined here
Check if the whole plane is being on a orthographic camera render (or get a proportion of the rendered plane) to scale the camera to fit mesh.
final result of running script below, after setting up camera above, whoops notice 45 lat is south, needs a minor fix 8^). The camera is scaled such that the whole object fits
Test script. Select object to render. I have hardcoded in two latitude longitude pairs, (0, 0) and (45, 45).
import bpy
from mathutils import Vector
from math import radians
context = bpy.context
dg = context.evaluated_depsgraph_get()
scene = context.scene
# add empty
cam_ob = scene.camera
# make sure run other script first to give cam parent empty
mt = cam_ob.parent
plane = context.object
mt.parent = plane
pmw = plane.matrix_world
bbox = [Vector(b) for b in plane.bound_box]
plane_co = sum(bbox, Vector()) / 8
cam_ob.location.y = (pmw @ bbox[0]).length
coords = [t for b in plane.bound_box for t in pmw @ Vector(b)]
for lat, lon in ((0, 0),(45, 45)):
mt.rotation_euler = (radians(lat), 0, radians(lon))
dg.update()
v, scale = cam_ob.camera_fit_coords(dg, coords)
cam_ob.data.ortho_scale = scale
cam_ob.matrix_world.translation = v
# render
Now we only need to input the latitude and longitude of the camera.
Assumes the object's origin is centre of bounding box. The script sets the object as the parent of the camera "dolly" empty.
If you are using 2.79 or prior, replace any occurence of @
with *
and context.depsgraph
with context.scene
camera.location
. $\endgroup$