|
-
Jul 25th, 2002, 05:07 PM
#1
Thread Starter
Hyperactive Member
Mathematical Restart...
As an easy restart into the ways of the math, here is a quick question. First correct answer (there are more than one) wins.
The question is:
"Devise a formula for the area of a regular polygon with the following variables:
n - number of sides
l - length of each side"
The prize is the knowing you're a winner .
There are 10 types of people in the world - those that understand binary, and those that don't.
-
Jul 25th, 2002, 09:58 PM
#2
Frenzied Member
Easier to develop an algorithm, thinking of the regular polygon as being made of N isosceles triangles.
Angle = Pi / N, which is half the angle opposite the base of triangle.
Height = Length / 2*Tan(Angle), which is height of a triangle
Area = N*Length*Height / 2
Area = N*length2 / 4*Tan( Pi / N ), if I made the substitutions correctly.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
-
Jul 26th, 2002, 04:42 AM
#3
Hyperactive Member
Area = (L^2 * N) / (4 * Tan(pi / N)) 'radians
Area = (L^2 * N) / (4 * Tan(180 / N)) 'degrees
In VB the Tan function expects radians. If N = 0, 1, 2 an error should occur, however, since pi is not exact the above formula for radians will not catch the errors for 1 or 2 sides.
Last edited by JohnVB6; Jul 26th, 2002 at 03:43 PM.
Sometimes what you're looking for is exactly where you left it.
-
Jul 26th, 2002, 07:31 AM
#4
Hyperactive Member
Can u tell me when N will be 0, 1 or 2 for a polygon?
Last edited by transcendental; Jul 26th, 2002 at 07:34 AM.
-
Jul 26th, 2002, 03:24 PM
#5
Hyperactive Member
If the formulas are used in VB you must consider every possibility regarding user interaction.
Sometimes what you're looking for is exactly where you left it.
-
Jul 26th, 2002, 05:06 PM
#6
Thread Starter
Hyperactive Member
Yeh both correct Guv and JohnVB6. Someone else post a new thread now.
There are 10 types of people in the world - those that understand binary, and those that don't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|