/*************************************************************************************************************************************/
/* */
/* D E F I N I T I O N S R E L A T I V E S A U R E C U I T S I M U L E : */
/* */
/* */
/* Author of '$xrk/recuit_2D.19$I' : */
/* */
/* Jean-Francois Colonna (LACTAMME, 1994??????????). */
/* */
/*************************************************************************************************************************************/
/*===================================================================================================================================*/
/*************************************************************************************************************************************/
/* */
/* M E M O R I S A T I O N D U P O I N T C O U R A N T : */
/* */
/*************************************************************************************************************************************/
Bblock
DoIn(point,PREMIER_POINT_DU_RESEAU,DERNIER_POINT_DU_RESEAU,I)
Bblock
EGAL(cx,ASD1(ACCES_POINT(point),x));
EGAL(cy,ASD1(ACCES_POINT(point),y));
EGAL(cz,ASD1(ACCES_POINT(point),z));
/* Recuperation de la position du point courant (cx,cy,cz)... */
EGAL(dcx,ACCES_ROUGE(point));
EGAL(dcy,ACCES_VERTE(point));
EGAL(dcz,ACCES_BLEUE(point));
/* Forcage arbitraire des derivees (dcx,dcy,dcz) au point courant. */
CALS(memorisation_1_point_08(SOUS(cx,Xcentre_ESPACE)
,SOUS(cy,Ycentre_ESPACE)
,SOUS(cz,Zcentre_ESPACE)
,dcx
,dcy
,dcz
,numero_des_points
,MUL2(grossissement_du_rayon_de_visualisation_des_points
,rayon_de_visualisation
)
)
);
/* Memorisation du point courant... */
Eblock
EDoI
Test(IL_FAUT(materialiser_les_connexions))
Bblock
DoIn(pointI,PREMIER_POINT_DU_RESEAU,DERNIER_POINT_DU_RESEAU,I)
Bblock
DoIn(pointJ,PREMIER_POINT_DU_RESEAU,DERNIER_POINT_DU_RESEAU,I)
Bblock
Test(IFET(EST_VRAI(ACCES_CONNEXION(pointI,pointJ)),IFGT(pointI,pointJ)))
Bblock
/* Cas ou les points 'pointI' et 'pointJ' sont 4-connectes : on materialise la connexion... */
/* Le test 'IFGT(...)' est du au fait que si 'pointI' et 'pointJ' sont 4-connectes, alors */
/* 'pointJ' et 'pointI' le sont aussi, et qu'il ne faut donc pas materialiser deux fois la */
/* connexion... */
Repe(NOMBRE_DE_POINTS_SUR_UNE_CHAINE_DE_CONNEXION)
Bblock
DEFV(Float,INIT(lambda
,ADD2(COORDONNEE_BARYCENTRIQUE_MINIMALE
,SCAL(compteur_des_repetitions_du_Repe
,SOUS(ADD3(UN,NOMBRE_DE_POINTS_SUR_UNE_CHAINE_DE_CONNEXION,UN)
,PREMIERE_ITERATION_D_UN_Repe
)
,SOUS(COORDONNEE_BARYCENTRIQUE_MAXIMALE
,COORDONNEE_BARYCENTRIQUE_MINIMALE
)
)
)
)
);
/* Definition de la coordonnee barycentrique d'interpolation des coordonnees et des */
/* couleurs des points de l'espace. On notera le 'ADD3(UN,...,UN)' destine a prendre en */
/* compte le fait que 'NOMBRE_DE_POINTS_SUR_UNE_CHAINE_DE_CONNEXION' exclut les extremites */
/* qui correspondent aux points du reseau eux-memes. On notera que 'lambda' ne peut etre */
/* egal ni a 'COORDONNEE_BARYCENTRIQUE_MINIMALE' ni a 'COORDONNEE_BARYCENTRIQUE_MAXIMALE' */
/* et qu'ainsi on ne va pas reprendre en compte les extremites de la chaine qui ont deja */
/* ete marques juste avant... */
EGAL(cx,BARY(ASD1(ACCES_POINT(pointI),x),ASD1(ACCES_POINT(pointJ),x),lambda));
EGAL(cy,BARY(ASD1(ACCES_POINT(pointI),y),ASD1(ACCES_POINT(pointJ),y),lambda));
EGAL(cz,BARY(ASD1(ACCES_POINT(pointI),z),ASD1(ACCES_POINT(pointJ),z),lambda));
/* Recuperation de la position du point courant (cx,cy,cz)... */
EGAL(dcx,BARY(ACCES_ROUGE(pointI),ACCES_ROUGE(pointJ),lambda));
EGAL(dcy,BARY(ACCES_VERTE(pointI),ACCES_VERTE(pointJ),lambda));
EGAL(dcz,BARY(ACCES_BLEUE(pointI),ACCES_BLEUE(pointJ),lambda));
/* Forcage arbitraire des derivees (dcx,dcy,dcz) au point courant. */
CALS(memorisation_1_point_08(SOUS(cx,Xcentre_ESPACE)
,SOUS(cy,Ycentre_ESPACE)
,SOUS(cz,Zcentre_ESPACE)
,dcx
,dcy
,dcz
,numero_des_points
,NEUT(rayon_de_visualisation)
)
);
/* Memorisation du point courant... */
Eblock
ERep
Eblock
ATes
Bblock
/* Cas ou les points 'pointI' et 'pointJ' ne sont pas 4-connectes... */
Eblock
ETes
Eblock
EDoI
Eblock
EDoI
Eblock
ATes
Bblock
Eblock
ETes
Eblock