Screens & 2D Graphics: Crash Course Computer Science #23

Screens & 2D Graphics: Crash Course Computer Science #23

New Section

In this section, Carrie Anne introduces the 1960 PDP-1 computer and explains how early computer screens were used for text-based and graphical tasks.

Early Computing with Graphics

  • Early computer screens had difficulty rendering crisp text, so typed paper offered higher contrast and resolution.
  • Screens were primarily used to keep track of a program's operation, while program output was typically written on paper.
  • Cathode Ray Tubes (CRTs) were the earliest and most influential display technology, using electron beams to create images on phosphor-coated screens.

Vector Scanning vs Raster Scanning

  • Vector scanning involved directing an electron beam to trace out shapes, creating solid images by repeating the path quickly.
  • Raster scanning involved following a fixed path line by line from top left to bottom right, turning on the electron beam at specific points to create graphics.
  • With raster scanning, shapes and even text could be displayed using little line segments.

Evolution of Display Technologies

  • As display technologies improved, it became possible to render crisp dots onto screens known as pixels.
  • Early computers did not use pixels extensively due to memory limitations. A 200x200 pixel image would consume significant memory.
  • Instead of storing pixels, early computers stored a smaller grid of letters using ASCII encoding.

Character Generators

  • To render text on screens efficiently, computers used character generators that read characters from RAM and converted them into raster graphics.
  • Character generators had access to a portion of a computer's memory called the screen buffer reserved for graphics.
  • This approach required less memory but limited drawing capabilities to text only.

Extensions to ASCII

  • Various extensions to ASCII were made that added semigraphical characters like IBM's CP437 character set used in DOS.
  • Text color and background color could be defined with extra bits, allowing rudimentary graphical interfaces using character sets.

Limitations of Character Generators

  • While character generators saved memory, they did not provide a way to draw arbitrary shapes.
  • Drawing content like electrical circuits, architectural plans, and maps required other techniques such as vector graphics.

New Section

In this section, Carrie Anne explains how vector graphics were used to draw complex shapes without consuming excessive memory.

Vector Graphics

  • Vector graphics allowed the drawing of complex shapes by defining paths for the electron beam to follow.
  • By manipulating electromagnetic fields, the electron beam's path could be controlled both horizontally and vertically.
  • This approach was more memory-efficient compared to storing pixels but required additional hardware and algorithms.

Advantages of Vector Graphics

  • Vector graphics enabled the representation of various types of content beyond text, such as electrical circuits, architectural plans, and maps.
  • They provided scalability without loss of quality since shapes were defined mathematically rather than pixel-based.

Challenges with Memory Consumption

  • Early computers had limited memory capacities, making it challenging to store large amounts of graphical data.
  • Clever tricks were employed to optimize memory usage until computer memory sizes caught up with the demand for more detailed graphics.

Conclusion

Vector graphics revolutionized computer displays by allowing the creation of complex shapes without consuming excessive memory. This opened up possibilities for representing diverse types of content beyond text on early computer screens.

Introduction to Vector Graphics

In this section, the video introduces vector graphics and explains how they are represented using vector commands. It also highlights the efficiency of vector graphics compared to pixel-based graphics.

Vector Graphics and Vectrex System

  • Vector graphics are represented using vector commands borrowed from the Vectrex system.
  • The video uses a Cartesian plane analogy to explain how vector graphics work.
  • The drawing point is moved using commands like reset and move, allowing for precise control over shapes.
  • Vector instructions are stored in memory and rendered by a vector graphics card, enabling complex graphics with fewer bits than pixel-based systems.

Early Applications of Vector Graphics

  • Spacewar! was one of the earliest video games built on a PDP-1 in 1962 using vector graphics.
  • Sketchpad, developed in 1962, introduced an interactive graphical interface and is considered the earliest example of complete graphical application.
  • Sketchpad utilized a light pen as an input device for interacting with graphics.

Efficiency of Vector Graphics

This section emphasizes the efficiency of storing and rendering vector instructions compared to pixel-based systems.

Compact Storage

  • Storing vectors as instructions consumes fewer bits compared to storing pixel values in a matrix.
  • Sequentially packed commands in the screen buffer allow for building up complex graphics efficiently.

Dynamic Graphics and Animation

  • Vector instructions stored in memory can be updated freely by computer programs, enabling dynamic graphics that change over time.
  • Animation became possible through manipulating stored vectors.

Early Milestones: Spacewar! and Sketchpad

This section explores two significant milestones in the history of computer graphics: Spacewar! as an early game utilizing vector graphics, and Sketchpad as an interactive graphical interface with CAD capabilities.

Spacewar!

  • Spacewar!, developed in 1962, was built on a PDP-1 and used vector graphics.
  • It inspired later games like Asteroids and Computer Space, the first commercial arcade video game.

Sketchpad and CAD

  • Sketchpad, developed in 1962 by Ivan Sutherland, introduced an interactive graphical interface with CAD capabilities.
  • It utilized a light pen as an input device to interact with graphics.
  • Sketchpad allowed users to create complex designs, save them, and share them with others.

Turning Point: Computers as Interactive Assistants

This section highlights how computers transitioned from being number-crunching machines to interactive assistants through advancements in computer graphics.

Changing Perception of Computers

  • Early computers were perceived as cabinet-sized math machines that operated behind closed doors.
  • Spacewar! and Sketchpad represented a turning point by demonstrating the potential of computers as interactive assistants.

Bitmapped Displays

This section introduces bitmapped displays and explains how pixel data is stored in memory for full control over graphics.

Bitmapped Displays

  • Bitmapped displays emerged in the late 1960s, allowing direct mapping of bits in memory to pixels on the screen.
  • Pixel values are stored in a frame buffer region of memory.
  • High-speed Video RAM (VRAM) on graphics cards replaced computer RAM for faster access to pixel data.

Manipulating Pixels on Bitmapped Screens

This section demonstrates how pixel manipulation is done on bitmapped screens using code examples.

Setting Pixel Intensity

  • On an 8-bit grayscale screen, pixel intensity ranges from 0 (black) to 255 (white).
  • Early displays might not support white color accurately.

Drawing Lines and Rectangles

  • Code loops can be used to draw lines or rectangles by setting multiple pixels to desired values.
  • Rectangles can be filled with a specific color by looping through the pixel coordinates.

Conclusion

This section concludes the video by summarizing the concepts discussed and highlighting the ability of computer programs to manipulate pixel data for graphics.

Manipulating Pixel Data

  • Like other graphics schemes, bitmapped screens allow computer programs to manipulate pixel data.
  • Graphics can be created, modified, and rendered using code instructions that control individual pixels.

The timestamps provided are approximate and may not align perfectly with the actual video.

Interactive Computing and Its Evolution

This section discusses the evolution of interactive computing and the disparity between electro-mechanical teletype machines/terminals and computers with interactive graphical screens in the United States.

The Expensive Nature of Interactive Computing

  • Interactive computing remained expensive for decades.
  • In 1971, there were approximately 70,000 electro-mechanical teletype machines and terminals in use in the United States.
  • Surprisingly, there were only around 1,000 computers in the US that had interactive graphical screens.

No specific timestamps were provided for this section.

Playlists: Computer Science
Video description

Today we begin our discussion of computer graphics. So we ended last episode with the proliferation of command line (or text) interfaces, which sometimes used screens, but typically electronic typewriters or teletypes onto paper. But by the early 1960s a number of technologies were introduced to make screens much more useful from cathode ray tubes and graphics cards to ASCII art and light pens. This era would mark a turning point in computing - computers were no longer just number crunching machines, but potential assistants interactively augmenting human tasks. This was the dawn of graphical user interfaces which we’ll cover more in a few episodes. Pre-order our limited edition Crash Course: Computer Science Floppy Disk Coasters here! https://store.dftba.com/products/computer-science-coasters Produced in collaboration with PBS Digital Studios: http://youtube.com/pbsdigitalstudios Want to know more about Carrie Anne? https://about.me/carrieannephilbin The Latest from PBS Digital Studios: https://www.youtube.com/playlist?list=PL1mtdjDVOoOqJzeaJAV15Tq0tZ1vKj7ZV Want to find Crash Course elsewhere on the internet? Facebook - https://www.facebook.com/YouTubeCrash... Twitter - http://www.twitter.com/TheCrashCourse Tumblr - http://thecrashcourse.tumblr.com Support Crash Course on Patreon: http://patreon.com/crashcourse CC Kids: http://www.youtube.com/crashcoursekids