# Volumes of Rotation: The Disk Method: 3d with Javascript Three.js

#### by Lensyl Urbano

Finally, relatively easy interactive 3d on the web. You can rotate and zoom into the scene. (Although it may not yet be compatible with all browsers it does work with Firefox at least).

This method uses the three.js Javascript library. Here I use it to show the volume of a rotated surface using the disk method. It’s almost identical to my calculus student’s project, except here I’m finding the volume between x=1 and x=3, using disks that are 0.5 units in height (Δx).

Since the volume of cylinder is:

$V_{cylinder} = \pi r^2 h$

where r is the radius of the cylinder.

We’re finding the volume created by a function that’s rotated around the x-axis. Using the function:

$y = -\frac{x^2}{4}+4$

The radius of each cylinder is the value of the function for that x value, so you could write the radius as:

$R(x) = -\frac{x^2}{4}+4$

Therefore the volume of each disk is:

$V_{disk} = \pi R(x)^2 \Delta x$

There are four disks and we use the function value at the far end of the disk to draw the disk so the total volume is:

$V = \pi R(1.5)^2 \Delta x + \pi R(2.0)^2 \Delta x + \pi R(2.5)^2 \Delta x + \pi R(3.0)^2 \Delta x$

Factoring out the π and the Δx gives:

$V = \pi \Delta x \left(R(1.5)^2 + R(2.0)^2 + R(2.5)^2 + R(3.0)^2 \right)$

Since Δx = 0.5, a = 1.0, and b = 3.0, we can define the number of disks as n = 4 then we can rewrite using summation formula:

$V = \pi \Delta x \sum\limits_{i=1}^n R(1.0+i \Delta x)^2$

reverting back to a and b gives the general equation:

$V = \pi \Delta x \sum\limits_{i=1}^n R(a+i \Delta x)^2$

where:
$n = \frac{b-a}{\Delta x}$

Citing this post: Urbano, L., 2014. Volumes of Rotation: The Disk Method: 3d with Javascript Three.js, Retrieved April 22nd, 2018, from Montessori Muddle: http://MontessoriMuddle.org/ .
Attribution (Curator's Code ): Via: Montessori Muddle; Hat tip: Montessori Muddle.