David J. Eck

(Ph.D. in Mathematics, Brandeis University, 1980)

Department of Mathematics and Computer Science
Hobart and William Smith Colleges
Geneva, New York 14456

Office:  Lansing 313
Phone:   (315)781-3398
Fax:     (315)781-3860
E-mail:  eck@hws.edu

Courses That I Teach

Note: I am on leave in Spring 2016.

Coming up in Fall 2016:

CPSC 124: Introductory Programming
Textbook: Introduction to Programming Using Java (a free on-line book)

CPSC 431: Operating Systems
Textbook: Operating Systems Principles & Practice, 2nd edition, by Anderson and Dahlin

Previous Courses:

Here is a list of courses I have taught, including course handouts from many past terms.

And here is a complete list of all the Honors projects and Independent Studies
that I have supervised over my years at Hobart and William Smith Colleges.

Free On-Line Java Text

The first programming course at Hobart and William Smith Colleges covers the Java programming language. Since we started teaching Java in 1996, the textbook for the course has been various versions of a free on-line Java textbook that I wrote for the course. The current version is Introduction to Programming Using Java, Version 7.0. It requires Java 7 or higher. Older versions of the book are also available; see the preface.html for links. The on-line verison of the book is available at the Web address:


The textbook is an introduction to programming and also an introduction to Java directed towards people who do not have any background in programming. You can use it on-line or download a copy for use on your own computer. PDF and print version are also available. Links can be found at the bottom of the main page.

Free Computer Graphics Textbook

New for Fall 2015: An introductory computer graphics textbook, available for use on-line. There are also links on the front page for downloading the web-site version or a PDF version.

The prerequisite for the book is two semesters of computer programming in Java, C/C++, or JavaScript, including a basic knowledge of data structures, objects, and object-oriented programming. It covers core concepts from 2D graphics in Java, JavaScript, and SVG; 3D graphics with old-fashioned OpenGL 1.1; the three.js JavaScript library for 3D Web graphics; and WebGL, the modern version of OpenGL for the Web. There is an appendix with short introductions to the essential features of Java, C, and JavaScript. See the Preface for more information. The book is available at


Some Web Apps, written in JavaScript

For many years, I wrote small web applications as Java applets. However, applets are no longer supported in the Chrome web browser and are only poorly supported, if at all, in other browsers. A more modern alternative to Java Applets is to write web applications in JavaScript, which is well-supported in all modern browsers. (Note that Java and JavaScript are completely different languages, in spite of the names.) One of my projects for my sabbatical leave in Spring 2016 is to learn JavaScript better and to write some JavaScript Web apps. So far, I have ported some of my examples from Java to JavaScript, and added a few new apps that were written originally in JavaScript. The work that I have done so far is available on this page:

David Eck's JavaScript Page

I particularly like the Genetic Algorithms Demo, the Mandelbrot Viewer, the Pentominos Puzzle Solver, and Wallpaper Groups.


I am one of the programmers working on 3D-XplorMath-J, program for math visualization. It is a version written in the Java programming language of an older program, 3D-XplorMath, that only runs on Apple Mac OS computers. The program offers visualizations of plane curves, space curves, surfaces, fractals, and differential equations, with animations and "anaglyph" stereo viewing of 3D objects. The program is free and can be downloaded from its web site, or it can be sampled on-line as a collection of applets. (To use either the program or the applets, your computer must have Java version 5.0 or higher.)

Free CS Theory Textbook

CPSC 229: Foundations of Computer Science is an introductory course in theoretical computer science. It is a required course in the Computer Science major. For several years, the textbook in this course has been a set of notes written by Professors Carol Critchlow and me. This set of notes is now available for reading on-line or for downloading, at no charge. For more information and links to the PDF version of the book, see:


(A printed textbook can be ordered for the cost of reproduction from lulu.com.)

The Most Complex Machine

