Click to See Complete Forum and Search --> : 5/6 point star
.paul.
Oct 13th, 2007, 06:30 PM
is there a formula for finding the area of a 5 or 6 point star where the only information i have is the number of points and the radius?
thanks
03myersd
Oct 14th, 2007, 04:26 AM
Have a look at this:
http://dcostanet.net/wordpress/2005/10/29/area-of-a-polygon/
03myersd
Oct 14th, 2007, 05:28 AM
Also found these functions:
Function calc_polygon_area(ByVal sides As Single, ByVal radius As Single) As Single
calc_polygon_area = sides * Sin(180 / sides) * Cos(180 / sides) * radius
End Function
Function calc_polygon_area2(ByVal radius As Single, ByVal side_len As Single, ByVal no_sides As Integer) As Single
calc_area = 2 * (((radius ^ 2) - ((0.5 * side_len) ^ 2)) * (0.25 * side_len)) * no_sides
End Function
Not sure about the second one though.....
Edit: just realised that these functions make no sense as to what you are trying to achieve. My point was that you could use these to find the area of the center part of the star and then find the area of each triangle.
zaza
Oct 14th, 2007, 05:52 AM
No. You need the inner and outer radius at least. i.e. the distance to the vertex in between the points as well as to the ends.
Think of it this way, if you didn't then it would imply that a star made up of a big polygon with wide but very flat triangles as points would have the same area as one with a tiny polygon and tall but very thin triangles as points. As you shrink the area of the central polygon towards zero, the area of the star approaches zero as well. Hence the area must be changing as you change the area of the central polygon, which is why you need some information about this as well.
Or are you only talking about a regular star?
zaza
zaza
Oct 14th, 2007, 06:21 AM
In that case, consider joining up the points of the star to make an n-sided polygon, and subtract the area between the points from the area of the polygon as a whole.
For example, a five-pointed star:
The angle at the centre of a pentagon is 360/5 = 72o.
The angle at the corner of a pentagon is (180x3)/5 = 108o.
So the angle at the base of a point is also 72o.
Since the point is isoceles, the angle at the tip is 180-(2x72) = 36o.
Now, imagine the pentagon joining the 5 points of the star. Divide it into segments, joining the centre to each of the five points. It has radius R and the angle at the base of one of the segments is 108/2 = 54o.
Drawing the upright (from the centre of the pentagon to the middle of a side), you can work this out as R sin54. Hence you can calculate the area of this triangle, and thus the area of this segment of the pentagon is R2 sin54 cos54
Now you need to subract off the triangle that is formed by the two points of the star and the vertex between them.
The length of the line joining the two points of the star is 2 R cos54. We have already shown that the angle at the tip of the point of the star is 36o, so half of this is 18o. Thus the angle between the line joining the points and the line to the vertex between the points is 54 - 18 = 36o. Now you know half the length of the base and the corner angle, so the height of this triangle we're after is R cos54 tan36. Thus the area of this triangle is R2 cos254 tan36.
Subtracting one from the other gives you your answer for the area of 1/5 th of the star.
You can extend this method for any number of points you wish, as long as the star is regular.
zaza
.paul.
Oct 14th, 2007, 09:25 AM
its a regular 5pt star & a regular 6pt star
i draw them using the radius, with the inner radius being a percentage of the outer radius
Logophobic
Oct 14th, 2007, 09:31 AM
Another approach would be to divide an n-point start into n congruent kite quadrilaterals. Calculate the area of one kite, then multiply by n.
Given major radius R and minor radius r, and assuming I did the math correctly, the total area is n * R * r * sin (180/n)
zaza
Oct 14th, 2007, 10:35 AM
Or, if I've done my maths right, the area in terms of R and n is:
n x R2 x sin A x ( cos A - (sin A x tan A))
where A = (180/n)
.paul.
Oct 14th, 2007, 10:36 AM
thanks for answering
knowing the radius of the inner pentagon or hexagon doesn't give me the lengths of base + height of the isosceles triangles
i've got a formula to calculate the area of the pentagon or hexagon and i know the formula for triangles, but i need the length of the base + height of the triangle.
please keep it as simple as possible
.paul.
Oct 14th, 2007, 10:37 AM
Or, if I've done my maths right, the area in terms of R and n is:
n x R2 x sin A x ( cos A - (sin A x tan A))
where A = (180/n)
thanks. i'll try it
.paul.
Oct 14th, 2007, 10:48 AM
i tried this. it didn't work. it returned -937.###
dim radius as integer = 5
Format(5 * (radius * radius) * Math.Sin(180 / 5) * (Math.Cos(180 / 5) - (Math.Sin(180 / 5) * Math.Tan(180 / 5))), "#####.##")
Logophobic
Oct 14th, 2007, 10:56 AM
you need to convert degrees to radians for the Sin function
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.