Advertisement
S0lll0s

zerorobotics debris field view

Oct 19th, 2013
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.91 KB | None | 0 0
  1. float[][] pos = {
  2. //MAP_0
  3.   { 0.300000,  -0.300000,  0.100000 },
  4.   { -0.300000,  -0.300000,  0.100000 },
  5.   { 0.100000,  -0.300000,  -0.400000 },
  6.   { -0.100000,  -0.300000,  -0.400000 },
  7.   { 0.350000,  -0.200000,  -0.200000 },
  8.   { -0.350000,  -0.200000,  -0.200000 },
  9.   { 0.100000,  -0.150000,  0.300000 },
  10.   { -0.100000,  -0.150000,  0.300000 },
  11.   { 0.450000,  0.150000,  -0.100000 },
  12.   { -0.450000,  0.150000,  -0.100000 },
  13.   { 0.300000,  0.150000,  0.250000 },
  14.   { -0.300000,  0.150000,  0.250000 },
  15.   { 0.050000,  0.300000,  0.450000 },
  16.   { -0.050000,  0.300000,  0.450000 },
  17.   { 0.200000,  0.350000,  -0.150000 },
  18.   { -0.200000,  0.350000,  -0.150000 },
  19. //MAP_1
  20.   { 0.350000,  -0.350000,  0.050000 },
  21.   { -0.350000,  -0.350000,  0.050000 },
  22.   { 0.100000,  -0.350000,  -0.400000 },
  23.   { -0.100000,  -0.350000,  -0.400000 },
  24.   { 0.500000,  -0.250000,  0.250000 },
  25.   { -0.500000,  -0.250000,  0.250000 },
  26.   { 0.350000,  0.000000,  -0.250000 },
  27.   { -0.350000,  0.000000,  -0.250000 },
  28.   { 0.150000,  0.050000,  0.100000 },
  29.   { -0.150000,  0.050000,  0.100000 },
  30.   { 0.300000,  0.150000,  0.450000 },
  31.   { -0.300000,  0.150000,  0.450000 },
  32.   { 0.100000,  0.300000,  -0.450000 },
  33.   { -0.100000,  0.300000,  -0.450000 },
  34.   { 0.450000,  0.400000,  0.100000 },
  35.   { -0.450000,  0.400000,  0.100000 },
  36. //MAP_2
  37.   { 0.100000,  -0.400000,  0.400000 },
  38.   { -0.100000,  -0.400000,  0.400000 },
  39.   { 0.250000,  -0.250000,  0.150000 },
  40.   { -0.250000,  -0.250000,  0.150000 },
  41.   { 0.200000,  -0.250000,  -0.350000 },
  42.   { -0.200000,  -0.250000,  -0.350000 },
  43.   { 0.450000,  -0.050000,  0.000000 },
  44.   { -0.450000,  -0.050000,  0.000000 },
  45.   { 0.450000,  0.100000,  -0.350000 },
  46.   { -0.450000,  0.100000,  -0.350000 },
  47.   { 0.100000,  0.200000,  -0.250000 },
  48.   { -0.100000,  0.200000,  -0.250000 },
  49.   { 0.250000,  0.250000,  0.350000 },
  50.   { -0.250000,  0.250000,  0.350000 },
  51.   { 0.200000,  0.400000,  0.000000 },
  52.   { -0.200000,  0.400000,  0.000000 },
  53. //MAP_3
  54.   { 0.450000,  -0.350000,  0.100000 },
  55.   { -0.450000,  -0.350000,  0.100000 },
  56.   { 0.250000,  -0.300000,  -0.400000 },
  57.   { -0.250000,  -0.300000,  -0.400000 },
  58.   { 0.100000,  -0.200000,  -0.150000 },
  59.   { -0.100000,  -0.200000,  -0.150000 },
  60.   { 0.300000,  -0.100000,  0.400000 },
  61.   { -0.300000,  -0.100000,  0.400000 },
  62.   { 0.450000,  0.000000,  0.000000 },
  63.   { -0.450000,  0.000000,  0.000000 },
  64.   { 0.050000,  0.200000,  0.150000 },
  65.   { -0.050000,  0.200000,  0.150000 },
  66.   { 0.400000,  0.300000,  -0.250000 },
  67.   { -0.400000,  0.300000,  -0.250000 },
  68.   { 0.200000,  0.350000,  0.450000 },
  69.   { -0.200000,  0.350000,  0.450000 },
  70. //MAP_4
  71.   { 0.250000,  -0.400000,  0.100000 },
  72.   { -0.250000,  -0.400000,  0.100000 },
  73.   { 0.350000,  -0.350000,  -0.300000 },
  74.   { -0.350000,  -0.350000,  -0.300000 },
  75.   { 0.050000,  -0.200000,  0.400000 },
  76.   { -0.050000,  -0.200000,  0.400000 },
  77.   { 0.450000,  -0.100000,  0.000000 },
  78.   { -0.450000,  -0.100000,  0.000000 },
  79.   { 0.100000,  0.050000,  -0.150000 },
  80.   { -0.100000,  0.050000,  -0.150000 },
  81.   { 0.300000,  0.200000,  0.100000 },
  82.   { -0.300000,  0.200000,  0.100000 },
  83.   { 0.150000,  0.350000,  -0.350000 },
  84.   { -0.150000,  0.350000,  -0.350000 },
  85.   { 0.400000,  0.450000,  0.300000 },
  86.   { -0.400000,  0.450000,  0.300000 },
  87. };
  88.  
  89. void setup() {
  90.   size( 800, 600, P3D );
  91. }
  92.  
  93. void draw() {
  94.   background( 100 );
  95.  
  96.   lights();
  97.  
  98.   translate( width/2.0, height/2.0, -100 ); //, -100 );
  99.   rotate( mouseX * TWO_PI / width , 0, 1, 0 );
  100.   rotate( mouseY * TWO_PI / height, 1, 0, 0 );
  101.   scale( 300 );
  102.  
  103.   stroke( 255, 0, 0 );
  104.   line( 0, 0, 0, 0, 1, 0 );
  105.   stroke( 0, 255, 0 );
  106.   line( 0, 0, 0, 0, 0, -1 );
  107.  
  108.   noStroke();
  109.   fill( 255 );
  110.  
  111.   for ( int i = 0; i < 5 * 10; i++ ) {
  112.     pushMatrix();
  113.     translate( pos[i][0], pos[i][1], pos[i][2] );
  114.     sphere( 0.14 );
  115.     popMatrix();
  116.   }
  117.   fill( 255, 0, 0 );
  118.   translate( 0.5, 0.65, 0.0 );
  119.   sphere( 0.05 );
  120.   translate( -1.0, 0.0, 0.0 );
  121.   sphere( 0.05 );
  122. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement