If I understand correctly, translate(500,500) will translate (0,0) into position (500,500). rotate(PI/2 + PI/2) will rotate the coordinate system clock-wise for PI radians, then a rectangle with respect to this new coordinate system is drawn, with center (0,0), width and height 100 and 400. When I tried the above code, I did see the rectangle, it disappeared and then with a black screen. Could anyone please let me know how to understand this?
Actually, translate(500,500) turns (0,0) into (-500,-500). The translate function moves the graph over by the amount specified(500 right, 500 down). To get the results you are looking for, change
translate(500,500);
into
translate(-500,-500);