Difference between revisions of "Assessment 2010 Easy"

From Progzoo
Jump to: navigation, search
(Mordovia)
(1 Chita)
 
(8 intermediate revisions by the same user not shown)
Line 26: Line 26:
 
}
 
}
 
</shell>
 
</shell>
==Adygea==
 
<question className='Raster' imgOut='flag.png' width='250' height='125'>
 
[[Image:flag_of_Adygea.png|frame|Flag of Adygea]]
 
*The flag is 250 by 125
 
*The green is 41,107,14
 
*The yellow is 255,214,0
 
*Radius of each star is 8
 
*9 stars on the circumference of a circle centre (125,105) radius 90
 
*The 9 stars are take from a circle of 20 equally spaced stars
 
*The arrows are at an angle of 40 degrees.
 
<prog><![CDATA[
 
static void drawFlag(Graphics2D g){
 
  g.setColor(new Color(41,107,14));
 
  g.fillRect(0,0,250,125);
 
  g.setColor(new Color(255,214,0));
 
  int n = 20;
 
  double r = 90.0;
 
  for (int i=0;i<9;i++){
 
    double a = i*2*Math.PI/n+2*Math.PI/n;
 
    drawStar(g,125+r*Math.cos(a),105-r*Math.sin(a),8.0);
 
  }
 
  double gap = r*Math.sin(2*Math.PI/n);
 
  drawStar(g,125,105-90+gap,8.0);
 
  drawStar(g,125+gap,105-90+gap,8.0);
 
  drawStar(g,125-gap,105-90+gap,8.0);
 
  drawArrow(g,125,84,0.0);
 
  double ang = 2*Math.PI/9;
 
  drawArrow(g,125,84,-ang);
 
  drawArrow(g,125,84, ang);
 
}
 
static Polygon star = new Polygon(
 
  new int[]{0,22,95,36,59,0,-59,-36,-95,-22},
 
  new int[]{-100,-31,-31,12,81,38,81,12,-31,-31},10);
 
 
static void drawStar(Graphics2D g,double x,double y,double r){
 
  g.translate(x,y);
 
  g.scale(r/100.0,r/100.0);
 
  g.fillPolygon(star);
 
  g.scale(100.0/r,100.0/r);
 
  g.translate(-x,-y);
 
}
 
  
static void drawArrow(Graphics2D g,int x, int y,double a){
 
  g.translate(x,y);
 
  g.rotate(a);
 
  g.drawLine(0,-19,0,30);
 
  Polygon head = new Polygon(new int[]{0, 4,-4},new int[]{-30,-18,-18},3);
 
  g.fillPolygon(head);
 
  int t = 20;
 
  Polygon tail = new Polygon(
 
new int[]{0,  4,  4, 0,-4,-4},
 
new int[]{t,t+4,30+4,30,30+4,t+4},6);
 
  g.fillPolygon(tail);
 
  g.rotate(-a);
 
  g.translate(-x,-y);
 
}
 
]]></prog>
 
</question>
 
  
==Chita==
+
==1 Chita==
 
<question className='Raster' imgOut='flag.png' width='200' height='136'>
 
<question className='Raster' imgOut='flag.png' width='200' height='136'>
 
[[Image:flag_of_Chita.png|frame|Flag of Chita]]
 
[[Image:flag_of_Chita.png|frame|Flag of Chita]]
 
*The flag is 200 by 136
 
*The flag is 200 by 136
 
<prog><![CDATA[
 
<prog><![CDATA[
 +
static void drawFlag(Graphics2D g){
 +
  g.setColor(Color.green);
 +
  g.fillRect(0,0,200,68);
 +
}
 +
]]></prog>
 +
<answer>
 
static void drawFlag(Graphics2D g){
 
static void drawFlag(Graphics2D g){
 
   g.setColor(Color.green);
 
   g.setColor(Color.green);
 
   g.fillRect(0,0,200,68);
 
   g.fillRect(0,0,200,68);
 
   g.setColor(Color.red);
 
   g.setColor(Color.red);
   g.fillRect(0,68,200,68);
+
   g.fillRect(0,68,200,68);
 +
Polygon tri = new Polygon();
 +
  tri.addPoint(0,0);
 +
  tri.addPoint(0,136);
 +
  tri.addPoint(100,68);
 
   g.setColor(Color.yellow);
 
   g.setColor(Color.yellow);
   g.fillPolygon(new Polygon(new int[]{0,100,0},new int[]{0,68,136},3));
+
   g.fillPolygon(tri);
 
}
 
}
]]></prog>
+
</answer>
 
</question>
 
</question>
==Shakha==
+
Now try the next question.
 +
 
 +
==2 Shakha==
 
<question className='Raster' imgOut='flag.png' width='200' height='100'>
 
<question className='Raster' imgOut='flag.png' width='200' height='100'>
 
[[Image:flag_of_Shakha.png|frame|Flag of Shakha]]
 
[[Image:flag_of_Shakha.png|frame|Flag of Shakha]]
Line 110: Line 65:
 
