Settings

Foam Thickness:
Plexiglass Thickness:
Scale to (cm):
Precision:
Note: All measurements are in centimeters
Settings are currently set to final project specifications


Project Description

Foam Δx = .52 cm

Plexiglass Δx = .31 cm

This is the mathmatics behind the physical construction of an object based off of mathmatical equations that defined the radius of this object.
Using these mathmatical equations, we can then determine the volume of this object. We can also simulate using a Riemann Sum by cutting out slices that are defined by these equations. The main function of this script is to calculate those slices' radii, so that they can be physically constructed.

For this project, we decided to use a Plasmid from the first Bioshock as our object, pictured right.

Considering that our obejct had to be constructed out of slices of materials, we decided that we would make our Plasmid out of a combination of Foam and Plexiglass, so that we could make the center glow, as it does in the game. The measured thickness of our Foam was .52cm and the measured thickness of our Plexiglass was .31cm.

For the mathmatics behind this project, we decided to use a script that would determine the radius of all of the slices that we would have to make, based upon some passed variables and equations.

The basic framework of the script was already being developed before we knew what the thickness of our slices were going to be, so we decided to make the script accept any thickness and recompute all of the computed values to compensate.

The basic algorithm of the script is that it takes in all of the variables and equations, and then returns a list of the slices' x-coordinates ("vertical positions") and their radius, along with a computed Riemann Sum of all of the calculated slices. There were some additional specifications, but these were the basic design specifications.

There are many mathmatical processes working behind the scenes to make this project work, but some of the more important are the following:


Bioshock Plasmid

























Slice Calculations

Equation 1
f(x) = -0.01416736*x^2 + 0.35952504*x + 3.22012349
a = 0
b = 11.17
Absolute Beginning: 0
Height: 11.17
Foam Slices: 3 (always)
Plexiglass Slices: 31
Total Slices: 34
Offset: 0
    a: 0
    b: 11.17

Slice 0
Slice at x=0
Absolute x Position (inc. offset): 0
Radius: 3.22 cm
Diameter: 6.44 cm
Volume: 16.94 cm3

Slice 1 - Washer

Slice at x=0.52
Absolute x Position (inc. offset): 0.52
Radius: 3.4 cm
Diameter: 6.8 cm
Volume: 4.8 cm3
Whole Volume: 11.26

Slice 2 - Washer

Slice at x=0.83
Absolute x Position (inc. offset): 0.83
Radius: 3.51 cm
Diameter: 7.02 cm
Volume: 5.54 cm3
Whole Volume: 12

Slice 3 - Washer

Slice at x=1.14
Absolute x Position (inc. offset): 1.14
Radius: 3.62 cm
Diameter: 7.24 cm
Volume: 6.3 cm3
Whole Volume: 12.76

Slice 4 - Washer

Slice at x=1.45
Absolute x Position (inc. offset): 1.45
Radius: 3.72 cm
Diameter: 7.44 cm
Volume: 7.02 cm3
Whole Volume: 13.48

Slice 5 - Washer

Slice at x=1.76
Absolute x Position (inc. offset): 1.76
Radius: 3.8 cm
Diameter: 7.6 cm
Volume: 7.6 cm3
Whole Volume: 14.06

Slice 6 - Washer

Slice at x=2.07
Absolute x Position (inc. offset): 2.07
Radius: 3.9 cm
Diameter: 7.8 cm
Volume: 8.35 cm3
Whole Volume: 14.81

Slice 7 - Washer

Slice at x=2.38
Absolute x Position (inc. offset): 2.38
Radius: 3.99 cm
Diameter: 7.98 cm
Volume: 9.04 cm3
Whole Volume: 15.5

Slice 8 - Washer

Slice at x=2.69
Absolute x Position (inc. offset): 2.69
Radius: 4.08 cm
Diameter: 8.16 cm
Volume: 9.75 cm3
Whole Volume: 16.21

Slice 9 - Washer

Slice at x=3
Absolute x Position (inc. offset): 3
Radius: 4.17 cm
Diameter: 8.34 cm
Volume: 10.47 cm3
Whole Volume: 16.93

Slice 10 - Washer

Slice at x=3.31
Absolute x Position (inc. offset): 3.31
Radius: 4.26 cm
Diameter: 8.52 cm
Volume: 11.21 cm3
Whole Volume: 17.67

Slice 11 - Washer

Slice at x=3.62
Absolute x Position (inc. offset): 3.62
Radius: 4.34 cm
Diameter: 8.68 cm
Volume: 11.88 cm3
Whole Volume: 18.34

Slice 12 - Washer

Slice at x=3.93
Absolute x Position (inc. offset): 3.93
Radius: 4.41 cm
Diameter: 8.82 cm
Volume: 12.48 cm3
Whole Volume: 18.94

Slice 13 - Washer

Slice at x=4.24
Absolute x Position (inc. offset): 4.24
Radius: 4.49 cm
Diameter: 8.98 cm
Volume: 13.17 cm3
Whole Volume: 19.63

Slice 14 - Washer

Slice at x=4.55
Absolute x Position (inc. offset): 4.55
Radius: 4.56 cm
Diameter: 9.12 cm
Volume: 13.79 cm3
Whole Volume: 20.25

Slice 15 - Washer

Slice at x=4.86
Absolute x Position (inc. offset): 4.86
Radius: 4.64 cm
Diameter: 9.28 cm
Volume: 14.51 cm3
Whole Volume: 20.97

Slice 16 - Washer

Slice at x=5.17
Absolute x Position (inc. offset): 5.17
Radius: 4.7 cm
Diameter: 9.4 cm
Volume: 15.05 cm3
Whole Volume: 21.51

Slice 17 - Washer

Slice at x=5.48
Absolute x Position (inc. offset): 5.48
Radius: 4.77 cm
Diameter: 9.54 cm
Volume: 15.7 cm3
Whole Volume: 22.16

Slice 18 - Washer

Slice at x=5.79
Absolute x Position (inc. offset): 5.79
Radius: 4.82 cm
Diameter: 9.64 cm
Volume: 16.17 cm3
Whole Volume: 22.63

Slice 19 - Washer

Slice at x=6.1
Absolute x Position (inc. offset): 6.1
Radius: 4.89 cm
Diameter: 9.78 cm
Volume: 16.83 cm3
Whole Volume: 23.29

Slice 20 - Washer

Slice at x=6.41
Absolute x Position (inc. offset): 6.41
Radius: 4.94 cm
Diameter: 9.88 cm
Volume: 17.31 cm3
Whole Volume: 23.77

Slice 21 - Washer

Slice at x=6.72
Absolute x Position (inc. offset): 6.72
Radius: 5 cm
Diameter: 10 cm
Volume: 17.89 cm3
Whole Volume: 24.35

Slice 22 - Washer

Slice at x=7.03
Absolute x Position (inc. offset): 7.03
Radius: 5.05 cm
Diameter: 10.1 cm
Volume: 18.38 cm3
Whole Volume: 24.84

Slice 23 - Washer

Slice at x=7.34
Absolute x Position (inc. offset): 7.34
Radius: 5.1 cm
Diameter: 10.2 cm
Volume: 18.87 cm3
Whole Volume: 25.33

Slice 24 - Washer

Slice at x=7.65
Absolute x Position (inc. offset): 7.65
Radius: 5.14 cm
Diameter: 10.28 cm
Volume: 19.27 cm3
Whole Volume: 25.73

Slice 25 - Washer

Slice at x=7.96
Absolute x Position (inc. offset): 7.96
Radius: 5.18 cm
Diameter: 10.36 cm
Volume: 19.67 cm3
Whole Volume: 26.13

Slice 26 - Washer

Slice at x=8.27
Absolute x Position (inc. offset): 8.27
Radius: 5.22 cm
Diameter: 10.44 cm
Volume: 20.08 cm3
Whole Volume: 26.54

Slice 27 - Washer

Slice at x=8.58
Absolute x Position (inc. offset): 8.58
Radius: 5.26 cm
Diameter: 10.52 cm
Volume: 20.49 cm3
Whole Volume: 26.95

Slice 28 - Washer

Slice at x=8.89
Absolute x Position (inc. offset): 8.89
Radius: 5.29 cm
Diameter: 10.58 cm
Volume: 20.79 cm3
Whole Volume: 27.25

Slice 29 - Washer

Slice at x=9.2
Absolute x Position (inc. offset): 9.2
Radius: 5.33 cm
Diameter: 10.66 cm
Volume: 21.21 cm3
Whole Volume: 27.67

Slice 30 - Washer

Slice at x=9.51
Absolute x Position (inc. offset): 9.51
Radius: 5.36 cm
Diameter: 10.72 cm
Volume: 21.52 cm3
Whole Volume: 27.98

Slice 31 - Washer

Slice at x=9.82
Absolute x Position (inc. offset): 9.82
Radius: 5.39 cm
Diameter: 10.78 cm
Volume: 21.83 cm3
Whole Volume: 28.29

