Skip to contents

A scene pre-configured for vector field and linear algebra visualizations. Includes a NumberPlane and helper methods for adding vectors, matrices, and transformations.

Super class

manimR::Scene -> VectorScene

Public fields

plane

NumberPlane for the background grid

Methods

Inherited methods


Method new()

Create a VectorScene

Usage

VectorScene$new(
  name = "vector_scene",
  x_range = c(-5, 5, 1),
  y_range = c(-3, 3, 1),
  ...
)

Arguments

name

Scene name

x_range

X range for the plane

y_range

Y range for the plane

...

Additional args


Method add_vector()

Add a vector arrow from origin

Usage

VectorScene$add_vector(direction, color = YELLOW)

Arguments

direction

Vector direction c(x, y)

color

Arrow color

Returns

The Vector mobject


Method apply_matrix()

Apply a linear transformation matrix to all vectors

Usage

VectorScene$apply_matrix(matrix, duration = 2)

Arguments

matrix

2x2 transformation matrix

duration

Animation duration


Method show_basis_vectors()

Show basis vectors (i-hat, j-hat)

Usage

VectorScene$show_basis_vectors(color_i = GREEN, color_j = RED)

Arguments

color_i

Color for i-hat

color_j

Color for j-hat


Method clone()

The objects of this class are cloneable with this method.

Usage

VectorScene$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.