Courses‎ > ‎AP Computer Science 2‎ > ‎konstantinovich‎ > ‎

### 2018-05-31

posted May 31, 2018, 5:46 AM by Konstantinovich Samuel   [ updated May 31, 2018, 12:23 PM ]
 Stuyvesant is forming a partnership with Google to create a project mentorship program that will being next fall. The program will focus on pairing groups of students (1-4) with Google employees who will help them create a substantial software project. There will be an info session for this program TODAY (5/31) at 4pm in room 307. The program will be open to rising Juniors and Seniors.Rotations:float x,y,angle;void setup(){ size(600,600); x = 100; y = 250; angle = radians(45); rectMode(CENTER);}void drawShapeAtAngle(float x,float y,float angle){   pushMatrix();   //change the coordinates for JUST this one object   translate(x,y);   rotate(angle);   rect(0,0,100,100); popMatrix();}void draw(){  background(255);    pushMatrix();//backup the original coordinate system  //Change the coordinates for   //all objects then draw everything.  translate(frameCount % width, frameCount % height);    //Draw all the things you want to draw  ellipse(0,0,20,20);  drawShapeAtAngle(100+x,y,angle+radians(frameCount));  drawShapeAtAngle(100+-x,y,angle+radians(frameCount));    popMatrix();//restore the original coordinate system}