Slice 32 - Washer
Slice at x=10.13
Absolute x Position (inc. offset): 10.13
Radius: 5.41 cm
Diameter: 10.82 cm
Volume: 36.98 cm3
Whole Volume: 47.81

Slice 33 - Washer
Slice at x=10.65
Absolute x Position (inc. offset): 10.65
Radius: 5.44 cm
Diameter: 10.88 cm
Volume: 37.51 cm3
Whole Volume: 48.34

Riemann Vol Sum: 538.4
Equation 2
f(x) = -1.04810678*x^2 + 24.05679037*x - 132.54121549
a = 11.24
b = 12.8
Absolute Beginning: 11.17
Height: 1.56
Slices: 3
Offset: -0.07
    a: 11.17
    b: 12.73

Slice 34
Slice at x=11.24
Absolute x Position (inc. offset): 11.17
Radius: 5.44 cm
Diameter: 10.88 cm
Volume: 48.34 cm3

Slice 35
Slice at x=11.76
Absolute x Position (inc. offset): 11.69
Radius: 5.42 cm
Diameter: 10.84 cm
Volume: 47.99 cm3

Slice 36
Slice at x=12.28
Absolute x Position (inc. offset): 12.21
Radius: 4.83 cm
Diameter: 9.66 cm
Volume: 38.11 cm3

Riemann Vol Sum: 134.44
Equation 3
f(x) = -0.07859649*x + 4.47351579
a = 12.78
b = 13.82
Absolute Beginning: 12.73
Height: 1.04
Slices: 2
Offset: -0.05
    a: 12.73
    b: 13.77

Slice 37
Slice at x=12.78
Absolute x Position (inc. offset): 12.73
Radius: 3.47 cm
Diameter: 6.94 cm
Volume: 19.67 cm3

Slice 38
Slice at x=13.3
Absolute x Position (inc. offset): 13.25
Radius: 3.43 cm
Diameter: 6.86 cm
Volume: 19.22 cm3

Riemann Vol Sum: 38.89
Equation 4
f(x) = -2.38241758*x + 35.82378022
a = 13.63
b = 14.67
Absolute Beginning: 13.77
Height: 1.04
Slices: 2
Offset: 0.14
    a: 13.77
    b: 14.81

Slice 39
Slice at x=13.63
Absolute x Position (inc. offset): 13.77
Radius: 3.35 cm
Diameter: 6.7 cm
Volume: 18.33 cm3

Slice 40
Slice at x=14.15
Absolute x Position (inc. offset): 14.29
Radius: 2.11 cm
Diameter: 4.22 cm
Volume: 7.27 cm3

Riemann Vol Sum: 25.6
Equation 5
f(x) = 1.85
a = 14.24
b = 17.36
Absolute Beginning: 14.81
Height: 3.12
Slices: 6
Offset: 0.57
    a: 14.81
    b: 17.93

Slice 41
Slice at x=14.24
Absolute x Position (inc. offset): 14.81
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Slice 42
Slice at x=14.76
Absolute x Position (inc. offset): 15.33
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Slice 43
Slice at x=15.28
Absolute x Position (inc. offset): 15.85
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Slice 44
Slice at x=15.8
Absolute x Position (inc. offset): 16.37
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Slice 45
Slice at x=16.32
Absolute x Position (inc. offset): 16.89
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Slice 46
Slice at x=16.84
Absolute x Position (inc. offset): 17.41
Radius: 1.85 cm
Diameter: 3.7 cm
Volume: 5.59 cm3

Riemann Vol Sum: 33.54
Equation 6
f(x) = 1.5
a = 17.22
b = 17.74
Absolute Beginning: 17.93
Height: 0.52
Slices: 1
Offset: 0.71
    a: 17.93
    b: 18.45

Slice 47
Slice at x=17.22
Absolute x Position (inc. offset): 17.93
Radius: 1.5 cm
Diameter: 3 cm
Volume: 3.68 cm3

Riemann Vol Sum: 3.68

Additional Calculations

Equation Volumes

Equation 1: 538.4 cm2
Equation 2: 134.44 cm2
Equation 3: 38.89 cm2
Equation 4: 25.6 cm2
Equation 5: 33.54 cm2
Equation 6: 3.68 cm2
Total Area: 774.55 cm2

Accounting for the volume of the inner cylinder

