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
static void random_polyl(ElFifo<Pt2dr> & f,INT nb)
{
     f.clear();
     for (INT k=0; k<nb ; k++)
         f.pushlast(random_pt());
}