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

#### Posted March 3, 2014

#### 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).

Your browser does not support iframes.

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:

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:

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

Therefore the volume of each disk is:

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:

Factoring out the π and the Δx gives:

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:

reverting back to *a* and *b* gives the general equation:

where:

**Citing this post**: **Urbano**, L., 2014. Volumes of Rotation: The Disk Method: 3d with Javascript Three.js, Retrieved March 30th, 2017, from *Montessori Muddle*: http://MontessoriMuddle.org/ .**Attribution (Curator's Code )**: Via: ᔥ Montessori Muddle; Hat tip: ↬ Montessori Muddle.