wiggle: Add a wiggle effect to frames

View source: R/wiggle.R

wiggleR Documentation

Add a wiggle effect to frames

Description

Inserts two rotated copies after each selected frame — one tilted +degrees and one tilted -degrees — creating a hand-held stop-motion rock effect. For large-angle permanent rotations, see rotate.

Usage

wiggle(images, degrees = 3, frames = NULL)

Arguments

images

an object of class magick-image to modify

degrees

a positive number specifying the tilt angle in degrees. Both +degrees and -degrees are applied automatically.

frames

integer vector of frame indices to duplicate. Defaults to NULL, which duplicates all frames.

Value

a magick-image object with 2 extra frames per selected frame.

Verbosity

After each operation a message listing the updated frame sequence is printed in interactive sessions. Use stopmotion_verbosity(FALSE) to suppress these messages, or set options(stopmotion.verbose = FALSE) in your script or ‘.Rprofile’.

Examples


  dino_dir <- system.file("extdata", package = "stopmotion")
  images <- read(dir = dino_dir)
  wiggle(images = images, degrees = 3, frames = 1:2)


stopmotion documentation built on March 24, 2026, 5:06 p.m.