uyhjjddddddddddd Web Optimisation, Maths and Puzzles: circle

Header tag

Showing posts with label circle. Show all posts
Showing posts with label circle. Show all posts

Monday, 18 May 2015

A circle in the corner of a hexagon

In my last post, I calculated the radius and diameter of a circle drawn within the external 'corner' of another circle - diagram below.  The final ratio indicated that the diameter of the small circle is 10.8% of the larger circle.  In this post, I'm going to extend this to look at circles in hexagons (something that I discussed a few years ago when I looked at square or cubic packing and hexagonal packing).  I'll also then look to apply my findings to real life, by reviewing the sizes of atoms in alloys - how do they fit together?

Firstly, here's a reminder of the result from last time:



For a circle with radius DE = EF = 1 unit, then the radius of the smaller circle "in the corner" BC = CD = 0.108... units.  The smaller circle has a radius of 11% of the larger one.  The length AD is 40% of the radius of the larger circle.

In this blog, I'd like to study the relationship between a circle and the hexagon surrounding it (the circle is inscribed in the hexagon). The diagram below shows three such hexagons.  The circles have radius r, and the distance from the centre of the circle (O) to the corner of the hexagon is h (the hypotenuse of the triangle formed by the radius and the tangent).  The angle between the radius and the hypotenuse is 30 degrees.



Given that r = 1 unit, what's the length h?

Trigonometry tells us that cos 30 = r/h therefore h = r / cos 30 = r / 0.866
h = 1.154 r


This means that the additional distance ( h - r ) = 0.154 r or 15% of the radius of the larger circleThis additional distance is the maximum radius of a circle that would fit in the space between the three circles shown in the diagram.  For example, if the larger circles have a radius of 1 metre, the radius of the smaller circles would be 0.15m or 15 cm.  As I've calculated previously, there isn't much space between hexagonally-packed circles.


Atoms in metallic solids are typically hexagonally packed, and alloys are formed when other atoms are mixed with a pure metal.  It occurred to me that it may be possible for these atoms to be small enough to fit into the gaps between the atoms - using the mechanism I've indicated above.


Here are the radii of some metal atoms, for reference, in picometres.  1 picometre, = 1 x 10 -12 metres

Fe (iron)  156
Sn (tin)  145
Al (aluminium) 118

Co (cobalt) 152