Cylinder Height: 10.65 cm
Cylinder Volume: 57.25 cm3
Initial Total Volume: 774.55 cm3
Actual Volume (accounting for the cylinder): 831.8 cm3

Riemann Sum of Volume: 831.8 cm3


Total Slices: 48

Foam Slices: 17
Plexiglass Slices: 31

Calculating Final Height

This is different from the scale-to height, because the slice sizes are not variable, so there is some rounding that takes place.
Equation 1: 11.17 cm
Equation 2: 1.56 cm
Equation 3: 1.04 cm
Equation 4: 1.04 cm
Equation 5: 3.12 cm
Equation 6: 0.52 cm

Actual Height: 18.45 cm




Calculated Volume

Note: All of the folling integrals' units are in centimeters

Equation 1:


Equation 2:


Equation 3:


Equation 4:


Equation 5:


Equation 6:


Total Slices Volume: 763.47 cm3


Accounting for the volume of the inner cylinder

Cylinder Height: 10.65 cm
Cylinder Volume: 57.25 cm3
Initial Total Volume: 763.46636 cm3
Actual Volume (accounting for the cylinder): 820.71636 cm3

Calculated Volume: 820.71636 cm3





7

Scaled Shape


0,3.22
0.52,3.4
0.83,3.51
1.14,3.62
1.45,3.72
1.76,3.8
2.07,3.9
2.38,3.99
2.69,4.08
3,4.17
3.31,4.26
3.62,4.34
3.93,4.41
4.24,4.49
4.55,4.56
4.86,4.64
5.17,4.7
5.48,4.77
5.79,4.82
6.1,4.89
6.41,4.94
6.72,5
7.03,5.05
7.34,5.1
7.65,5.14
7.96,5.18
8.27,5.22
8.58,5.26
8.89,5.29
9.2,5.33
9.51,5.36
9.82,5.39
10.13,5.41
10.65,5.44

11.24,5.44
11.76,5.42
12.28,4.83

12.78,3.47
13.3,3.43

13.63,3.35
14.15,2.11

14.24,1.85
14.76,1.85
15.28,1.85
15.8,1.85
16.32,1.85
16.84,1.85

17.22,1.5
0,3.22
0.52,3.4
0.83,3.51
1.14,3.62
1.45,3.72
1.76,3.8
2.07,3.9
2.38,3.99
2.69,4.08
3,4.17
3.31,4.26
3.62,4.34
3.93,4.41
4.24,4.49
4.55,4.56
4.86,4.64
5.17,4.7
5.48,4.77
5.79,4.82
6.1,4.89
6.41,4.94
6.72,5
7.03,5.05
7.34,5.1
7.65,5.14
7.96,5.18
8.27,5.22
8.58,5.26
8.89,5.29
9.2,5.33
9.51,5.36
9.82,5.39
10.13,5.41
10.65,5.44
11.24,5.44
11.76,5.42
12.28,4.83
12.78,3.47
13.3,3.43
13.63,3.35
14.15,2.11
14.24,1.85
14.76,1.85
15.28,1.85
15.8,1.85
16.32,1.85
16.84,1.85
17.22,1.5

Cross-section of Slice 15 and Slice 37



Example Calculations

For the majority of the equations, finding the volume is simply a matter of using the formula for volume, but for slices that have holes cut in the center (washers), you have to subtract the volume of the removed slice.

Slice 15

To determine the volume of slice 13, the following equation is used:
V(x) = (-.01416736 * x2 + .35952504 * x + 3.22012349)2 * π * Δx - (2.5752 * π) * Δx
And because Slice 15 is made of plexiglass, Δx is .31 cm and the slice is located at x = 4.86, The final volume is:
V(4.86) = (-.01416736 * 4.862 + .35952504 * 4.86 + 3.22012349)2 * π * .31 - (2.5752 * π) * .31
V(4.86) = 14.5 cm3

Slice 37

To determine the volume of Slice 37, the following equation is used:
V(x) = (-0.07859649 * x + 4.47351579)2 * π * Δx
And because Slice 15 is made of foam, Δx is .52cm and the slice is located at x = 12.73, The final volume is:
V(12.73) = (-0.07859649 * 12.73 + 4.47351579)2 * π * .52
V(12.73) = 19.7 cm3




Note: For the calculation of the slices, the a,b intervals are not consistent, because they were measured from an actual object, then this script rounded up to make the slices, because they were not initally the perfect size. Each equation includes an offset, which can be used to shift the equation so that the equations are continous, as they are in the base graph.



3D Model of the Resulting Slices

Note: Not to scale