Rafpast

draw

Jan 14th, 2021 (edited)
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.18 KB | None | 0 0
  1. void draw() {
  2.  
  3.   calculate_delta_time();
  4.   background(120);
  5.   drawBorders();
  6.  
  7.   switch(mode) {
  8.   case 1: //1 - gravitation
  9.     if (field)
  10.     {
  11.       centralFieldManagement();
  12.     } else
  13.     {
  14.       homogeneousFieldManagement();
  15.     }
  16.    
  17.     break;
  18.   case 2: //2 - pendulum
  19.     if (pendul)
  20.     {
  21.       singlePendulumManagement();
  22.     } else
  23.     {
  24.       dublePendulumManagement();
  25.     }
  26.     break;
  27.   case 3: //3 - programs on whole screen
  28.     background(0);
  29.  
  30.     if (wholeScreen)
  31.     {
  32.       noFill();
  33.       table.show();
  34.     } else
  35.     {
  36.       seq.drawing();
  37.     }
  38.     fill(200, 200, 200);
  39.     break;
  40.   case 4: // 4 - strenge circles
  41.     if (cirOrNpendul)
  42.     {
  43.       strangeCirclesManagement();
  44.     } else
  45.     {
  46.       nPendulManagement();
  47.     }
  48.     break;
  49.   case 5: // 5 - fourier transformation
  50.     noFill();
  51.     background(0);
  52.     fourier.show();
  53.     break;
  54.   }
  55.  
  56.   textSize(20);
  57.   fill(10, 10, 10);
  58.  
  59.   if (mode == 3 || mode == 4|| mode == 5)
  60.   {
  61.     fill(200, 200, 200);
  62.   }
  63.  
  64.   if (!stopStart)
  65.   {
  66.     contextMenu(currentIndex);
  67.     changePositionByTheMouse(currentIndex);
  68.   }
  69.  
  70.   checkingIfMouseIsOver();
  71.   ButtonManagement();
  72. }
Add Comment
Please, Sign In to add comment