This script uses the formula for calculating the volume of a Dodecahedron and then uses the number that you are able to change inside of the script itself, to calculate the volume of your Dodecahedron in multiple things such as:

• Centimer^3
• Feet^3
• Imperial Gallon
• Inch^3
• Kilometer^3
• Liters

Once it has fully calculated all of this in much less than a second, it prints the answers to the output.

The reason I created this, if you want to know, is that in the past year I have really gotten into math.

The advanced formula for calculating the volume of a Dodecahedron is as follows:

``````180° * 3 / 5 = 108°
180° - 108° / 2 = 36°

arcsin 1/2sin36° = 58.28°

OD =OA * tan[arcsin(1/2sin36°)] = 1/2tan54° tan[arcsin(1/2sin36°)]*a
5/4 tan54° * a^2
* 1/2 * tan54° * tan[arcsin(1/2sin36°)]*a*1/3 =
* 5/24 * tan^2 54° * tan[arcsin(1/2sin36°)] * a^3

V = 5/2 * tan54°^2 * tan[arcsin(1/2sin36°)] * a^3 = 7.66*a^3
``````

The much simpler, and much more understandable for those of you that do not know tan and arcsin and sin, version of calculating the volume of a Dodecahedron is as follows:

``````V = 1/4 * (15+7 * √5) l^3
≈ 7.663118961 * l^3
``````

Check out the completed calculation script for yourself here! :

``````lastResult = nil

function BlankPrint()
print()
end

function CalculateStuffOfDodecahedron(lengthOfSideInDodecahedron)
--//Formula For Volume Of A Dodecahedron: V = 1/4 * (15+7*math.sqrt(5))*l^3
lastResult = 1/4 * (15+7*math.sqrt(5))*lengthOfSideInDodecahedron^3
BlankPrint()
--[[Centimeters^3]] print(" [CENTIMER]: Your Dodecahedron Has A Volume Of: " .. 1/4 * (15+7*math.sqrt(5))*lengthOfSideInDodecahedron^3 .. " cm^3")
BlankPrint()
--[[Feet^3]] print(" [FEET]: Your Dodecahedron Has A Volume Of: " .. (lastResult / 28316.8466) .. " ft^3")
BlankPrint()
--[[Imperial Gallon]] print(" [IMPERIAL GALLON]: Your Dodecahedron Has A Volume Of: " .. (lastResult / 4546.09) .. " Imperial Gallon")
BlankPrint()
--[[Inch^3]] print(" [INCH]: Your Dodecahedron Has A Volume Of: " .. (lastResult / 16.387064) .. " Inch^3")
BlankPrint()
--[[kilometer^3]] print("[KILOMETER]: Your Dodecahedron Has A Volume Of: " .. lastResult .. " * 10^-12 km^3")
BlankPrint()
--[[liters]] print("[LITERS]: You Dodecahedron Has A Volume Of: " .. (lastResult / 1000) .. " liters")
BlankPrint()
end

CalculateStuffOfDodecahedron(10) --//Input The Lenght Of Any Side Of Your Dodecahedron (In Centimers!)
``````

I am going to add more things it will calculate soon.