15% of these values gives us 24, 21, 17, and 22.    The atomic radius of carbon (which is alloyed with iron to make steel) is 67 pm.  So, there is no way that carbon will fit neatly into the gaps in the matrix of hexagonally-packed iron atoms.   [Indeed, helium has the lowest atomic radius, and that's 31 pm, still too large].

Instead, in interstitial alloys, the smaller atoms in an alloy distort the close-packed arrangement of the metal and that's what affects its physical properties.

Further reading

Previous post on the radius of a circle in the corner of a circle
Space filling calculation 3D - sphere in cube, sphere in hexagonal prism

Hexagonal close packing - 2D-filling calculation

 


Tuesday, 31 March 2015

Geometry: A Circle in the corner of a circle

This article is specifically written to answer the geometry question:  "What is the radius of a circle drawn in the space between a circle of radius 1 unit, and the corner of the enclosing square?" To better explain the question, and then answer it, I have drawn the diagram shown below.  The question states that the radius of the larger circle is 1 unit of length, and that it is enclosed in a square. What is the radius of the smaller circle drawn in the space in the corner region?  (The question was asked in a GCSE workbook, aimed for children aged 14-16, although the geometry and algebra became more complicated than I had expected).





The diagram isn't perfect, but I'm better at using a pencil and compasses than I am with drawing geometric shapes in Photoshop.  The larger circle has centre E, and DE = EF = 1 unit.  What is the radius of the smaller circle, with centre C (BC = CD = smaller radius).

By symmetry, the angle at A = 45 degrees, so triangles ACG and AEH are right-angled isosceles triangles.
AH and EH are equal to the radius of the larger circle = 1 unit
By Pythagoras' Theorem, length AE = √2

Length AD = AE - DE = √2 -1
However, length AD is not the diameter of the smaller circle.  The diameter of the smaller circle is BD, not AD.  We are still making progress, nonetheless.

Next, consider the ratio of the lengths AD:AF.
AD = √2 -1 as we showed earlier
AF = AD + DF = (√2 -1) + 2 (the diameter of the circle) = √2 + 1

So the ratio AD:AF =  √2 -1 :  √2 + 1

And the fraction AD/AF = √2 -1 /  √2 + 1

What is the remaining distance between the circle and the origin?
Look again at the larger circle, and the ratio of the diameter to the distance from the corner to the furthest point on the circle?

The fraction AB/AD is equal to the fraction AD/AF.  This fraction describes the relationship between the diameter of a circle and the additional distance to the corner of the enclosing square.  The diameter of the circle is not important, the ratio is fixed.

So we can divide the shorter length AD in the ratio AD:AF, and this will give us the length AB and (as we already know AD) the diameter of the smaller circle, BD.

To express it more simply and mathematically:  AD/AF = AB/AD
Substituting known values for AD and AF, this gives:

AD/AF = AB/AD

(AD^2) / AF = AB

(√2 -1)^2(√2 + 1) = AB


 Evaluating:
(√2 -1)^2 = 3 - 2 √2 = 0.17157...

and:
(√2 + 1) =  2.4142...

Now:  BD (diameter or circle) = AD ('corner' of larger circle) - AB ('corner' of small circle)
Substituting values for AD and AB, and then combining terms over the same denominator, we get:


 Having combined all terms over the same denominator, we can now simplify (√2 -1)(√2 +1), since (a+b)(a-b) = a^2 - b^2

BD is the diameter of the smaller circle, BD = 0.216...  Comparing this with the diameter of the larger circle, which is 2.00, we can see that the smaller circle is around 10% of the diameter of the larger one.  This surprised me - I thought it was larger.

In future posts, I'll look at other arrangements of circles in corners - in particular the quarter-circle in the corner (which, as a repeating pattern, would lead to a smaller circle touching four larger circles in a square-like arrangement), and a third-of-a-circle in the corner of a hexagon.  I'll then compare the two arrangements (in terms of space filled) and also check against any known alloys, looking at the ratios of diameters to see if I can find a real-life application.

Other 'circle' posts:

A Circle in the Corner of a Circle
A Circle in the Corner of a Hexagon
Close-packed Circles - calculating the space occupied
Close-packed Spheres - calculating the volume occupied




Sunday, 16 January 2011

Maths Problems 5: Geostationary Satellites

Now that I've shown how to estimate (or calculate) pi with a high degree of accuracy and precision, it's time to start using it!

Modern communications around the world rely on being able to bounce a signal of a satellite in orbit around the earth, so that it can be relayed beyond the horizon of the person sending it (or better still, over a specific area of the earth). The ability to bounce the signal off the satellite is very important, and relies on one important factor - knowing where the satellite is, and better still, having it stay directly above the same point on the earth, so that its apparent position in the sky is fixed.

In order to do this, the satellite needs to occupy a geostationary orbit, meaning that it goes around the earth at the same rate as the earth rotates on its axis - once every 24 hours. A geostationary satellite appears to stay in the same point in the sky because it's rotating at the same rate as the earth.

The question is - how can this be done? The answer is to put the satellite in orbit at a specific height above the earth, and above the earth's equator. The rest is physics. Well, it's not rocket science, is it?

Firstly, there are two key formulae to use - the first is Newton's universal law of gravity, because gravity is what holds a satellite in orbit, and the second is the laws of motion for an object moving in a circle (we'll be assuming that the satellite follows a circular orbit).

The first formula is Newton's universal law of gravitation, describing the force of attraction between two bodies.  It is:


