FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   need help with the matrix-stack
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: need help with the matrix-stack  (Read 585 times)
der_rabe

343748541343748541 WWW
need help with the matrix-stack
« on: Feb 19th, 2004, 11:26pm »

i am new to the concept of the matrix but i am eager to learn.(yes i want the blue pill, or was it the red?) i was able to figure out how i can rotate a rectangle with the following code.
Code:

  background(0);
  translate(width/2,height/2);
  x += 2;
  if (x == 360)
    x = 0;
  rotate (radians(x));
  rect(-20,-20,40,40);

 But what if i wanna rotate two rectangles now, everyone around its own center. i guess that is when the matrix-stack comes into play. But i don't know how to do this. Anyone willing to help me out?
 

Bernd Salewski
student of digital media
Hochschule Bremen
kevinP

Email
Re: need help with the matrix-stack
« Reply #1 on: Feb 20th, 2004, 9:03am »

Hi Bernd (noch jemand in Bremen),
 
I found this posting last night and thought it was very helpful:
http://processing.org/discourse/yabb/board_Syntax_action_displa_y_num_1065222900.html
 
-K
 

Kevin Pfeiffer
der_rabe

343748541343748541 WWW
Re: need help with the matrix-stack
« Reply #2 on: Feb 20th, 2004, 2:42pm »

hi kevin,  
 
are you from bremen, too?
 
thanks for the link. the thread was a real eye-opener.
 
Bernd
 

Bernd Salewski
student of digital media
Hochschule Bremen
Pages: 1 

« Previous topic | Next topic »