We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › new window and prospective
Page Index Toggle Pages: 1
new window and prospective (Read 221 times)
new window and prospective
Aug 17th, 2008, 4:44pm
 
Hi,

i need to open another window on my app to run the preview of my exhibition, i read something about createGraphics but i prefer to have a separated window also it doesn't work properly.

Also i've to draw something like the rubik cube, is a cube with an 8x8 panel for each side, the images(combination) on each face is not static, it change everytime, my goal is to rapresent this cube in 3d with the animations running and rotate it to see each side. I tried to draw it in 2d and rotate it but I have some problem with the bottom side(is flat), i think that there is a better way to do that.

this is the function that i use to draw the front and the right side in prospective(just a test)

for(int k=0;k<8;k++){
     for(int i=0;i<8;i++){
       if((quad0[k]&(int)pow(2,i)) == pow(2,i)){
         fill(#ff1f38);
       }
       else {
         fill(#b3b3ad);
       }        
       int x1=x+(i*16);
       int x2=x+15+(i*16);
       int x3=x+15+(i*16);
       int x4=x+(i*16);
       
       int y1=y-(i*16)+(k*26);
       int y2=y-15-(i*16)+(k*26);
       int y3=y-40-(i*16)+(k*26);
       int y4=y-25-(i*16)+(k*26);

       quad(x1,y1,x2, y2, x3, y3, x4, y4);

       rect(xMatrix+(i+1)*17,yMatrix+(k+1)*17,15,15);      
     }
   }
Page Index Toggle Pages: 1