where:
G is the universal gravitational constant, 6.67300 × 10-11 m3 kg-1 s-2
M is the mass of the heavier body (in this case, the Earth)
m is the mass of the lighter body (in this case, the satellite)
and r is the distance between the centres of gravity of the two bodies.

The second formula is the equation which describes the force required to keep an object moving in a circular path.

In this formula, F is the force which points towards the centre of the circle, m is the mass of the object (in this case, the satellite), v is the angular velocity (how quickly it's moving in a circle), and r is the radius of the circular path being described by the body.

The first thing I'm going to do is unpack v in the second equation.  v, the angular velocity, is defined in the same way as all speeds as the distance travelled divided by the time taken.  For a circular path, the distance is the circumference of the circle, and the time is the time taken to complete one circle (or orbit), T.
We can plug v2 into the formula for circular motion, and we can also equate the two formulae, since the force that will hold the satellite in orbit is the force of gravity.

By cancelling and rearranging, we have one expression for the radius of a geostationary satellite held in orbit by the Earth's gravity.

One thing to notice here is that the mass of the satellite, m, does not appear in our final expression.  The period of rotation of a satellite depends only on the height of its orbit.  The time taken to complete an orbit is only affected by the height of the orbit - the mass of the satellite is not important.

Anyway, we know the time taken for one orbit has to be 24 hours, and all the other components of the formula are constants, so we can plug them in and calculate r.

G is the universal gravitational constant, 6.67300 × 10-11 m3 kg-1 s-2
M is the mass of the Earth5.9742 × 1024 kg
T is the time to complete one orbit, 24 hrs = 86 400 s

Therefore, r = 42,243 km.

However, this is not the altitude of the satellite from the Earth's surface.  Remember that when I first gave Newton's law of gravity, the r was the distance between the centres of gravity of the two bodies.  The size of the satellite is small enough to be ignored, but we must subtract the radius of the Earth from this value, to give the orbital height.  Radius of Earth = 6378.1 km, so orbital radius = 35,865 km.

Later edits of this post will include some nice diagrams, but for now I'm happy to have posted the result!

NASA gives the height as approx 35,790 km using a more exact value of the length of one day, while Wikipedia has a similar figure and more information on geostationary orbits.

In my next post... I'm not sure.  Possibly more on orbits generally, including calculating a Moon - Earth distance, or a Sun - Earth distance, or a practical experiment to determine g (acceleration due to gravity on Earth).

Other astronomy related articles you may find interesting:

Calculating the angle of elevation of geostationary satellites
The Earth-Moon distance is increasing (published 1 April 2011)
What are constellations?

Sunday, 9 January 2011

Mathematical Problems, 3D - Pi from infinite polygon

In this final post on π (for the time being at least), I'm going to look at another way of calculating π, based on the principle I first used for calculating a minimum value for it.  Back then, I used a square inside a circle to give a minimum value, but it occurred to me later that it's possible to use a hexagon inside a circle (and we can show that the perimeter of a hexagon inside a circle is 6r) and that the figure would become more accurate if I could use a polygon with more sides.

What about a polygon with 8 sides, or 12, or 20, or n sides?  Consider the following diagram, where the line EF  is a side of a regular polygon ABCDEF which has all its corners on the circumference of a circle of radius r.  In this case, the diagram shows a regular hexagon, but the theory applies to any polygon which has n sides.


Since this is a regular n-sided polygon, the angle EOF is 360/n and the angle EOG is 180/n. Additionally, EGO is a right-angled triangle, so we can use trigonometry to solve this triangle. If we call the length of one side l, this is the line EF, and EG is l/2. Using trigonometry, we can see that sin 180/n = l/2 /r

This rearranges to give l, the length of one side, as l = 2r sin 180/n

And the total perimeter, P, of the polygon which has n sides of length l, is P = n 2r sin 180/n

Now, 2r =d, the diameter of the circle, so P = n d sin 180/n

And for a circle, π is the ratio P/d and for this polygon, P/d = n sin 180/n
The advantage of this is that we can immediately plug in a large value of n to give an approximation of π. Here are some values of n and π based on this formula (and one day I'll work out how to put a table into this blog).

n - π
100 - 3.141076
200 - 3.141463
300 - 3.141535
1000 - 3.141587
2000 - 3.141591
3000 - 3.1415920
10,000 - 3.14159260191
100,000 - 3.14159265307

I must say I like this method; it's simple trigonometry (not calculus, and not sampling either) and I was very surprised at how easy it was to obtain a reasonable value of π from a polygon with just 100 sides.

One of my regular readers has asked me to calculate the value of π for a polygon on the outside of a circle; I'll leave that as an exercise for the reader, and point you to Archimedes' method for calculating π - it's got a nice flash display for the calculation of the internal and external polygon. Another benefit of this method over the previous sampling method is that this is a one-off calculation - we can calculate π from a large number of sides without having to take a large number of measurements. No chance of crashing the spreadsheet then!

Next time, something different - geostationary satellites - what they are, and why they have to orbit at a specific height - and what that height is!

My Series on Determining The Value Of Pi

1. An upper limit on the value of pi simple but a place to start!
2. A lower limit on the value of pi also simple, but leading to better approximations.
3. Approximating pi by sampling
4. Approximating pi using an infinite polygon

Friday, 7 January 2011

Maths Problems 3C: Estimating pi by sampling

In response to my first post about pi, my friend Chris Timbey pointed out that he's previously written a computer program which will estimate pi by determining if a random point in a square is also in a quadrant drawn within that square.  The diagram below shows how this would work.


Not only is pi the ratio of a circle's circumference to its diameter (C = pi x d), but the area of a circle is pi r2, so we have another way of approximating the value of pi.
The cartesian equation (using x and y) for a circle is x2 + y2 = 1. By taking random values of x and y and determining if the value of x2 + y2 is greater than or less than 1, we can calculate the ratio of the area of the quadrant to the area of the square.

This is where a computer comes in very handy.  The basic program works thus:
1.  Obtain random values of x and y between 0 and 1.
2.  Square x and y, and sum the two values.
3.  If the sum of x2 + y2 is less than 1, then count this as 'within the quadrant', otherwise count it as outside the quadrant.
4.  Repeat the first three steps a large number of times.
5.  Calculate the proportion of counts 'within the quadrant' to the total number of counts (both inside and outside the quadrant).
6.  Multiply this proportion by 4, since there are four quadrants in a circle.

For example:
Random value of x = 0.252
Random value of y=0.881
x2 + y= 0.840 so this is within the quadrant.

This takes a large number of iterations to produce an accurate result.

Here are my results; iterations on the left, value of pi on the right:
100  -  3.08
200  -  3.12
1000 - 3.212
5500 - 3.167272 (recurring)
10,000 - 3.13040, also 3.1736, 3.1312  (repeating the experiment with 10,000 new random pairs).
15,000 - 3.13040 (11739/15000)
Beyond this, my spreadsheet starts grinding to a slow and painful halt, but at least by 10,000 iterations it's mostly hitting pi to one decimal place.  This will always be an approximation, since it's based on a fraction (no matter how precise), and pi, being an irrational number, doesn't much like being expressed as a fraction!

Next time - approximation of pi based on a regular polygon with thousands of sides.

Thursday, 6 January 2011

Mathematical Problems 4: Close packed circles

While I was at university, I remember studying close-packed spheres and how they form in crystalline structures.  We were given the figure that close-packed spheres occupy the largest proportion of space available - more than they'd fill if they were arranged in squares, for example.

To explain what close-packed circles look like, here's a diagram.

Sometimes, they're described as hexagonally close-packed; as you can see from the diagram, the circles form hexagonal arrangements.  This makes it easier to calculate how much of the area the circles are filling... especially if we break the hexagon down into equilateral triangles...


Now, the triangle marked in bold contains three sixths of a circle - half the circle, in other words, which has an area of A = 0.5 x pi r2

The triangle is an equilateral triangle (all sides are equal, all angles are equal at 60 degrees).  I don't know any shortcuts for working out the area of an equilateral triangle, so I'll do it long hand:

Area = base x height x 0.5

The base = the diameter of a circle = 2 r
The height is found through trigonometry:  tan 60 = h / r   therefore h = r tan 60

Area = 2 r x r tan 60 x 0.5
Area of triangle = r2 x tan 60

Area of half a circle (contained within the triangle) = 0.5 x pi x r2

The proportion of the triangle's area which is covered by the semi circle = area semicircle / area triangle

Proportion = 0.5 x pi x r2  / r2 x tan 60  and the r2 cancel, so proportion = 0.5 pi / tan 60

pi / 2 =1.5707
tan 60 = 1.732

Proportion = 1.5707 / 1.732 = 0.9069 which is 91%.

Now I accept I haven't worked it out for packing by spheres in space, but I thought I'd start simple and work from there...  maybe next time!






Tuesday, 4 January 2011

Mathematical Problems, 3B - A lower value of Pi

Returning to pi, and this time using geometry to calculate a minimum value.  Instead of using a square around the outside of a circle, this method will use a square within a circle.  Last time we looked at square ABCD, this time, it's WXYZ.


Now the circumference of the circle is greater than the perimeter of WXYZ.  We know this for sure because the shortest distance between two corners of a square is the straight line that connects them, and the circle is a curved line and therefore must be longer.

If we call the centre of the circle O, then we can see that WOX is a right-angled triangle, and WO = OX = radius of the circle.

Using Pythagoras, we can determine the length WX:

WX 2 = WO2 + OX2

And since WO = OX = radius of the circle, r, then WX2 = 2 r2
And WX = sqrt (2 r2)  = sqrt 2 x r

Now, the full perimeter of the square is four times WX (since the square has four sides),
4 WX = 4 sqrt (2 r2)  = 4 x sqrt 2 x r

We want to describe pi in terms of the diameter of the circle, not the radius, so substitute d = 2r and this gives

Perimeter of square (4 WX) = 4 x sqrt 2 x d/2
Perimeter of square = 2 x sqrt 2 x d

We know the circumference of the circle is pi x d
The perimeter of the square is 2 x sqrt 2 x d
Therefore, pi is greater than 2 x sqrt 2  (approximately 2.82)

Combining this with the result from the previous post gives us the approximation

2 sqrt 2< pi < 4

In my next post, I'll work out how to use superscripts and square root signs in HTML (I hope) and I'll show a way of approximating pi using statistics rather than geometry.  In a future post, I'll also look at close-packed circles, and calculate how much of the available area they can fill, then extend this to close-packed spheres.

My Series on Determining The Value Of Pi

1. An upper limit on the value of pi
2. A lower limit on the value of pi
3. Approximating pi by sampling
4. Approximating pi using an infinite polygon

Thursday, 30 December 2010

Mathematical Problems, 3A - The Value of Pi

Back when I was doing my A-levels, I remember learning about how it's possible to evaluate pi in various ways, one of which was through calculus.  I can only remember the basics, and I'm sure I can't recall how to do it now - at least not without some help!

The value of pi is the ratio of the circumference of a circle (the distance all the way around the outside of the circle) divided by the diameter (the straight-line distance from one side to the other, through the centre).  It's been known historically to be about 3, but I'm going to make some approximations from first principles.

Firstly, drawing a square around a circle, so that the square touches the circle.  See the diagram above, with the square ABCD around the circle.

If the diameter of the circle is d, then the perimeter of the square is 4d.  We can see by inspection that the square's perimeter is longer than the circle's circumference, and we've called the circumference pi d.  Therefore, we know that pi is less than 4.

It's not a dramatic result, I know, but it's a start!

Next, we need to look at setting a minimum value for pi, and we'll look at this next time.

My Series on Determining The Value Of Pi

1. An upper limit on the value of pi
2. A lower limit on the value of pi
3. Approximating pi by sampling
4. Approximating pi using an infinite polygon