Post by jtyotjotjipaefvj on Jan 10, 2018 1:22:12 GMT
While working on a ship calculator that can take armor mass into account, I'm pretty sure I ran into a bug (or a conscious simplification?) in the way armor mass is computed. I first assumed the game would compute armor volume as illustrated in this amazing picture I made in paint:
We have two cylinders, one with length h1 and radius r1, which is the volume of whatever payload our armor is covering. Our armor thickness is d, so the length and radius of our payload + armor package will be r2 = r1 + d and h2 = h1 + d
At least this is how armor seems to behave in-game. It's easy to compute armor volume from the difference of the two cylinders' volumes, which then gives us armor mass. However, this does not seem to be how the game handles armor weight. Rather it seems to assume armor layers are thin, and multiplies the outer surface area of our armor with its thickness to get armor volume. With large r1 and small d this is fine, but when d is not tiny compared to r1, it gives quite a bit larger armor masses than the correct result would be.
To test this, I made a ship consisting of a 2mm diameter, 1m long radiator shield and 1 cm of spider silk armor. This gives us r1 = .001 m, r2 = .011 m, h1 = 1m, h2 = 1.01m. Therefore armor volume is pi * (r2² * h2 - r1² * h1) = 0,00314 m³. Multiply by the density of spider silk, 1310 kg / m³, and we get 411 grams of armor. In-game however, the armor mass comes up to 957 grams, more than double the actual mass.
If instead we compute armor volume as outer surface area A times thickness d, we get the following results:
A = 2 * pi * r2 * h2 = 2 * 3.14159 * .011 * 1.01 = 0.0698 m²
V = A * d = .0698 * .01 = 0.000698 m³
Multiply that by our density and we get 914 grams. That's not quite correct either but seems to be fairly close for various payload shapes. This might be related to how armor is discretized to the tiles we see in game in the armor damage view, or I might be completely off the mark and the outer area times thickness formula just gets pretty close to whatever the actual mass is. It should also be noted that this formula gives us weightless nose caps for cylinders, but that does seem to happen in-game as well. A 2m diameter, 1mm thick radiation shield does get around 900 grams of armor, even though its surface area should be 3.14 m².
I also haven't tested shapes other than a cylinder. The issue might occur for all armor shapes, or it might be limited to just this configuration I tested.
In-game screenshots of both mentioned configurations:
We have two cylinders, one with length h1 and radius r1, which is the volume of whatever payload our armor is covering. Our armor thickness is d, so the length and radius of our payload + armor package will be r2 = r1 + d and h2 = h1 + d
At least this is how armor seems to behave in-game. It's easy to compute armor volume from the difference of the two cylinders' volumes, which then gives us armor mass. However, this does not seem to be how the game handles armor weight. Rather it seems to assume armor layers are thin, and multiplies the outer surface area of our armor with its thickness to get armor volume. With large r1 and small d this is fine, but when d is not tiny compared to r1, it gives quite a bit larger armor masses than the correct result would be.
To test this, I made a ship consisting of a 2mm diameter, 1m long radiator shield and 1 cm of spider silk armor. This gives us r1 = .001 m, r2 = .011 m, h1 = 1m, h2 = 1.01m. Therefore armor volume is pi * (r2² * h2 - r1² * h1) = 0,00314 m³. Multiply by the density of spider silk, 1310 kg / m³, and we get 411 grams of armor. In-game however, the armor mass comes up to 957 grams, more than double the actual mass.
If instead we compute armor volume as outer surface area A times thickness d, we get the following results:
A = 2 * pi * r2 * h2 = 2 * 3.14159 * .011 * 1.01 = 0.0698 m²
V = A * d = .0698 * .01 = 0.000698 m³
Multiply that by our density and we get 914 grams. That's not quite correct either but seems to be fairly close for various payload shapes. This might be related to how armor is discretized to the tiles we see in game in the armor damage view, or I might be completely off the mark and the outer area times thickness formula just gets pretty close to whatever the actual mass is. It should also be noted that this formula gives us weightless nose caps for cylinders, but that does seem to happen in-game as well. A 2m diameter, 1mm thick radiation shield does get around 900 grams of armor, even though its surface area should be 3.14 m².
I also haven't tested shapes other than a cylinder. The issue might occur for all armor shapes, or it might be limited to just this configuration I tested.
In-game screenshots of both mentioned configurations: