GraPL > Vector Graphics > Examples > Tank volume
 

Tank volume

This is a set of 3 charts which were used to help an investigation into a simple maths challenge. The original problem was to take a sheet of 400 square cm in area and find the largest volume that could be made by cutting out squares from the corners and folding up the sides to form a simple open tank.

On the initial guess that the maximum would be achieved with a square sheet (of side 20 cm) we can easily generate an expression for the volume and plot it against cutout length:


View example as VML View example as SVG

Clearly the volume is zero when the cutout is zero, and again when it is 10 (half the side length). The interesting question is what happens in the middle! It looks as if the maximum is somewhere between 3 and 4, so we can ask GraPL to take the first difference of the volume (using the built-in function Delta) and try plotting that:


View example as VMLView example as SVG

Where this cuts the zero line, the slope of the volume curve is zero, so we have either a maximum or a minimum. We can zoom in on the chart (try it in the SVG viewer) and read off the answer, which is very close to 3.34cm.

Of course we only assumed a square sheet, because that seemed by far the most likely answer. Why not plot side length and cutout length as (x,y) variables, with the volume as the z-variable? This is the point where a computer can really help to visualise what is happening:


View example as VMLView example as SVG

You can clearly make out the optimum cutout size which forms the spine of the surface, and also spot that the square (side length 20) is indeed the best, although there is quite a broad region of reasonable volumes nearby. This type of Response Surface chart is ideal for investigating functions of 2 variables, and the MakeTable built-in function will allow you to construct the grid of data points extremely conveniently.


© Copyright Causeway Graphical Systems Ltd 2000-2007
Telephone: +44 (0)1439 788413