Engine (circa 1832)
This folder contains some p5.js files that might be of interest. Included are some possibly
useful programs, some demo files, and some how-to files related to p5.js.
The p5.js files have the file type .pjs. My editor has special features for different languages.
It determines the language based on the file type which makes it desirable to distinguish between
The .pjs files assume the necessary p5.js include files are in "/p5js". If you decide to copy the
files to your own computer, you may have to edit the names of those files in the <script> section.
- A general purpose graphing
program It allows rectangular, polar, and parametric functions. It includes
some interesting examples. (Updated 3/17/2021 to allow an enlarged canvas
- Solve f(x) = 0 using 3
different iterative methods. It graphs the function and illustrates
the iteration. Also can solve cubics analytically without
iteration. (Updated 1/26/2021.)
- diffiEq2 Solves 1st, 2nd order, and 3rd order
initial value differential
equations along with systems of up 3 differential equations numerically, plotting the
results. It can also solve 2nd order boundary problems using a shooting method.
If known, the analytical solution can also be plotted allowing one to compare the
actual solution to the numerical solution. Four different numerical methods are
provided. (Updated 4/30/2021 to allow an enlarged canvas
- Charter Plots charts for line, column,
pie, and scatter charts. It can also plot stacked column charts and combination
column and line charts. Simple charts can be created easily but more sophisticated
ones are possible.
Graphing converging Fourier Sine Series
Helps illustrate the convergence of Fourier Series by graphing partial
series sums for three common series.
Files relating to using p5.js
CanvasClass allows one to easily use multiple canvases on the same web
page without the difficulties of instance mode. Over 110 functions and
event handlers are implemented.
The following two programs have been tested with Firefox, Chrome,
Opera and the new Edge browsers. They may not work with the
Edge Legacy browser. They have not been tested with Safari. The are
not intended to be used and have not been tested on smart phones.