Example #1
0
void PtsOfSquare(ElFifo<Pt2dr> & pts,Pt2dr p0,Pt2dr p1)
{
    pts.set_circ(true);
    pts.clear();
    Pt2dr H = p1 -p0;
    Pt2dr V = H * Pt2dr(0,1);


    pts.pushlast(p0);
    pts.pushlast(p1);
    pts.pushlast(p1+V);
    pts.pushlast(p1+V-H);

}
Example #2
0
void  Approx_poly::pcc_until_stab(ElFifo<INT> & res)
{
    INT nb = one_pass_pcc();

    for (
              INT nb_last = nb+1, step = 1         ;
              (nb_last != nb) && (step < _arg._nb_step) ;
              step++
        )
   {
        nb_last = nb;
        nb = one_pass_pcc();
    }

    res.clear();
    for
    (
           SomApproxPoly * sommet = last_som()  ;
          (sommet != 0)                         ;
          sommet = sommet->_best_anc
    )
           res.pushfirst(index_som(sommet)+_ind0);
}
Example #3
0
static void random_polyl(ElFifo<Pt2dr> & f,INT nb)
{
     f.clear();
     for (INT k=0; k<nb ; k++)
         f.pushlast(random_pt());
}