/* Last edited on 2008-07-14 20:23:00 by stolfi */ void fig_2d_spline ( PlotOptions *o, char *tag, dg_tree_node_t *G, interval_t rootCell[], dg_locus_t E, dg_pulse_kind_t pkind, dg_degree_t g, dg_cont_t c ) { char elemTag[300]; dg_dim_t d = 2; /* Get the tents associated to this locus: */ dg_locus_vec_t loc = dg_locus_vec_new(1); loc.nel = 1; loc.el[0] = E; dg_tent_vec_t tv = dg_tent_basis(d, c, g, loc); fprintf(stderr, "locus "); dg_locus_print(stderr, d, E); fprintf(stderr, " created %d tents\n", tv.nel); double xt[tv.nel], yt[tv.nel], ft[tv.nel]; double func(double x[], double fx[]) { double r = 1 + x[0]; double t = 0.5*M_PI*x[1]; fx[0] = r*cos(t); fx[1] = r*sin(t); fx[2] = 1.0/r*sin(4*t); } int i; for (i = 0; i < tv.nel; i++) { dg_tent_t t = tv.el[i]; sprintf(elemTag, "%s-%02d", tag, i); fig_2d_tent(o, elemTag, G, rootCell, pkind, c, g, t); } }