# Assessment 2012 Hard

Each of these flags is worth 20 points.

## São Paulo

• 300 by 208
• You may use the lists of numbers for the outline of Brazil
• The first point is (281,144) the second is (288,143)...
• The outline will be too large by a factor of 12
• Use colors 222,24,24 and 255,239,8 and 8,8,107 plus black and white of course
• The stars have radius 10
São Paulo

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

## Brazil

• 800 by 600
• The array sts is a list of triples for example 1,-600,-132
• The 1 indicates the star size
• The -600,-132 are the x,y coordinates relative to the centre
• Stars size 1 have radius 31.5; size 2 have radius 26.25 etc.
• All of these values for stars will need to be scaled down by a factor of 5
• The blue disk has radius 140
• The white band (the ecliptic) has width 16
• The ecliptic is a circle radius 280
• The ecplitic intersects the blue disk at two points on a diameter
• The diameter is at an angle of 16° from horizontal
• To do the clipping properly you will need a line such as
```java.awt.geom.Ellipse2D e = new java.awt.geom.Ellipse2D.Double();
```
Brazil

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

## Mandelbrot

• 256 by 256
• The example show the plot
• x is -1.5 through to 0.5
• y is -1 through to 1
• The space is divided into 64x64, each point is tested to 50 iterations
• A disk is drawn if we pass 50 iterations without x or y going over 2
• At each point (a,b):
• Set (x,y) to (0,0)
• Set (x',y') to (x*x-y*y+a,2*x*y+b)
• Repeat until x or y get too large or 50 interations have been tried
Mandelbrot

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

## Sierpinski

• 256 by 256
• The Sierpinski triangle has holes in it
• Color the holes, according to size, using the sequence:
```static Color[]cls = new Color[]{
new Color(255,0,0),
new Color(255,128,128),
new Color(192,255,192),
new Color(192,192,255),
new Color(255,192,192),
Color.white,
Color.white
};
```
Sierpinski

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

## Data Display

Line: 123 DOMDocument::loadXML(): Opening and ending tag mismatch: prog line 11 and answer in Entity, line: 194