Functions | |
boolvec * | contour (const char *cntr_name="*") |
boolvec * | contour_add (REAL weight=50, const char *cntr_name="*") |
boolvec * | smooth_contour (const char *cntr_name="*", REAL penalty_factor=0) |
boolvec * | contour_leq (const char *cntr_name="*", REAL penalty_factor=0) |
boolvec * | contour_geq (const char *cntr_name="*", REAL penalty_factor=0) |
boolvec* surfit::contour | ( | const char * | cntr_name = "*" | ) |
boolvec* surfit::contour_add | ( | REAL | weight = 50 , |
const char * | cntr_name = "*" |
||
) |
boolvec* surfit::contour_geq | ( | const char * | cntr_name = "*" , |
REAL | penalty_factor = 0 |
||
) |
cntr_name | contour name |
penalty_factor | parameter for penalty algorithm |
boolvec* surfit::contour_leq | ( | const char * | cntr_name = "*" , |
REAL | penalty_factor = 0 |
||
) |
cntr_name | contour name |
penalty_factor | parameter for penalty algorithm |
boolvec* surfit::smooth_contour | ( | const char * | cntr_name = "*" , |
REAL | penalty_factor = 0 |
||
) |
\par Tcl syntax: smooth_contour \ref str "cntr_name" penalty_factor \par Description: This rule tells surfit that resulting surface should approximate contour Z-values. The result of approximation is that resulting surface should be very similar to given contours. The main difference with \ref contour gridding rule is that resulting surface is more smooth near contours. \param cntr_name \ref d_cntr "contour" \ref str "name" \param penalty_factor parameter for \ref penalty \par Math: Problem: we need to approximate contours (or isolines with different values) by adjusting
cell values. Let consider Figure 1: solid straight lines show cells borders, dot lines connect cells centers (black squares), thick black curves shows contours projection to the XoY plane. Red points on the figure are intersections of curves and dot lines.
\image html matr_sect.gif
Consider the case then the contours cross one of the dot lines, i.e. contours lay between two cells centers (see Figure 2). On the figure and
are cells centers coordinates (X or Y),
and
are adjustable values for those cells. Red circles are points where contours cross vertical plane (this plane comes through points
and
).
- are points coordinates (X or Y),
- Z coordinates.
We are trying to approximate points with straight line. To do this we are going to find a minimum of the following functional:
where
To solve our problem we should write this functional for each pair of neighbour cells, if at least one of contours lays between them.
For more details see f_cntr_smooth.tex
surfit: gridding and contouring software.