- /*
-
- Damped and quantised slopes, esp. in monotone scales such as
-
- [c d e f g a b c]
-
- will soon produce the minimal stem-length for one of the extreme
- stems, which is wrong (and ugly). The minimum stemlength should
- be kept rather small, in order to handle extreme beaming, such as
-
- [c c' 'c] %assuming no knee
-
- correctly.
- To avoid these short stems for normal cases, we'll correct for
- the loss in slope, if necessary.
-
- [TODO]
- ugh, another hack. who's next?
- Writing this all down, i realise (at last) that the Right Thing to
- do is to assign uglyness to slope and stem-lengths and then minimise
- the total uglyness of a beam.
- Steep slopes are ugly, shortened stems are ugly, lengthened stems
- are ugly.
- How to do this?
-
- */
-
- Real dx_f = stems_.top ()->hpos_f () - stems_[0]->hpos_f ();
- Real damp_correct_f = paper ()->get_var ("beam_slope_damp_correct_factor");
- Real damped_slope_dy_f = (solved_slope_f_ - slope_f_) * dx_f
- * sign (slope_f_);
- damped_slope_dy_f *= damp_correct_f;
- if (damped_slope_dy_f <= epsilon_f)
- damped_slope_dy_f = 0;
-