**Name**

**gcsf** Generalized Curve Shortening Flow of a curve

**Command Synopsis**

**gcsf** [-g *g*] [-f *f*] [-l *l*] [-e *eps*] [-n *n*] [-r *r*] [-i *i*] [-c] [-a *a*] [-v] *in* *out*

-gg: power of the curvature (double > 1/3.) (default 1)

-ff: first scale (default 0.)

-ll: last scale (default: 1.0)

-eeps: relative sampling precision (-log10 scale), in [2,13] (default 3.)

-nn: minimal number of iterations (default: 1)

-rr: bounding box radius (default: minimal)

-ii: number of iterations

-c : do not convexify last iteration

-aa: relative eroded area (-log10 area), in [2,13] (default 4.)

-v : verbose mode

in: input (Dlists)

out: output (Dlists)

**Function Summary**

Dlists gcsf (in , out , gam , first , last , eps , area , n , r , v , iter , conv )

Dlists in , out ;

double *first , *last , *eps , *area , *r , *gam ;

char *v , *conv ;

int *n , *iter ;

**Description**

This module is a generalization of the `gass`

module and computes the
evolution of the curve *in* between scales *t* = *f* and *t* = *l* according to
the geometric equation [CM01]

= (*t*)^{g} .

In this equation,

Like the affine erosion, the algorithm is based on area
computation. Nevertheless, there is no simple relation between the area erosion
and the erosion scale, since it depends on the curve and of the power of the
curvature used as parameter. As a consequence, the algorithm becomes slower and
slower as *g* increases.

The options `-i`

and `-c`

allow to fix the number of iterations
(instead of the final scale) and not to convexify the last step. We left them
as debugging options.

The area used for curvature approximation is given by the `-a`

and
`-r`

options. If *r* is not precised, the program starts by computing
a rectangle containing all the curves. The area of the chord-arc sets is
obtained by multiplying the area of the bounding box by 10^{-a}. In general,
*a* = 4 is sufficient. For non smooth curves (typically polygons with long edges
and very sharp angles) and large values of *g*, larger values may be
necessary.

The curve sampling is given by using the `-e`

option. Beyond values of
order 4, the computations become very slow and memory consuming.

Troubleshooting: a very sensitive part of the algorithm is the convexification
step (cf [Moi98]). It is *a priori* quite stable by now, although some
optimization compilation options may lead to weird and dramatic results with
recent compilers (gcc-3.0).

**See Also**

**Version 1.2**

Last Modification date : Wed Apr 9 21:28:10 2003

**Author**

Frederic Cao, Lionel Moisan