2007Journal of computing sciences in collegesRequires access

GRID401.CPP: a C++ graphics framework program: nifty tools

Brian Shelburne

Open publisher page 0 citations

Abstract

In the Comp 150 Computer Programming I course taught at Wittenberg University, I provide students with a simple graphics frame work program which allows them to write C++ code that generates graphic output. The frame work consists of a 401 x 401 grid, three buttons (Draw, Clear, and Quit) and a simple set of graphic primitives to draw a line, plot a point, set the current color, etc. Students write the code for their own main function, called myMain(), which is called when the Draw button is clicked. The intent is to provide a graphics framework on which to demonstrate various programming techniques, not to teach computer graphics, although by necessity some computer graphics is covered. The Grid401.cpp framework is used both in labs and for programming assignments. Below is a partial list of Grid401.cpp uses 1. Turtle graphics -- counting loops 2. The Sierpinski gasket -- midpoint functions; pseudo-random number generator 3. Drawing rosettes -- using arrays for coordinates 4. Drawing a Greek temple -- functions for rectangles, triangles, circles 5. Drawings using polylines -- reading text files 6. Graphing Functions - 7. Mandelbrot Set -- an application using a complex class 8. Game of Life -- 2 dimensional arrays

About this research paper

What this paper is about

In the Comp 150 Computer Programming I course taught at Wittenberg University, I provide students with a simple graphics frame work program which allows them to write C++ code that generates graphic output. The frame work consists of a 401 x 401 grid, three buttons (Draw, Clear, and Quit) and a simple set of graphic primitives to draw a line, plot a point, set the current color, etc. Students write the code for their own main function, called myMain(), which is called when the Draw button is clicked. The intent is to provide a graphics framework on which to demonstrate various programming techniques, not to teach computer graphics, although by necessity some computer graphics is covered. The Grid401.cpp framework is used both in labs and for programming assignments. Below is a partial list of Grid401.cpp uses 1. Turtle graphics -- counting loops 2. The Sierpinski gasket -- midpoint functions; pseudo-random number generator 3. Drawing rosettes -- using arrays for coordinates 4. Drawing a Greek temple -- functions for rectangles, triangles, circles 5. Drawings using polylines -- reading text files 6. Graphing Functions - 7. Mandelbrot Set -- an application using a complex class 8. Game of Life -- 2 dimensional arrays

Why it matters

A significance statement is not available in the OpenAlex record.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

In the Comp 150 Computer Programming I course taught at Wittenberg University, I provide students with a simple graphics frame work program which allows them to write C++ code that generates graphic output. The frame work consists of a 401 x 401 grid, three buttons (Draw, Clear, and Quit) and a simple set of graphic primitives to draw a line, plot a point, set the current color, etc. Students write the code for their own main function, called myMain(), which is called when the Draw button is clicked. The intent is to provide a graphics framework on which to demonstrate various programming techniques, not to teach computer graphics, although by necessity some computer graphics is covered. The Grid401.cpp framework is used both in labs and for programming assignments. Below is a partial list of Grid401.cpp uses 1. Turtle graphics -- counting loops 2. The Sierpinski gasket -- midpoint functions; pseudo-random number generator 3. Drawing rosettes -- using arrays for coordinates 4. Drawing a Greek temple -- functions for rectangles, triangles, circles 5. Drawings using polylines -- reading text files 6. Graphing Functions - 7. Mandelbrot Set -- an application using a complex class 8. Game of Life -- 2 dimensional arrays

Key concepts: Computer science, Graphics, Computer graphics (images), Set (abstract data type), Code (set theory), Sierpinski triangle, Simple (philosophy), Point (geometry)

Related papers

Back to paper searchBrowse research topicsOriginal source
GRID401.CPP: a C++ graphics framework program: nifty tools — Research Paper | ScholarLens