Download nlogo.eso

Back to the list

   1 : C NLOGO     SOURCE    PV        05/09/22    21:21:50     5181           
   2 : C NLOGO     SOURCE    ENSAM     94/09/29    21:15:28     1275
   3 : c subroutine utilisee dans tableau
   4 : c source ensam    aout 94
   5 : 
   6 : 
   7 : ***************************************************
   8 : *
   9 : *  AFFICHE LE LOGO
  10 : *
  11 : ***************************************************
  12 :         SUBROUTINE NLOGO (ICOUL,XPOS,YPOS,ECH)
  13 : *
  14 : *  DEFINITION DES VARIABLES
  15 : *
  16 : *  icoul        couleur
  17 : *  xpos,ypos    position du logo dans la fenetre
  18 : *  ech          echelle du logo
  19 :       IMPLICIT INTEGER(I-N)
  20 :         integer icoul
  21 :         real  xpos,ypos,ech
  22 : *
  23 :         integer ibn,icn,idens
  24 :         real  angle,tcx,tcy,ra,rb,tx(2),ty(2),tz(2),ti,pi
  25 :         real  coef
  26 : *
  27 :         tz(1)=0
  28 :         tz(2)=0
  29 :         ra    = ech/2.2
  30 :         rb    = ech/7.
  31 :         pi    = 4*atan(1.)
  32 :         idens = ech*60.0
  33 :         idens = max(idens,10)
  34 :         idens = min(idens,300)
  35 :         coef  = pi/(real(idens))
  35 :         call chcoul(icoul)
  36 : *
  37 : * TRACE DES BOULES
  38 : *
  39 :           tcx = xpos
  40 :           tcy = ypos
  41 :           do 300 icn=1 , idens
  42 :             ti = real(icn)*coef
  43 :             tx(1) = tcx + cos(ti)*rb
  44 :             ty(1) = tcy + sin(ti)*rb
  45 :             tx(2) = tcx - cos(ti)*rb
  46 :             ty(2) = tcy - sin(ti)*rb
  46 :             call polrl(2,tx,ty,tz)
  47 : 300       continue
  48 :         angle = pi/2.
  49 :         do 500 ibn=1 , 6
  50 :           tcx = xpos + cos(angle)*ra
  51 :           tcy = ypos + sin(angle)*ra
  52 :           do 400 icn=1 , idens
  53 :             ti = real(icn)*coef
  54 :             tx(1) = tcx + cos(ti)*rb
  55 :             ty(1) = tcy + sin(ti)*rb
  56 :             tx(2) = tcx - cos(ti)*rb
  57 :             ty(2) = tcy - sin(ti)*rb
  57 :             call polrl(2,tx,ty,tz)
  58 : 400       continue
  59 :           angle = angle + pi/3.
  60 : 500     continue
  61 : *
  62 : * TRACE DES LIAISONS ENTRE LES BOULES
  63 : *
  63 :         call chcoul(icoul)
  64 :         tx(1) = xpos
  65 :         ty(1) = ypos
  66 :         tx(2) = xpos
  67 :         ty(2) = ypos - ra
  67 :         call polrl(2,tx,ty,tz)
  68 :         tx(2) = xpos
  69 :         ty(2) = ypos + ra
  69 :         call polrl(2,tx,ty,tz)
  70 :         tx(2) = xpos + ra*cos(pi/6.)
  71 :         ty(2) = ypos - ra*sin(pi/6.)
  71 :         call polrl(2,tx,ty,tz)
  72 :         tx(2) = xpos - ra*cos(pi/6.)
  73 :         ty(2) = ypos - ra*sin(pi/6.)
  73 :         call polrl(2,tx,ty,tz)
  74 :         tx(2) = xpos + ra*cos(pi/6.)
  75 :         ty(2) = ypos + ra*sin(pi/6.)
  75 :         call polrl(2,tx,ty,tz)
  76 :         tx(2) = xpos - ra*cos(pi/6.)
  77 :         ty(2) = ypos + ra*sin(pi/6.)
  77 :         call polrl(2,tx,ty,tz)
  78 :         tx(1) = xpos
  79 :         ty(1) = ypos - ra
  80 :         tx(2) = xpos + ra*cos(pi/6.)
  81 :         ty(2) = ypos - ra*sin(pi/6.)
  81 :         call polrl(2,tx,ty,tz)
  82 :         tx(1) = xpos
  83 :         ty(1) = ypos - ra
  84 :         tx(2) = xpos + ra*cos(pi/6.)
  85 :         ty(2) = ypos + ra*sin(pi/6.)
  85 :         call polrl(2,tx,ty,tz)
  86 :         tx(1) = xpos
  87 :         ty(1) = ypos - ra
  88 :         tx(2) = xpos - ra*cos(pi/6.)
  89 :         ty(2) = ypos - ra*sin(pi/6.)
  89 :         call polrl(2,tx,ty,tz)
  90 :         tx(1) = xpos
  91 :         ty(1) = ypos + ra
  92 :         tx(2) = xpos + ra*cos(pi/6.)
  93 :         ty(2) = ypos + ra*sin(pi/6.)
  93 :         call polrl(2,tx,ty,tz)
  94 : *
  95 :         END
  96 : *
  97 : ******   FIN DE LA PROCEDURE   NLOGO   ************
  98 : ***************************************************
  99 :  
 100 :  
 101 :  

© Cast3M 2003 - All rights reserved.
Disclaimer