For my G.C.S.E. coursework, I have decided to try and find the largest possible (within reason) volume of certain shapes when made of a net with an area of 100 cm². The size of the shape is dependent the size of an angle on the net.
I have done a few and developed a base class and some subtypes for the shapes I have done. I am stuck on square-based pyramids though.
I have some working formulae, yet given some sizes of degrees it does not work (I shall come onto this in a minute).
Here is a quick image of what the net of my square-based pyramid looks like (please excuse, I am terrible at creating images

).
net.gif.
A
is the size of the angle which is changed to try and find the largest volume possible.
25 cm²
is the area of each of the net triangles (
100 / 4 = 25
).
The problem that I have is that I need the pyramid's slant height, in order to use pythag to work the pyramid's height out.
When one folds out the pyramid to form the net, the net triangles' heights are the pyramid's slant heights.
Please look at the following image of one net triangle:
net_triangle.gif.
l = net triangle's height & pyramid's slant height
x = half of the net triangle's base
A = size of angle
Area of net triangle = 25 cm²
I figured that I could work out
l
by rearranging the formula for finding the area of a triangle (half base * height = area):
x * l / 2 = 12.5
(12.5 is half of the net triangle's area).
But there would be an unknown left in the formula,
x
. I used trig to find the formula for finding the value of
x
and substituted it in place of
x
in the formula for calculating the area of the net triangle: *gets breath back*
tan = opp / adj
tan(½A) = x / l
x = tan(½A) * l
x * l / 2 = 12.5 => tan(½A) * l * l / 2 = 12.5
Now I can rearrange the formula, making
l
to subject:
tan(½A) * l² / 2 = 12.5
tan(½A) * l² = 25
l² = 25 / tan(½A)
l = sqrt(25 / tan(½A))
This is ok for some values of A, but if the tan of half of A is a negative number it makes the whole formula not work: 25 divided by a negative number will result in a negative number and there is no such thing as a square root of a negative number.
So, how can I get over this? I know this is a school project, so I am not saying that you should explicitly state what to do, yet some help would be nice.

Someone mentioned maybe complex numbers for the square root of a negative number? Anyway, thanks in advance.
Edit: Messed up URLs :0
[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]
[edited by - Lektrix on February 20, 2003 9:37:19 AM]