Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Spiro Namespace Reference

Classes

class  ConverterPath
 Converts Spiro to 2Geom's Path. More...
 
struct  spiro_cp
 

Typedefs

typedef struct spiro_seg_s spiro_seg
 

Functions

Geom::Path spiro_run (const spiro_cp *src, int src_len)
 
static void integrate_spiro (const double ks[4], double xy[2])
 
static double compute_ends (const double ks[4], double ends[2][4], double seg_ch)
 
static void compute_pderivs (const spiro_seg *s, double ends[2][4], double derivs[4][2][4], int jinc)
 
static double mod_2pi (double th)
 
static spiro_segsetup_path (const spiro_cp *src, int n)
 
static void bandec11 (bandmat *m, int *perm, int n)
 
static void banbks11 (const bandmat *m, const int *perm, double *v, int n)
 
static int compute_jinc (char ty0, char ty1)
 
static int count_vec (const spiro_seg *s, int nseg)
 
static void add_mat_line (bandmat *m, double *v, double derivs[4], double x, double y, int j, int jj, int jinc, int nmat)
 
static double spiro_iter (spiro_seg *s, bandmat *m, int *perm, double *v, const int n)
 
static int solve_spiro (spiro_seg *s, const int nseg)
 
static void spiro_seg_to_otherpath (const double ks[4], double x0, double y0, double x1, double y1, ConverterPath &bc, int depth, bool close_last)
 
spiro_segrun_spiro (const spiro_cp *src, int n)
 
void free_spiro (spiro_seg *s)
 
void spiro_to_otherpath (const spiro_seg *s, int n, ConverterPath &bc)
 
double get_knot_th (const spiro_seg *s, int i)
 

Variables

int n = 4
 

Typedef Documentation

◆ spiro_seg

typedef struct spiro_seg_s Spiro::spiro_seg

Definition at line 29 of file spiro.h.

Function Documentation

◆ add_mat_line()

static void Spiro::add_mat_line ( bandmat *  m,
double *  v,
double  derivs[4],
double  x,
double  y,
int  j,
int  jj,
int  jinc,
int  nmat 
)
static

Definition at line 637 of file spiro.cpp.

Referenced by spiro_iter().

◆ banbks11()

static void Spiro::banbks11 ( const bandmat *  m,
const int *  perm,
double *  v,
int  n 
)
static

Definition at line 583 of file spiro.cpp.

References n.

Referenced by spiro_iter().

◆ bandec11()

static void Spiro::bandec11 ( bandmat *  m,
int *  perm,
int  n 
)
static

Definition at line 535 of file spiro.cpp.

References n.

Referenced by spiro_iter().

◆ compute_ends()

static double Spiro::compute_ends ( const double  ks[4],
double  ends[2][4],
double  seg_ch 
)
static

Definition at line 429 of file spiro.cpp.

References integrate_spiro().

Referenced by compute_pderivs(), and get_knot_th().

◆ compute_jinc()

static int Spiro::compute_jinc ( char  ty0,
char  ty1 
)
static

Definition at line 612 of file spiro.cpp.

Referenced by count_vec(), and spiro_iter().

◆ compute_pderivs()

static void Spiro::compute_pderivs ( const spiro_seg s,
double  ends[2][4],
double  derivs[4][2][4],
int  jinc 
)
static

Definition at line 467 of file spiro.cpp.

References compute_ends(), and delta.

Referenced by spiro_iter().

◆ count_vec()

static int Spiro::count_vec ( const spiro_seg s,
int  nseg 
)
static

Definition at line 626 of file spiro.cpp.

References compute_jinc(), and n.

Referenced by solve_spiro(), and spiro_iter().

◆ free_spiro()

void Spiro::free_spiro ( spiro_seg s)

Definition at line 896 of file spiro.cpp.

◆ get_knot_th()

double Spiro::get_knot_th ( const spiro_seg s,
int  i 
)

Definition at line 921 of file spiro.cpp.

References compute_ends().

◆ integrate_spiro()

static void Spiro::integrate_spiro ( const double  ks[4],
double  xy[2] 
)
static

Definition at line 65 of file spiro.cpp.

References n.

Referenced by compute_ends(), print_seg(), spiro_seg_to_otherpath(), and test_integ().

◆ mod_2pi()

static double Spiro::mod_2pi ( double  th)
static

Definition at line 489 of file spiro.cpp.

References floor().

Referenced by setup_path(), and spiro_iter().

◆ run_spiro()

spiro_seg * Spiro::run_spiro ( const spiro_cp src,
int  n 
)

Definition at line 886 of file spiro.cpp.

References n, setup_path(), solve_spiro(), and Spiro::spiro_cp::ty.

Referenced by spiro_run().

◆ setup_path()

static spiro_seg * Spiro::setup_path ( const spiro_cp src,
int  n 
)
static

Definition at line 496 of file spiro.cpp.

References mod_2pi(), n, Spiro::spiro_cp::ty, Spiro::spiro_cp::x, and Spiro::spiro_cp::y.

Referenced by run_spiro(), and test_curve().

◆ solve_spiro()

static int Spiro::solve_spiro ( spiro_seg s,
const int  nseg 
)
static

Definition at line 792 of file spiro.cpp.

References count_vec(), and spiro_iter().

Referenced by run_spiro(), and test_curve().

◆ spiro_iter()

static double Spiro::spiro_iter ( spiro_seg s,
bandmat *  m,
int *  perm,
double *  v,
const int  n 
)
static

Definition at line 658 of file spiro.cpp.

References add_mat_line(), banbks11(), bandec11(), compute_jinc(), compute_pderivs(), count_vec(), mod_2pi(), and n.

Referenced by solve_spiro().

◆ spiro_run()

◆ spiro_seg_to_otherpath()

static void Spiro::spiro_seg_to_otherpath ( const double  ks[4],
double  x0,
double  y0,
double  x1,
double  y1,
ConverterPath bc,
int  depth,
bool  close_last 
)
static

◆ spiro_to_otherpath()

void Spiro::spiro_to_otherpath ( const spiro_seg s,
int  n,
ConverterPath bc 
)

Definition at line 902 of file spiro.cpp.

References Spiro::ConverterPath::moveto(), n, and spiro_seg_to_otherpath().

Referenced by spiro_run().

Variable Documentation

◆ n