<prog><![CDATA[
 
<prog><![CDATA[
 
static void drawFlag(Graphics2D g){
 
static void drawFlag(Graphics2D g){
  g.setColor(Color.blue);
 
  g.fillRect(0,0,200,67);
 
  g.setColor(Color.white);
 
  g.fillRect(0,68,200,10);
 
  g.fillOval(100-20,34-20,40,40);
 
  g.setColor(Color.red);
 
  g.fillRect(0,78,200,10);
 
  g.setColor(Color.green);
 
  g.fillRect(0,88,200,13);
 
 
}
 
}
 
]]></prog>
 
]]></prog>
Line 124: Line 70:
  
  
==Udmurtia==
+
==3 Udmurtia==
 
<question className='Raster' imgOut='flag.png' width='198' height='100'>
 
<question className='Raster' imgOut='flag.png' width='198' height='100'>
 
[[Image:flag_of_Udmurtia.png|frame|Flag of Udmurtia]]
 
[[Image:flag_of_Udmurtia.png|frame|Flag of Udmurtia]]
Line 132: Line 78:
 
<prog><![CDATA[
 
<prog><![CDATA[
 
static void drawFlag(Graphics2D g){
 
static void drawFlag(Graphics2D g){
  g.setColor(Color.black);
 
  g.fillRect(0,0,66,100);
 
  g.setColor(Color.white);
 
  g.fillRect(66,0,66,100);
 
  g.setColor(Color.red);
 
  g.fillRect(132,0,66,100);
 
  g.translate(99,50);
 
  Polygon p = new Polygon();
 
    p.addPoint(-9,28);
 
    p.addPoint(0,19);
 
    p.addPoint(9,28);
 
    p.addPoint(9,0);
 
    p.addPoint(-9,0);
 
  for (int i=0;i<4;i++){
 
    g.fillPolygon(p);
 
    g.rotate(Math.PI/2);
 
  }
 
 
}
 
}
 
]]></prog>
 
]]></prog>
 
</question>
 
</question>
  
==Mordovia==
+
==4 Mordovia==
 
<question className='Raster' imgOut='flag.png' width='200' height='100'>
 
<question className='Raster' imgOut='flag.png' width='200' height='100'>
 
[[Image:flag_of_Mordovia.png|frame|Flag of Mordovia]]
 
[[Image:flag_of_Mordovia.png|frame|Flag of Mordovia]]
Line 164: Line 93:
 
<prog><![CDATA[
 
<prog><![CDATA[
 
static void drawFlag(Graphics2D g){
 
static void drawFlag(Graphics2D g){
  g.setColor(new Color(160,0,0));
 
  g.fillRect(0,0,200,24);
 
  g.setColor(Color.white);
 
  g.fillRect(0,24,200,54);
 
  g.setColor(new Color(0,0,128));
 
  g.fillRect(0,76,200,24);
 
  g.translate(100,50);
 
  g.setColor(new Color(160,0,0));
 
  Polygon p = new Polygon();
 
    p.addPoint(4,0);
 
    p.addPoint(11,7);
 
    p.addPoint(21,7);
 
    p.addPoint(14,0);
 
    p.addPoint(21,-7);
 
    p.addPoint(11,-7);
 
  for (int i=0;i<4;i++){
 
    g.fillPolygon(p);
 
    g.rotate(Math.PI/2);
 
  }
 
 
}
 
}
 
]]></prog>
 
]]></prog>
 
</question>
 
</question>
 +
 +
==5 Kurgan==
 +
<question className='Raster' imgOut='flag.png' width='200' height='134'>
 +
[[Image:flag_of_Kurgan.png|frame|Flag of Kurgan]]
 +
*The flag is 200 by 134
 +
*The green is 4,164,84
 +
*The leftmost point of the mountain is at 23,44
 +
*The base of one mountain is 44
 +
<prog><![CDATA[
 +
static void drawFlag(Graphics2D g){
 +
}
 +
]]></prog>
 +
</question>
 +
{{Assessment 2010}}

Latest revision as of 10:06, 16 June 2011

Flags of regions of Russia


1 Chita

Flag of Chita
  • The flag is 200 by 136


[Font] [Default] [Show] [Resize] [History] [Profile]

Now try the next question.

2 Shakha

Flag of Shakha
  • The flag is 200 by 100
  • The stripe blue is 68 high
  • The white stripe is 10 high
  • The red stripe is 10 high
  • The circle has radius 20


[Font] [Default] [Show] [Resize] [History] [Profile]


3 Udmurtia

Flag of Udmurtia
  • The flag is 198 by 100
  • The width of the cross is 56
  • The width of the arm of a cross is 18


[Font] [Default] [Show] [Resize] [History] [Profile]

4 Mordovia

Flag of Mordovia
  • The flag is 200 by 100
  • The red is 160,0,0
  • The blue is 0,0,128
  • Each chevron is 4 from the centre
  • Each chevron has width 14
  • Each chevron has longest side 10


[Font] [Default] [Show] [Resize] [History] [Profile]

5 Kurgan

Flag of Kurgan
  • The flag is 200 by 134
  • The green is 4,164,84
  • The leftmost point of the mountain is at 23,44
  • The base of one mountain is 44


[Font] [Default] [Show] [Resize] [History] [Profile]