Foam Thickness: | |

Plexiglass Thickness: | |

Scale to (cm): | |

Precision: |

Note: All measurements are in centimeters

Settings are currently set to final project specifications

Settings are currently set to final project specifications

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:

**Scaling**

The original data that was taken for the object was scaled such that the object was approximately 26cm tall, which turned out to be much larger than we wanted. Since there was not an apparently easy way of scaling the collected equations, there was a scaling function built into the script. This script determines the relevant x-values that would have been required from the original equations then uses the geometric property of Similar Triangles to determine the appropriate scaled-down 'y' value (the radius).**Equation 'Width' Sizing**

For a Riemann Sum equation to work, the total width that an equation represents has to be an interval of the slice thickness. The actual size and scaling of the object does not take this into account, so it was built into the function. The script determines the exact amount of slices (in a perfect world) and then rounds up to the next nearest integer, and multiples this number of slices by the Slice Thickness, effectively rounding up the number of slices and attaing a 'width' that was an interval of the slice thickness.**Accounting for the Plexiglass**

When we decided we wanted to make our project light up, we knew we had to use something more transparent than foam. Plexiglass immediately came to mind. Unfortunately this brought up a problem. How could the first equation have two different slice thicknesses? We wanted to be able to have our Plasmid match a real one as much as possible, so we manually 'special-cased' the first equation so that the first slice and the last two slices are always foam, and then the number of plexiglass slices are determined after that set number of foam slices is accounted for.

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 0Slice at x=0Absolute x Position (inc. offset): 0 Radius: 3.22 cm Diameter: 6.44 cm Volume: 16.94 cm ^{3}Slice 1 - WasherSlice at x=0.52Absolute x Position (inc. offset): 0.52 Radius: 3.4 cm Diameter: 6.8 cm Volume: 4.8 cm ^{3}Whole Volume: 11.26 Slice 2 - WasherSlice at x=0.83Absolute x Position (inc. offset): 0.83 Radius: 3.51 cm Diameter: 7.02 cm Volume: 5.54 cm ^{3}Whole Volume: 12 Slice 3 - WasherSlice at x=1.14Absolute x Position (inc. offset): 1.14 Radius: 3.62 cm Diameter: 7.24 cm Volume: 6.3 cm ^{3}Whole Volume: 12.76 Slice 4 - WasherSlice at x=1.45Absolute x Position (inc. offset): 1.45 Radius: 3.72 cm Diameter: 7.44 cm Volume: 7.02 cm ^{3}Whole Volume: 13.48 Slice 5 - WasherSlice at x=1.76Absolute x Position (inc. offset): 1.76 Radius: 3.8 cm Diameter: 7.6 cm Volume: 7.6 cm ^{3}Whole Volume: 14.06 Slice 6 - WasherSlice at x=2.07Absolute x Position (inc. offset): 2.07 Radius: 3.9 cm Diameter: 7.8 cm Volume: 8.35 cm ^{3}Whole Volume: 14.81 Slice 7 - WasherSlice at x=2.38Absolute x Position (inc. offset): 2.38 Radius: 3.99 cm Diameter: 7.98 cm Volume: 9.04 cm ^{3}Whole Volume: 15.5 Slice 8 - WasherSlice at x=2.69Absolute x Position (inc. offset): 2.69 Radius: 4.08 cm Diameter: 8.16 cm Volume: 9.75 cm ^{3}Whole Volume: 16.21 Slice 9 - WasherSlice at x=3Absolute x Position (inc. offset): 3 Radius: 4.17 cm Diameter: 8.34 cm Volume: 10.47 cm ^{3}Whole Volume: 16.93 Slice 10 - WasherSlice at x=3.31Absolute x Position (inc. offset): 3.31 Radius: 4.26 cm Diameter: 8.52 cm Volume: 11.21 cm ^{3}Whole Volume: 17.67 Slice 11 - WasherSlice at x=3.62Absolute x Position (inc. offset): 3.62 Radius: 4.34 cm Diameter: 8.68 cm Volume: 11.88 cm ^{3}Whole Volume: 18.34 Slice 12 - WasherSlice at x=3.93Absolute x Position (inc. offset): 3.93 Radius: 4.41 cm Diameter: 8.82 cm Volume: 12.48 cm ^{3}Whole Volume: 18.94 Slice 13 - WasherSlice at x=4.24Absolute x Position (inc. offset): 4.24 Radius: 4.49 cm Diameter: 8.98 cm Volume: 13.17 cm ^{3}Whole Volume: 19.63 Slice 14 - WasherSlice at x=4.55Absolute x Position (inc. offset): 4.55 Radius: 4.56 cm Diameter: 9.12 cm Volume: 13.79 cm ^{3}Whole Volume: 20.25 Slice 15 - WasherSlice at x=4.86Absolute x Position (inc. offset): 4.86 Radius: 4.64 cm Diameter: 9.28 cm Volume: 14.51 cm ^{3}Whole Volume: 20.97 Slice 16 - WasherSlice at x=5.17Absolute x Position (inc. offset): 5.17 Radius: 4.7 cm Diameter: 9.4 cm Volume: 15.05 cm ^{3}Whole Volume: 21.51 Slice 17 - WasherSlice at x=5.48Absolute x Position (inc. offset): 5.48 Radius: 4.77 cm Diameter: 9.54 cm Volume: 15.7 cm ^{3}Whole Volume: 22.16 Slice 18 - WasherSlice at x=5.79Absolute x Position (inc. offset): 5.79 Radius: 4.82 cm Diameter: 9.64 cm Volume: 16.17 cm ^{3}Whole Volume: 22.63 Slice 19 - WasherSlice at x=6.1Absolute x Position (inc. offset): 6.1 Radius: 4.89 cm Diameter: 9.78 cm Volume: 16.83 cm ^{3}Whole Volume: 23.29 Slice 20 - WasherSlice at x=6.41Absolute x Position (inc. offset): 6.41 Radius: 4.94 cm Diameter: 9.88 cm Volume: 17.31 cm ^{3}Whole Volume: 23.77 Slice 21 - WasherSlice at x=6.72Absolute x Position (inc. offset): 6.72 Radius: 5 cm Diameter: 10 cm Volume: 17.89 cm ^{3}Whole Volume: 24.35 Slice 22 - WasherSlice at x=7.03Absolute x Position (inc. offset): 7.03 Radius: 5.05 cm Diameter: 10.1 cm Volume: 18.38 cm ^{3}Whole Volume: 24.84 Slice 23 - WasherSlice at x=7.34Absolute x Position (inc. offset): 7.34 Radius: 5.1 cm Diameter: 10.2 cm Volume: 18.87 cm ^{3}Whole Volume: 25.33 Slice 24 - WasherSlice at x=7.65Absolute x Position (inc. offset): 7.65 Radius: 5.14 cm Diameter: 10.28 cm Volume: 19.27 cm ^{3}Whole Volume: 25.73 Slice 25 - WasherSlice at x=7.96Absolute x Position (inc. offset): 7.96 Radius: 5.18 cm Diameter: 10.36 cm Volume: 19.67 cm ^{3}Whole Volume: 26.13 Slice 26 - WasherSlice at x=8.27Absolute x Position (inc. offset): 8.27 Radius: 5.22 cm Diameter: 10.44 cm Volume: 20.08 cm ^{3}Whole Volume: 26.54 Slice 27 - WasherSlice at x=8.58Absolute x Position (inc. offset): 8.58 Radius: 5.26 cm Diameter: 10.52 cm Volume: 20.49 cm ^{3}Whole Volume: 26.95 Slice 28 - WasherSlice at x=8.89Absolute x Position (inc. offset): 8.89 Radius: 5.29 cm Diameter: 10.58 cm Volume: 20.79 cm ^{3}Whole Volume: 27.25 Slice 29 - WasherSlice at x=9.2Absolute x Position (inc. offset): 9.2 Radius: 5.33 cm Diameter: 10.66 cm Volume: 21.21 cm ^{3}Whole Volume: 27.67 Slice 30 - WasherSlice at x=9.51Absolute x Position (inc. offset): 9.51 Radius: 5.36 cm Diameter: 10.72 cm Volume: 21.52 cm ^{3}Whole Volume: 27.98 Slice 31 - WasherSlice at x=9.82Absolute x Position (inc. offset): 9.82 Radius: 5.39 cm Diameter: 10.78 cm Volume: 21.83 cm ^{3}Whole Volume: 28.29 Slice 32 - WasherSlice at x=10.13Absolute x Position (inc. offset): 10.13 Radius: 5.41 cm Diameter: 10.82 cm Volume: 36.98 cm ^{3}Whole Volume: 47.81 Slice 33 - WasherSlice at x=10.65Absolute x Position (inc. offset): 10.65 Radius: 5.44 cm Diameter: 10.88 cm Volume: 37.51 cm ^{3}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 34Slice at x=11.24Absolute x Position (inc. offset): 11.17 Radius: 5.44 cm Diameter: 10.88 cm Volume: 48.34 cm ^{3}Slice 35Slice at x=11.76Absolute x Position (inc. offset): 11.69 Radius: 5.42 cm Diameter: 10.84 cm Volume: 47.99 cm ^{3}Slice 36Slice at x=12.28Absolute x Position (inc. offset): 12.21 Radius: 4.83 cm Diameter: 9.66 cm Volume: 38.11 cm ^{3}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 37Slice at x=12.78Absolute x Position (inc. offset): 12.73 Radius: 3.47 cm Diameter: 6.94 cm Volume: 19.67 cm ^{3}Slice 38Slice at x=13.3Absolute x Position (inc. offset): 13.25 Radius: 3.43 cm Diameter: 6.86 cm Volume: 19.22 cm ^{3}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 39Slice at x=13.63Absolute x Position (inc. offset): 13.77 Radius: 3.35 cm Diameter: 6.7 cm Volume: 18.33 cm ^{3}Slice 40Slice at x=14.15Absolute x Position (inc. offset): 14.29 Radius: 2.11 cm Diameter: 4.22 cm Volume: 7.27 cm ^{3}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 41Slice at x=14.24Absolute x Position (inc. offset): 14.81 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}Slice 42Slice at x=14.76Absolute x Position (inc. offset): 15.33 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}Slice 43Slice at x=15.28Absolute x Position (inc. offset): 15.85 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}Slice 44Slice at x=15.8Absolute x Position (inc. offset): 16.37 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}Slice 45Slice at x=16.32Absolute x Position (inc. offset): 16.89 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}Slice 46Slice at x=16.84Absolute x Position (inc. offset): 17.41 Radius: 1.85 cm Diameter: 3.7 cm Volume: 5.59 cm ^{3}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 47Slice at x=17.22Absolute x Position (inc. offset): 17.93 Radius: 1.5 cm Diameter: 3 cm Volume: 3.68 cm ^{3}Riemann Vol Sum: 3.68 |

Equation 2: 134.44 cm

Equation 3: 38.89 cm

Equation 4: 25.6 cm

Equation 5: 33.54 cm

Equation 6: 3.68 cm

Cylinder Volume: 57.25 cm

Initial Total Volume: 774.55 cm

Actual Volume (accounting for the cylinder): 831.8 cm

Plexiglass Slices: 31

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

Cylinder Volume: 57.25 cm

Initial Total Volume: 763.46636 cm

Actual Volume (accounting for the cylinder): 820.71636 cm

7

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

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