boxcount

boxcount — Estimate box-counting fractal dimension.

Synopsis




uint32_t*   ifs_boxcount                    (size_t rows,
                                             size_t cols,
                                             uint32_t *canvas,
                                             size_t maxsize);
double      ifs_estimate_dimension          (const IFS *ifs,
                                             size_t ntab,
                                             const size_t *tab);
void        ifs_estimate_dimension2         (const IFS *ifs,
                                             size_t ntab,
                                             const size_t *tab,
                                             double *dim,
                                             double *measure);
double      ifs_fit_boxcount_dimension      (size_t max,
                                             const size_t *counts);
void        ifs_fit_boxcount_dimension2     (size_t max,
                                             const size_t *counts,
                                             double *dim,
                                             double *measure);

Description

Details

ifs_boxcount ()

uint32_t*   ifs_boxcount                    (size_t rows,
                                             size_t cols,
                                             uint32_t *canvas,
                                             size_t maxsize);

Count the number of boxes needed to cover the fractal in canvas.

rows: The number of canvas rows.
cols: The number of canvas columns.
canvas: A rendered fractal rows x cols, nonzeros are points of the fractal.
maxsize: Maximum box size (the returned array will be of this size).
Returns : The box counts, starting from boxes of size 1.

ifs_estimate_dimension ()

double      ifs_estimate_dimension          (const IFS *ifs,
                                             size_t ntab,
                                             const size_t *tab);

Quickly estimates the box-counting dimension of ifs.

ifs: An Iterated Function System.
ntab: The size of ntab.
tab: A precomputed transformation relative occurence table.
Returns : The box-counting dimension of ifs.

ifs_estimate_dimension2 ()

void        ifs_estimate_dimension2         (const IFS *ifs,
                                             size_t ntab,
                                             const size_t *tab,
                                             double *dim,
                                             double *measure);

Quickly estimates the box-counting dimension and measure of ifs.

ifs: An Iterated Function System.
ntab: The size of ntab.
tab: A precomputed transformation relative occurence table.
dim: Where the estimated dimension should be stored, if not NULL.
measure: Where the estimated measure should be stored, if not NULL.

ifs_fit_boxcount_dimension ()

double      ifs_fit_boxcount_dimension      (size_t max,
                                             const size_t *counts);

Estimates the box-counting dimension from box counts in counts.

max: The maximum box size (and size of counts).
counts: The box counts, starting from size 1 (as returned by ifs_boxcount()).
Returns : The estimated dimension.

ifs_fit_boxcount_dimension2 ()

void        ifs_fit_boxcount_dimension2     (size_t max,
                                             const size_t *counts,
                                             double *dim,
                                             double *measure);

Estimates the box-counting dimension and measure from box counts in counts.

max: The maximum box size (and size of counts).
counts: The box counts, starting from size 1 (as returned by ifs_boxcount()).
dim: Where the estimated dimension should be stored, if not NULL.
measure: Where the estimated measure should be stored, if not NULL.