Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float[][] pos = {
- //MAP_0
- { 0.300000, -0.300000, 0.100000 },
- { -0.300000, -0.300000, 0.100000 },
- { 0.100000, -0.300000, -0.400000 },
- { -0.100000, -0.300000, -0.400000 },
- { 0.350000, -0.200000, -0.200000 },
- { -0.350000, -0.200000, -0.200000 },
- { 0.100000, -0.150000, 0.300000 },
- { -0.100000, -0.150000, 0.300000 },
- { 0.450000, 0.150000, -0.100000 },
- { -0.450000, 0.150000, -0.100000 },
- { 0.300000, 0.150000, 0.250000 },
- { -0.300000, 0.150000, 0.250000 },
- { 0.050000, 0.300000, 0.450000 },
- { -0.050000, 0.300000, 0.450000 },
- { 0.200000, 0.350000, -0.150000 },
- { -0.200000, 0.350000, -0.150000 },
- //MAP_1
- { 0.350000, -0.350000, 0.050000 },
- { -0.350000, -0.350000, 0.050000 },
- { 0.100000, -0.350000, -0.400000 },
- { -0.100000, -0.350000, -0.400000 },
- { 0.500000, -0.250000, 0.250000 },
- { -0.500000, -0.250000, 0.250000 },
- { 0.350000, 0.000000, -0.250000 },
- { -0.350000, 0.000000, -0.250000 },
- { 0.150000, 0.050000, 0.100000 },
- { -0.150000, 0.050000, 0.100000 },
- { 0.300000, 0.150000, 0.450000 },
- { -0.300000, 0.150000, 0.450000 },
- { 0.100000, 0.300000, -0.450000 },
- { -0.100000, 0.300000, -0.450000 },
- { 0.450000, 0.400000, 0.100000 },
- { -0.450000, 0.400000, 0.100000 },
- //MAP_2
- { 0.100000, -0.400000, 0.400000 },
- { -0.100000, -0.400000, 0.400000 },
- { 0.250000, -0.250000, 0.150000 },
- { -0.250000, -0.250000, 0.150000 },
- { 0.200000, -0.250000, -0.350000 },
- { -0.200000, -0.250000, -0.350000 },
- { 0.450000, -0.050000, 0.000000 },
- { -0.450000, -0.050000, 0.000000 },
- { 0.450000, 0.100000, -0.350000 },
- { -0.450000, 0.100000, -0.350000 },
- { 0.100000, 0.200000, -0.250000 },
- { -0.100000, 0.200000, -0.250000 },
- { 0.250000, 0.250000, 0.350000 },
- { -0.250000, 0.250000, 0.350000 },
- { 0.200000, 0.400000, 0.000000 },
- { -0.200000, 0.400000, 0.000000 },
- //MAP_3
- { 0.450000, -0.350000, 0.100000 },
- { -0.450000, -0.350000, 0.100000 },
- { 0.250000, -0.300000, -0.400000 },
- { -0.250000, -0.300000, -0.400000 },
- { 0.100000, -0.200000, -0.150000 },
- { -0.100000, -0.200000, -0.150000 },
- { 0.300000, -0.100000, 0.400000 },
- { -0.300000, -0.100000, 0.400000 },
- { 0.450000, 0.000000, 0.000000 },
- { -0.450000, 0.000000, 0.000000 },
- { 0.050000, 0.200000, 0.150000 },
- { -0.050000, 0.200000, 0.150000 },
- { 0.400000, 0.300000, -0.250000 },
- { -0.400000, 0.300000, -0.250000 },
- { 0.200000, 0.350000, 0.450000 },
- { -0.200000, 0.350000, 0.450000 },
- //MAP_4
- { 0.250000, -0.400000, 0.100000 },
- { -0.250000, -0.400000, 0.100000 },
- { 0.350000, -0.350000, -0.300000 },
- { -0.350000, -0.350000, -0.300000 },
- { 0.050000, -0.200000, 0.400000 },
- { -0.050000, -0.200000, 0.400000 },
- { 0.450000, -0.100000, 0.000000 },
- { -0.450000, -0.100000, 0.000000 },
- { 0.100000, 0.050000, -0.150000 },
- { -0.100000, 0.050000, -0.150000 },
- { 0.300000, 0.200000, 0.100000 },
- { -0.300000, 0.200000, 0.100000 },
- { 0.150000, 0.350000, -0.350000 },
- { -0.150000, 0.350000, -0.350000 },
- { 0.400000, 0.450000, 0.300000 },
- { -0.400000, 0.450000, 0.300000 },
- };
- void setup() {
- size( 800, 600, P3D );
- }
- void draw() {
- background( 100 );
- lights();
- translate( width/2.0, height/2.0, -100 ); //, -100 );
- rotate( mouseX * TWO_PI / width , 0, 1, 0 );
- rotate( mouseY * TWO_PI / height, 1, 0, 0 );
- scale( 300 );
- stroke( 255, 0, 0 );
- line( 0, 0, 0, 0, 1, 0 );
- stroke( 0, 255, 0 );
- line( 0, 0, 0, 0, 0, -1 );
- noStroke();
- fill( 255 );
- for ( int i = 0; i < 5 * 10; i++ ) {
- pushMatrix();
- translate( pos[i][0], pos[i][1], pos[i][2] );
- sphere( 0.14 );
- popMatrix();
- }
- fill( 255, 0, 0 );
- translate( 0.5, 0.65, 0.0 );
- sphere( 0.05 );
- translate( -1.0, 0.0, 0.0 );
- sphere( 0.05 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement