Thursday 27 January 2011

Block 3 Part 3 started

I've completed the "Spreadsheet basics" and activities in Block 3 Part 3.

I'm fairly handy with MS Excel 2003 to a point, but I've never been great with creating charts, so this has been a really useful set of exercises. Logarithmic scales have been slightly harder to interpret than I anticipated - might need to practice that a bit.

Here's my version of the 2-series chart for Activity 11 (The Grapevine - successive generations of people telling a certain number of others a story):

Block 3 Part 2 Completed

Block 3 Part 2 ("Entertainment and information") is complete.

I've found that I haven't followed my study plan awfully well - I've not studied at all (or only for 20-30 minutes) some days, but have studied for up to 3 hours on other days when the plan suggests 1-1/2 to 2 hours. It all adds up to me being 1-2 weeks ahead of schedule though.

Monday 24 January 2011

I Survived Blue Monday!

Whether it was the 17th or 24th January this year, I appear to have survived "Blue Monday" (and so did my colleagues where I work, I think)!

Plus, I've also finished another section (5) of Block 3 Part 2, concerning signal transmission with a healthy dose of the fundamental mathematics necessary to begin understanding transmission delays. Good stuff!

Friday 21 January 2011

CMA T175 42 Submitted

CMA42 is completed and submitted - looking for a full-house this time ;-)

Wednesday 19 January 2011

Block 3 Part 2 and Interwebnet Woes

Interwebnet has been down for several days, how I survived that long without broadband, I will never quite know :-)

Been cracking on with Block 3 Part 2 - completed:
section 1 ("Bringing the news on the back of a horse")
section 2 ("From newsreels to real news")
section 3 ("Newsgathering now")
- which was all pretty interesting stuff concerned with the development of ICTs in news gathering.

Part-way through section 4 now ("Anatomy of a digital camcorder") which is interesting to me, being a sometime amateur photography enthusiast. The material is showing its age a little though - shows how quickly things move when technical examples seem a little out of date having been written just 5 or 6 years ago!

Tuesday 11 January 2011

Block 3 Part 2 - Introductory Activity (Queensland Floods)

Here's what I came up with for this introductory activity about how ICTs have changed our access to information about the world...


Block 3 Part 2
Introductory Activity

Think of a current event in the news - something that is happening a long way away from where you live (in a different continent, perhaps). Think about what you have seen and heard about it on the television and radio. Have you seen it in live television pictures?
Spend half an hour seeing what you can find on the web about it, especially see how close you can get to it - what local people are saying about it, as reflected in local newspapers, perhaps web-broadcasts of radio stations or even personal web pages or blogs of local residents.

Queensland Floods
Something that is happening at the moment (January 2011) in Queensland, Australia, is a series of devastating flash floods affecting a large number of people.
I have already watched several news stories that included recorded near-live video footage of the flooding events as they occurred, including first-hand interviews with people affected.

bbc.co.uk
A brief search of the news portal in the BBC’s website (bbb.co.uk) revealed the following material:

“Australia floods: 72 missing and at least eight dead” – this article includes direct and paraphrased quotes from the affected regional authorities and unnamed eye witnesses, and a photo of a flooded town street. It was written by the BBC’s ‘correspondent in Australia’, Nick Bryant – who quotes himself within it!

“Australia floods: Brisbane braces for surge” – this article, written by the same author a day later, includes more detail, further quotes, two video clips containing flood footage (one dubbed with an eye-witness interview), a satellite image, a graphical map, and a photo. There are 6 different media in this one relatively short article.

“In pictures: Queensland flash floods” – this page is a slideshow of detailed images of the floods actually occurring and the damage caused, with descriptive captions.

Australian media

The Morning Bulletin, Rockhampton – “Rockhampton Flood update 02/01” – this page from a local newspaper online edition contains 22 photo images of affected homes and people.

The Courier-Mail, Brisbane – “Queensland Premier Anna Bligh says…” – this article from an online newspaper, written by ‘AAP’, includes some statistical information, numerous quotes from Australian authorities, and an animated radar map of local weather. Below the article are submitted readers’ comments, at the time there were 25 comments, but only the last three were available to read. Comment 25 of 25 says:

Help those in need... of Banksia Beach Posted at 4:24 AM Today [12/01/2011]
To Merv of Gympie (25 of 25), This planet has been going through various weather cycles for thousands of years with little input from humans to pollute this planet. We are now going through one of those ever changing cycles. Sure more people are living on this planet, so it is rather obvious that more people will be affected. Was global warming responsible for floods in 1893,1931 and 1974. Move on Merv... Maybe you should drop the climate change expert role and make yourself more useful by coming down to Brisbane and help those unfortunate people that will be affected by the coming floods.

Social Media

Many of the above sources included links to share links or extracts of the material on various social media networks, such as Facebook and Twitter.

“Queensland Floods” – a Facebook page set up by Brisbane based Courier-Mail newspaper “to leave tributes, videos, photos and get info about the Qld Floods”. Contributions of news and information are being posted by the site founders and other media outlets. Contributions of local knowledge and first-hand accounts are being posted by Facebook users that appeared to be people affected by the floods.

Saturday 8 January 2011

Block 3 Part 1 complete!

Completed Block 3 Part 1, WAHOO!

Block 3 Part 1 section 5 Activities


Block 3 Part 1 section 5 (Computer Game Technology) - I thought I'd share my answers for Activities 31 to 34 (images not included):

The Wizardry of Id
D. Kushner
August 2002
IEEE Spectrum.

PART 1 (for Activity 31)
[...] Through its technologically innovative games, Id has had a huge influence on everyday computing, from the high-speed, high-color , and high-resolution graphics cards common in today’s PCs to the marshalling of an army of on-line game programmers and players who have helped shape popular culture. 

[...]

To bring these games to the consumer PC and establish Id as the market leader required skill at simplifying difficult graphics problems and cunning in exploiting on-going improvements in computer graphics cards, processing power, and memory size.
To date, their games have earned over US $1 50 million in sales, according to The NPD Group, a New York City market research firm.

It All Began With a Guy Named Mario
The company owes much of its success to advances made by John Carmack, its 31-year -old lead programmer and cofounder who has been programming games since he was a teenager .

Back in the late 1 980s, the electronic gaming industry was dominated by dedicated video game consoles. Most game software was distributed in cartridges, which slotted into the consoles, and as a consequence, writing games required expensive development systems and corporate backing. 

The only alternative was home computer game programming, an underworld in which amateurs could develop and distribute software. Writing games for the low-powered machines required only programming skill and a love of gaming. 

Four guys with that passion were artist Adrian Carmack; programmer John Carmack (no relation); game designer Tom Hall; and programmer John Romero. While working together at Softdisk (Shreveport, La.), a small software publisher , these inveterate gamers began moonlighting on their own titles.

At the time, the PC was still largely viewed as being for business only. It had, after all, only a handful of screen colors and squeaked out sounds through a tiny tinny speaker . Nonetheless, the Softdisk gamers figured this was enough to start using the PC as a games platform.

First, they decided to see if they could recreate on a PC the gaming industry’s biggest hit at the time, Super Mario Brothers 3. This two-dimensional game an on the Super Nintendo Entertainment System, which drove a regular television screen. The object was to make a moustached plumber , named Mario, leap over platforms and dodge hazards while running across a landscape below a blue sky strewn with puffy clouds. As Mario ran, the terrain scrolled from side to side to keep him more or less in the middle of the screen. To get the graphics performance required, the Nintendo console resorted to dedicated hardware. ‘We had clear examples of console games [like Mario] that did smooth scrolling,’ John Carmack says, ‘but [in 1990] no one had done it on an IBM PC.’

PART 2 (for Activity 32)
After a few nights of experimentation, Carmack figured out how to emulate the side-scrolling action on a PC. In the game, the screen image was drawn, or rendered, by assembling an array of 1 6-by-1 6-pixel tiles. Usually the on-screen background took over 200 of these square tiles, a blue sky tile here, a cloud tile there, and so on. Graphics for active elements, such as Mario, were then drawn on top of the background.

Any attempt to redraw the entire background every frame resulted in a game that ran too slowly, so Carmack figured out how to have to redraw only a handful of tiles every frame, speeding the game up immensely. His technique relied on a new type of graphics card that had become available, and the observation that the player’s movement occurred incrementally, so most of the next frame’s scenery had already been drawn. 

The new graphics cards were known as Enhanced Graphics Adapter (EGA) cards. They had more on-board video memory than the earlier Color Graphics Adapter (CGA) cards and could display 1 6 colors at once, instead of four . For Carmack, the extra memory had two important consequences. First, while intended for a single relatively high-resolution screen image, the card’s memory could hold several video screens’ worth of low-resolution images, typically 300 by 200 pixels, simultaneously, good enough for video games. By pointing to different video memory addresses, the card could switch which image was being sent to the screen at around 60 times a second, allowing smooth animation without annoying flicker . Second, the card could move data around in its video memory much faster than image data could be copied from the PC’s main memory to the card, eliminating a major graphics performance bottleneck.

Carmack wrote a so-called graphics display engine that exploited both properties to the full by using a technique that had been originally developed in the 1 970s for scrolling over large images, such as satellite photographs. First, he assembled a complete screen in video memory, tile by tile - - plus a border one tile wide [Figure 1 5].
If the player moved one pixel in any direction, the display engine moved the origin of the image it sent to the screen by one pixel in the corresponding direction. No new tiles had to be drawn. When the player’s movements finally pushed the screen image to the outer edge of a border , the engine still did not redraw most of the screen. Instead, it copied most of the existing image - - the part that would remain constant - - into another portion of video memory. Then it added the new tiles and moved the origin of the screen display so that it pointed to the new image.

In short, rather than having the PC redraw tens of thousands of pixels every time the player moved, the engine usually had to change only a single memory address - - the one that indicated the origin of the screen image - - or , at worst, draw a relatively thin strip of pixels for the new tiles. So the PC’s CPU was left with plenty of time for other tasks, such as drawing and animating the game’s moving platforms, hostile characters, and the other active elements with which the player interacted.

PART 3 (for Activity 33)
[Carmack] had been experimenting with 3-D graphics ever since junior high school, when he produced wire-frame MTV logos on his Apple II. Since then, several game creators had experimented with first-person 3-D points of view, where the flat tiles of 2-D games are replaced by polygons forming the surfaces of the player’s surrounding environment. The player no longer felt outside, looking in on the game’s world, but saw it as if from the inside. 

The results had been mixed, though. The PC was simply too slow to redraw detailed 3-D scenes as the player’s position shifted. It had to draw lots of surfaces for each and every frame sent to the screen, including many that would be obscured by other surfaces closer to the player .

Carmack had an idea that would let the computer draw only those surfaces that were seen by the player . ‘If you’re willing to restrict the flexibility of your approach,’ he says, ‘you can almost always do something better .’

So he chose not to address the general problem of drawing arbitrary polygons that could be positioned anywhere in space, but designed a program that would draw only trapezoids. His concern at this time was with walls (which are shaped like trapezoids in 3-D), not ceilings or floors.

For his program, Carmack simplified a technique for rendering realistic images on then high-end systems. In raycasting, as it is called, the computer draws scenes by extending lines from the player’s position in the direction he or she is facing. When it strikes a surface, the pixel corresponding to that line on the player’s screen is painted the appropriate color . None of the computer’s time is wasted on drawing surfaces that would never be seen anyway. By only drawing walls, Carmack could raycast scenes very quickly.

Carmack’s final challenge was to furnish his 3-D world with treasure chests, hostile characters, and other objects. Once again, he simplified the task, this time by using 2-D graphical icons, known as sprites. He got the computer to scale the size of the sprite, depending on the player’s location, so that he did not have to model the objects as 3-D figures, a task that would have slowed the game painfully. By combining sprites with raycasting, Carmack was able to place players in a fast -moving 3-D world. The upshot was Hovertank, released in April 1991. It was the first fast-action 3-D first-person action shooter for the PC.
[...]

Instant Sensation
For Id’s next game, Wolfenstein 3D, Carmack refined his code. A key decision ensured the graphics engine had as little work to do as possible: to make the walls even easier to draw, they would all be the same height.

This speeded up raycasting immensely. In normal raycasting, one line is projected through space for every pixel displayed. A 320-by-200-pixel screen image of the type common at the time required 64 000 lines. But because Carmack’s walls were uniform from top to bottom, he had to raycast along only one horizontal plane, just 320 lines [Figure 1 6].

[...]
By this time, Carmack was programming for the Video Graphics Adapter (VGA) cards that had supplanted the EGA cards. VGA allowed 256 colors - - a big step up from EGA’s 1 6, but still a limited range that made it a challenge to incorporate all the shading needed for diminished lighting effects.

The solution was to restrict the palette used for the game’s graphics, so that 16 shades of each of 1 6 colors could be accommodated. Carmack then programmed the computer to display different shades based on the player’s location within a room. The darkest hues of a color were applied to far sections of a room; nearer surfaces would always be brighter than those farther away. This added to the moody atmosphere of the game.

Activity31
How would you describe, in your own words, the content of this first part of the article? Try making yourself a mindmap or a set of brief notes. I felt that it fell naturally into three main sections. Do you agree?

Referring to the first part of “The Wizardry of Id” (D. Kushner, August 2002, IEEE Spectrum)
The article introduces Id as a successful company influential upon everyday computing through technologically innovative games, which it says needed skill and cunning to bring to the PC market.
It introduces the 4 founders who wrote games for PCs at a time when the market was dominated by games consoles more suited to the purpose. They began by trying to recreate the hit game Super Mario Brothers 3.
This part of article seemed to me to be in two parts.

Activity 32
In your own words, write a few sentences about how Carmack managed to speed up the scrolling. Think about the keywords ‘speed’, ‘memory’ and ‘image updating’.

Carmack figured out how to draw only a few 16x16 tiles every frame. The then new EGA graphics cards could hold several screens’ worth of low resolution graphics, and the fact that they could move data around in this memory very quickly. He wrote a graphics engine that exploited these properties by assembling a complete screen in the video memory, adding tiles to the edges as necessary when the game player ‘moved’, then changing the starting address the starting address of the screen image origin to effect ‘scrolling’. This saved the PC having to redraw tens of thousands of pixels every time the player ‘moved’.

Activity 33
(a) What is raycasting? How did Carmack simplify the technique? (b) How did Carmack obtain sufficient shades to produce an adequate display of the gaming environment?

(a) Raycasting is the rendering of scenes by extended lines from the players position to the direction in which they are facing. When a line strikes an object surface, a pixel is rendered in an appropriate colour at that position (this way, object surfaces that would not be seen anyway are not rendered, saving a great deal of time.
Carmack simplified this technique by only rendering walls, and making them all the same height. This meant that instead of having to raycast using up to 64,000 lines (one for each pixel in a 320x200 screen), he only needed to raycast only the horizontal plane, which could be done with just 320 lines.
(b) Carmack obtained sufficient shades to produce an adequate environment display by restricting the colour palette used to 16 shades each of 16 colours (the new VGA cards allowed a maximum of 256 colours on the screen). The darkest shades of these colours were applied in far sections of a room; lighter shades for those closer.

Activity 34
Spend a few minutes reviewing your work on this extract, including your responses to Activities 31- -33. Given my comments on the activities, how satisfied were you with your answers? Did you find parts of the extracts difficult to understand? If so, which?

When compared to the comments given at the end of Activities 31 to 33, I am fairly satisfied with the answers that I have given – with the possible exception of 31, where I could have better described the content of the first part of the article. I extracted relevant technical details (by highlighting text in the study book), and my answers to 32 and 33 compared fairly well with the given comments.
I found the article moderately easy to read, as I had some basic prior knowledge of both video cards, and what raycasting (or “raytracing”) was. I do agree with the study material authors comments about quoted figures not being particularly helpful though!

Wednesday 5 January 2011

Block 3 Part 1 - Compression

Just completed sections 4.1 and 4.2 dealing with compression. I found this really interesting, and tackled the little activities with relish!

Here's my version of the simple compression of a poem extract (it's almost but not quite the same as the given solution):

Activity 26


Now try coding this short extract from a poem by Wendy Cope (1992) by suggesting a dictionary and then encoding the extract:


I am a poet.
I am very fond of bananas.
I am bananas.
I am very fond of a poet.
I am a poet of bananas.
I am very fond.

(a)   Build up a dictionary:

Code
Word(s)
1
I am
2
a poet
3
very fond
4
bananas
5
of

(b)  Encode the poem extract:

1 2.
1 3 5 4.
1 4.
1 3 5 2.
1 2 5 4.
1 3.

Sunday 2 January 2011

Progress in Block 3 Part 1

I've reached section 2.5 of Block 3 Part 1. Much of the material regarding analog/digital comparisons and binary numbers are duplicated in M150, my previous module. It's good to be refreshed though. Here's my answer for activity 15:

Activity 15


A common bitmap format for displaying reasonably high-quality computer images, such as those generated by digital cameras, is to use 24 bits for each pixel.
(a)  How many pixels are required for 1024 x·768 screen resolution?
How many bits of data does this require for each image?
For a resolution of 1024 x 768:
1024 x 768, or
786,432 pixels are required.
Bits of data required if the picture uses 24 bits per pixel:
1024 x 768 x 24, or
18,874,368 bits.
(b)  At the time of writing this, I am still using a ‘56 kbps’ dial-up modem that connects (if I’m lucky) at 44 kbps. Roughly how long would such an image take to download at 44 kbps?
44 kbps = 44,000 bits per second.
Time required to send 18,874,368 bits at 44,000 bits per second is
(18,874,368 / 44,000) seconds, or
c. 429 seconds, or
7 minutes 9 seconds.
(c)  By the time you read this my broadband connection will be installed, operating at 512 kbps, if not more. How long will a single image take to download over a 512 kbps connection?
Time required to send the same image at 512 kbps (512,000 bits per second) is
(18,874,368 / 512,000) seconds, or
c. 37 seconds.
(d)  My DVD drive sends data to a computer processor at about 3 Mbps. Roughly how long would it take to transfer one image? Try to answer this question without using a calculator, by comparing the DVD transfer rate with the broadband rate
The DVD drive is faster than the broadband connection by a factor of 3,000,000 (3 Mbps) to 512,000 (512 kbps), or about 6.
The approximate time taken for the DVD drive to transfer the picture is therefore about (37 / 6) seconds, or
About 6 seconds.


Saturday 1 January 2011

Block 3 Part 1 section 1 Activities

My answers for two of the activities in Block 3 Part 1 (section 1)...

Activity 1:


Figure 2 – representation of a portable DVD player

Some functions performed by the DVD player for each category:

Receives from user
Receives commands to play, rewind, fast forward, etc. from user via buttons or remote control.
Sends to user
Sends audio and video signals to user via LCD screen and speakers.
Manipulates
Manipulates encoded binary data into video signals recognised by the LCD screen.
Stores/Retrieves
Stores user settings such as audio volume, screen brightness, last position reached when playing a DVD.
Retrieves data stored on DVD discs.

Activity 3:

ICT systems in the context of entertainment – availability in time and space:
System
Availability in time
Availability in space
Radio and TV broadcasting
Only at time of broadcast
Any place within range of broadcasting antennae
Film (cinema)
Only at time of showing
Only at a cinema showing the film
Video / DVD
Any time once the video / DVD is physically available
Any place with access to a video / DVD player
The internet
Any time
Any place with access

Christmas All But Over

Happy New Year to everyone!

Christmas is pretty much over bar the shouting (and eating of nuts/biscuits/chocolate), so it's time to begin work on Block 3 of T175...