My introductory computer science textbook, The Most Complex Machine, was published in July, 1995. The book surveys most of the major areas of computer science, and is suitable as a textbook for a first course in computer science. It is also suitable for self-study. A review of in the April '96 issue of CHOICE magazine says that it is "Strongly recommended as a foundation for guided self-study for gifted high-school students, as well as non-computing majors." You can read more about it here. A set of applets and labs for use with the text is freely available on-line.

This book is now quite old, alghough not so out-of-date as most computer books published in the 1990s. The applets, written in an old version of Java, are not as attractive as they could be, but some of them are still quite useful. In particular:

The source code for the applets can be downloaded from this page. You can also get .jar files for running for running the applets as stand-alone programs.

"Java Components for Mathematics" Project

JCM (Java Components for Mathematics) is a project that is attempting to make it easier to write educational mathematical applets for use on Web pages. To learn more about it and to try some of the applets that I've written, check out http://math.hws.edu/javamath/.

xFunctions for Java

My xFunctions applet can be use for playing with and learning about functions. Besides being fun to play with, it is suitable for use in calculus and pre-calculus courses. It was designed to be very easy to use, so that it can be used with very little instructional overhead. It is available for on-line use and for downloading at http://math.hws.edu/xFunctions.

More Java Applets

Besides the software for The Most Complex Machine and my On-line Java Text, I've written a few other Java applets. They might offer a few minutes of diversion, and after all, that's part of what Java is all about. Here are some links:

Some Stuff to Look At

So, I bought Painter 5.0 in the hope that maybe I could somehow become enough of an artist to carry though on this idea I have for a course in Computers and the Arts. Fat chance. However, Painter is sort of fun to play with, and I've saved some of the abstract pictures I've made (all more or less accidently). For example, the image at the top of the page and the one on the right. Since I actually rather like some of them, I figure why not expose myself and let other people see them (if they've made it this far on my page). So here's a small gallery.

Image #1 Image #2 Image #3 Image #4
Image #5 Image #6 Image #7 Image #8
Image #9 Image #10 Image #11 Image #12

And to give equal time to computer-generated (as opposed to computer-facilitated) "Art," here is a sequence of images generated by my Cellular Automata program for Macintosh. The program is available for download earlier on this page. These images will give you some idea of the range of pictures that can be produced by one-dimensional cellular automata:

Image #1 Image #2 Image #3 Image #4 Image #5
Image #6 Image #7 Image #8 Image #9 Image #10

I made the following images as examples for my computer graphics class, CPSC 324, Spring 2001. They were made using several free programs: Gimp, an image manipulation program with capabilities similar to the commercial Photoshop; POV-Ray, a program that creates three-dimensional images using ray-tracing; and Blender, a three-D modeling and image creation program.

Gimp Image #1 Gimp Image #2 POV-ray Image Blender Image #1
Blender Image #2 Blender Image #3 Blender Image #4 Blender Image #5

Recently (as I write in March 2005), I used the famous Mandelbrot set as a programming example. I was surprised to find how few people had heard of it. You can find a lot of information about it on the Internet, as well as many applets for exploring it, but I ended up writing my own Mandelbrot applet anyway. Here are a dozen of the more striking or beautiful pictures that I made with that applet. I've provided the images in several sizes, along with the parameter files that were used with the applet to create the images.

(NOTE: These images were created at twice the height and width stated, and were shrunk down to their current size. This tends to give prettier images.)

Mandelbrot #1 Mandelbrot #2 Mandelbrot #3 Mandelbrot #4
Mandelbrot #5 Mandelbrot #6 Mandelbrot #7 Mandelbrot #8
Mandelbrot #9 Mandelbrot #10 Mandelbrot #11 Mandelbrot #12

Added in 2009: The previous Mandelbrot images were made with an older version of the program. My new version has a palette editor that makes it possible to use prettier and more interesting colors. Here is a link to a gallery of Mandlebrot images (Click on an image on this page, and you can experiment with the image in the applet):

Mandelbrot Gallery

And here is a link to twelve images that I made for a 2010 calendar:

Mandelbrot 2010 Calendar Images

"The Innocent Eye Test" by Mark Tansey (1981)