ppicg

command module
v0.0.0-...-f8018e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

* Programming Principles in Computer Graphics
Leendert Ammeraal, 1992 (2nd edition)

Exercises from the book and its supporting graphics library, ported to Go
from [[https://en.wikipedia.org/wiki/Borland_C%2B%2B][Borland C++]].

Copyright (c) 2020-2024 Justin Flude <justin_flude@hotmail.com>.
Use of this source code is governed by the LICENSE file. 

A good primer that gathered dust on my shelves for decades.

Images are output to =ppicg.gif=

[[https://github.com/jflude/ppicg/blob/master/ex4-4.gif][Ex. 4-4]]

Documentation

Overview

This program reads data from any text file containing lines of the form x y code (code = 1: pen down; code = 0: pen up), and displays lines, all fitting into a given viewport. The file name is to be supplied as a program argument.

This program draws 30 arrows, flying counter-clockwise about the center of the screen.

Demonstration of the Cohen-Sutherland line-clipping algorithm.

Curve fitting using B splines

Generation of a random curve.

Demonstration program for polygon filling. The name of an input file must be given as a program argument. This file must contain n pairs of pixel coordinates.

Demonstration program dealing with pixels.

This program draws n x n sets of squares, arranged as on a chess board.

Dividing a polygon into triangles.

Pythagoras' tree.

This program draws 50 squares inside each other.

Directories

Path Synopsis
Implementation of Cohen-Sutherland line clipping.
Implementation of Cohen-Sutherland line clipping.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL