Math graphics using <canvas>

The HTML5 <canvas> element can be used to "draw" 2D graphics, "on the fly" in HTML documents. This "drawing" is done by programming in JavaScript. In JavaScript disabled browsers, the <canvas> remains empty. Older browser versions may not support this element. Unlike SVG, <canvas> graphics are resolution dependent. A <canvas> image can be saved as a raster image (by right clicking the canvas). It is best practice to make the raster image, with textual description, available to users, since content should not be delivered (only) in JavaScript.

View the source code of this page to see how things are done.

An isosceles triangle with incircle and an altitude through apex C, perpendicular to the base AB, intersecting the base in point D.
Fig.1.
Your browser does not support the canvas element.
Fig.2.
A function plot of y = 1/5 * x^3 and y = sin(x). This image in .GIF (334x334, 4.5kB).