final float moveDistancePerFrame = 240000f / 3600 / frameRate; // 3 cm/frame = 1800 m / 3600 s / 25 frame/s = 2.4 km/h
final float moveAnglePerFrame = (float)(Math.PI / 180 * 30 / frameRate);
final float elapsedTimePerFrame = 345600 / frameRate * 25; // 250 frame/day at 25 frame/second
List<Camera> cameraPath = this.controller.getCameraPath();
Camera camera = cameraPath.get(0);
float x = camera.getX();
float y = camera.getY();
float z = camera.getZ();
float yaw = camera.getYaw();
float pitch = camera.getPitch();
float fieldOfView = camera.getFieldOfView();
long time = camera.getTime();
videoFramesPath.add(camera.clone());
for (int i = 1; i < cameraPath.size(); i++) {
camera = cameraPath.get(i);
float newX = camera.getX();
float newY = camera.getY();
float newZ = camera.getZ();
float newYaw = camera.getYaw();
float newPitch = camera.getPitch();
float newFieldOfView = camera.getFieldOfView();
long newTime = camera.getTime();
float distance = new Point3f(x, y, z).distance(new Point3f(newX, newY, newZ));
float moveCount = distance / moveDistancePerFrame;
float yawAngleCount = Math.abs(newYaw - yaw) / moveAnglePerFrame;
float pitchAngleCount = Math.abs(newPitch - pitch) / moveAnglePerFrame;
float fieldOfViewAngleCount = Math.abs(newFieldOfView - fieldOfView) / moveAnglePerFrame;
float timeCount = Math.abs(newTime - time) / elapsedTimePerFrame;
int frameCount = (int)Math.max(moveCount, Math.max(yawAngleCount,
Math.max(pitchAngleCount, Math.max(fieldOfViewAngleCount, timeCount))));
float deltaX = (newX - x) / frameCount;
float deltaY = (newY - y) / frameCount;
float deltaZ = (newZ - z) / frameCount;
float deltaYawAngle = (newYaw - yaw) / frameCount;
float deltaPitchAngle = (newPitch - pitch) / frameCount;
float deltaFieldOfViewAngle = (newFieldOfView - fieldOfView) / frameCount;
long deltaTime = Math.round(((double)newTime - time) / frameCount);
for (int j = 1; j <= frameCount; j++) {
videoFramesPath.add(new Camera(
x + deltaX * j, y + deltaY * j, z + deltaZ * j,
yaw + deltaYawAngle * j, pitch + deltaPitchAngle * j,
fieldOfView + deltaFieldOfViewAngle * j,
time + deltaTime * j,
Camera.Lens.NORMAL));