Skip to main content
Engineering LibreTexts

12.7: Live Demos

  • Page ID
    14106
  • The web site version of this book includes “live” or “interactive” demos. The demos are small programs written as web pages using JavaScript and either HTML canvas graphics or WebGL. Although they are designed to be run as small applications inside other web pages, they can also be run as independent web pages. In the web site download of this book, you can find the demos in the folder named demos, organized by chapter number. They can be run directly from that folder. Note that each of the demos requires certain other files that are contained in the demos folder; if you copy a demo to a different location, be sure to also copy all the files on which it depends.

    The demos from Chapter 2 use the 2D canvas graphics API, which will work in almost all modern web browsers, including Internet Explorer 9 or later. Demos from the remaining chapters use WebGL, which will work with most modern desktop browsers, including Internet Explorer 11 or later, and many browsers on mobile devices. (However, WebGL might have problems in some of these browsers on some machines.)

    The demos in Chapter 3 and Chapter 4 use glsim.js, a JavaScript library that I wrote to simulate a subset of OpenGL 1.1. Information about glsim can be found in glsim/glsim-doc.html. For many of the demos, the reader is not expected to understand the program code for the demo at the point where the demo occurs in the book.