Navigation

Operators and Keywords

Function List:

C++ API

Function File: ls_animate_evolution (phi, f, h, times, wait)

Animate the evolution of a level-set geometry. The evolution is calculated with ls_solve_stationary and ls_extract_solution for the given arguments, and the result plotted in the current figure for the times given in times. Between updating to the next “movie frame”, sleep for wait seconds.

See also: ls_solve_stationary, ls_extract_solution.

Demonstration 1

The following code

  n = 100;
  x = linspace (-2, 2, n);
  h = x(2) - x(1);
  [XX, YY] = meshgrid (x, x);

  phi = ls_genbasic (XX, YY, "sphere", [0, 0], 1.7);
  f = -XX.^2 - YY.^2;

  times = linspace (0, 1, 60);
  ls_animate_evolution (phi, f, h, times, 0.05);

Produces the following figure

Figure 1

Package: level-set