camera: Create a camera specification

View source: R/camera.R

cameraR Documentation

Create a camera specification

Description

Defines a camera for rendering by specifying the eye position, look-at center, up vector, projection type, and field of view.

Usage

camera(
  eye,
  center,
  up = c(0, 1, 0),
  projection = c("perspective", "orthographic"),
  fov = 45
)

Arguments

eye

Numeric vector of length 3: camera position.

center

Numeric vector of length 3: point the camera looks at.

up

Numeric vector of length 3: camera up direction.

projection

Projection type: "perspective" (default) or "orthographic".

fov

Field of view in degrees (perspective only).

Value

A camera list suitable for render_mesh() or render_scene().

Examples

cam <- camera(eye = c(0, 0, 5), center = c(0, 0, 0))
cam$eye


scimesh documentation built on Aug. 9, 2026, 9:07 a.m.