Skip to contents

Creates a camera specification list with world-to-camera rotation matrix $R$, translation vector $t$, focal lengths, and principal point.

Usage

gs_camera(
  position = c(0, -2, 1),
  look_at = c(0, 0, 0),
  up = c(0, 0, 1),
  fov = 50,
  width = 640,
  height = 480
)

Arguments

position

Numeric vector of length 3 c(x, y, z) specifying the camera position in world space.

look_at

Numeric vector of length 3 c(x, y, z) specifying the point the camera is looking at. Defaults to c(0, 0, 0).

up

Numeric vector of length 3 c(x, y, z) specifying the up vector. Defaults to c(0, 0, 1).

fov

Numeric scalar. Vertical field of view in degrees. Defaults to 50.0.

width

Integer. Viewport width in pixels. Defaults to 640.

height

Integer. Viewport height in pixels. Defaults to 480.

Value

A list with camera extrinsics and intrinsics.