Skip to contents

Matrix Look At

Usage

matrix_look_at(eye, target, up)

Arguments

eye

A numeric vector of length 3.

target

A numeric vector of length 3.

up

A numeric vector of length 3.

Value

A 4x4 numeric matrix

Examples

matrix_look_at(c(0, 0, 0), c(0, 0, 0), c(0, 1, 0))
#>      [,1] [,2] [,3] [,4]
#> [1,]    0    0    0    0
#> [2,]    0    0    0    0
#> [3,]    0    0    0    0
#> [4,]    0    0    0    1