/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        T E S T   D E   L A   B O U T E I L L E   D E   J E E N E R - K L E I N  :                                                 */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xtc/bKlein.41$c' :                                                                                             */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, 20021120153528).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

#include  <stdio.h>
#include  <math.h>

extern    double    cos();
extern    double    sin();
extern    double    sqrt();

main()
     {
     double    u,um=-0.01,uM=+0.01,pu=0.01;
     double    v,vm=-0.01,vM=+0.01,pv=0.01;

     for       (u=um ; u<=uM ; u=u+pu)
               {
               for       (v=vm ; v<=vM ; v=v+pv)
                         {
                         double    w,dx,dy,rxy;
                         double    x,y,z;

                         w = (2*sin(u))+3;
                         dx = (4*cos(u)) - (4*cos(2*u));
                         dy = -12*sin(u);

                         rxy = sqrt((dx*dx)+(dy*dy));

                         if        (rxy == 0)
                                   {
                                   printf("\n ATTENTION, 'rxy' est nul au point (u,v)=(%f,%f)",u,v);
                                   }
                         else
                                   {
                                   x = (4*sin(u)) - (2*sin(2*u)) - ((dy*w*cos(v))/rxy);
                                   y = (12*sin(u)) + ((dx*w*cos(v))/rxy);
                                   z = w*sin(v);

                                   printf("\n point(%f,%f)=(%f,%f,%f)",u,v,x,y,z);
                                   }
                         }
               }
     }



Copyright © Jean-François COLONNA, 2021-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2021-2024.