 Search:

# MS Office Forum

Ask Question   UnAnswered
RSS Feeds

# 2003 - Trigonometry puzzle

Asked By: Heena    Date: Oct 22    Category: MS Office    Views: 2592

One for all of you maths wizzers out there.

I have the length of a chord across a circle and the length of the same
chord around the circle.

How can I find the radius of the circle using Excel?

Share:

### 21 Answers Found

Answer #1    Answered By: Aylin Kaya     Answered On: Oct 22

Try downloading the following file:
cid-f30e41eb2c49c429.skydrive.live.com/.../Excel%20Public/Handy|_07\
|_17|_08.xls

Answer #2    Answered By: Rhys Evans     Answered On: Oct 22

If you are having trouble with the previous link, try:

cid-f30e41eb2c49c429.skydrive.live.com/.../Excel%20Public

then select Handy.

Answer #3    Answered By: Mildred Bailey     Answered On: Oct 22

I don't understand "chord around the circle". In my limited
recollection, a chord can only exist inside a circle. a.k.a. a
straight line segment with end points on the circumference.

Could it be the length of one of the (two possible) sections of the
'circumference' which is defined by the chord endpoints?

Unless you're talking music, guitar chords and the circle of fifths.
(which, though I should, I don't know anything about anyway)

Answer #4    Answered By: Lee Butler     Answered On: Oct 22

You got it right 1st time Steve... I mean the length of the bit of the
cirvumference.

How late? I know I received this at 06:37 but I don't know which bit of the
globe you're on.

Answer #5    Answered By: Jennifer Davis     Answered On: Oct 22

I think the OP meant "circumferance" by "chord around circle".

Answer #6    Answered By: Beaudi Smith     Answered On: Oct 22

Yes I think we might have a small vocabulary problem here.
Maybe you could check first:
http://www.1728.com/circsect.htm
and then reformulate your question.

Answer #7    Answered By: Candace Foster     Answered On: Oct 22

Okay guys... Sorry for not being too clear. Not read the whole thing yet but
... At the site Louise gave... I have the distance AB straight across and
the distance ADB... That is the shorter distance around the circumference
from A to B... And what I need is the radius of the circle.

Will go and look closer at the site now... Thanks

Answer #8    Answered By: Jo Fowler     Answered On: Oct 22

The last option is exactly what I want to do!!
Now all I have to do is find out how they do it! :-(
So... Still loking ... Any ideas?

Answer #9    Answered By: Blaze Fischer     Answered On: Oct 22

I've given up trying to construct a formula, but I think that if
you're in a hurry the following should do. You'll need to construct a
look-up table of:

theta vs [sin(theta/2) / theta] (theta in radians)

Calculate 1/2 x c/a, find the value of theta from your look-up table
having that value, then calculate r as a/theta

(I'm naming your circle arc "a", chord "c", and "theta" as the angle
subtended by the chord)

Here's the math:
circle arc: a=r x theta (radians)
or r=a/theta

triangle: sin(A)=opposite/hypotenus
or in this case
sin(theta/2)=c/2 / r

doing the math I get: sin(1/theta)/theta = 1/2 x c/a

Answer #10    Answered By: Pam Harrison     Answered On: Oct 22

The following code is what I've gleaned from JS source of the web site
Louise gave me.

I have no idea why the algorythm on that site works. Anyway... My VB
translation don't work :-(

I tested the site calculator by "asking" for the circumference of a circle
of radius 10.
This gave me 62.832.

I halved that and asked for the radius of a circle with a chord length of 20
and a "bow" .. Thanks John .. Of 21.416.

Thee site calculator... Wonder of wonders... Gave me a radius of exactly 10.

My VB code gives 119... Any idea what's going on at all?

Original relevant bit of JS...
--------------------------------
if (chc==0){chord=inp1;arclen=inp2;
arc2crd=inp2/inp1;
centang=4; <!-- radians -->
incr=4;
ct=0;
while (ct<75){
angratio=(centang)/(2*Math.sin(centang/2));
if
(angratio>arc2crd){incr=incr/2;centang=centang-incr}else{incr=incr*2;centang
=centang+incr};
ct=ct+1;}
ct=0;
radius=(chord/2)/(Math.sin(centang/2));
ans=radius;
apo=radius*radius - (chord/2)*(chord/2);apo=Math.sqrt(apo);
ans=apo;
centang=centang*(180/pival); ans=centang;
seghgt=radius-apo;ans=seghgt;

}
----------------------------------

My VBA code
----------------------------------
Sub subCalculateRadius_2()

Const pival = 3.14159265358979
Dim ct As Long
Dim radius As Long
Dim chord As Long
Dim apo As Long
Dim centang As Long
Dim arclen As Long
Dim inp1 As Long
Dim inp2 As Long
Dim chc As Long
Dim sigfig As Integer
Dim incr As Long '<!-- Increment -->
Dim angratio As Long '<!-- Angle Ratio for choice 8 -->
Dim arc2crd As Long '<!-- arc to chord ratio - for choice 8 -->

sigfig = 5
inp1 = 20
inp2 = 31.416

If chc = 0 Then
chord = inp1
arclen = inp2
arc2crd = inp2 / inp1
centang = 4 '<!-- radians -->
incr = 4
ct = 0
Do While ct < 75

angratio = (centang) / (2 * Sin(centang / 2))
If angratio > arc2crd Then
incr = incr / 2
centang = centang - incr
Else
incr = incr * 2
centang = centang + incr
End If

ct = ct + 1
Loop

ct = 0

radius = (chord / 2) / (Sin(centang / 2))
apo = radius * radius - (chord / 2) * (chord / 2)
centang = centang * (180 / pival)

MsgBox "Radius = " & radius & vbCrLf & "Central Angle = " & centang

End If
'********************************************************************
End Sub

Answer #11    Answered By: Shannon Hughes     Answered On: Oct 22

That should be 31.461.....................

Answer #12    Answered By: Clinton Edwards     Answered On: Oct 22

And guess what... I messed up the nomenclature again.

I mistakenly refered to the "bow" ... It should be the curve ADB.
Can I help it if "bow" implies a curve to me!!!

Anyways... I think by now everyone gets the gist. ... I hope...

Interestingly... If you do choose option Chord & Arc and enter 20 and 31.46
respectively then the apotherm is the same as the triangle area....
0.000036732. where... IMHO they should both be zero.

Answer #13    Answered By: Adelaide Fischer     Answered On: Oct 22

I think I reacted too promptly, without reading the next posts...
You've done it. And as for the code, I'll have to leave it to other
people.
Too bad for my hope to help...

Another time maybe.

Answer #14    Answered By: Blake Smith     Answered On: Oct 22

Thank you so much for your help so far!!! Have you anything "to do" with
mathematics? That site was so useful!!

What I would really like to do now but I have no idea how... Is to step
through the JS code at the same time as the VB and check for differences.

I have a minimum of JS from about 8 years ago... I think... Can't
remember... It's not recent anyway... I was trying to help make a friends
web site multilingual... Didn't work because I discovered... That you
need(ed) to write seperate pages for each language.

Ah well.

Again... Your input has been really important.. I hope the JS *and* VBA
people here can sort out what's going on.

I will slog away and post a positive or negative result in any case.

Answer #15    Answered By: Ryder Anderson     Answered On: Oct 22

I love anything that has to do with number, and in general, problems
solving.
Was always the first in my math classes.
You would not believe that I even love to prepare my Income Tax
report :-)
My husband found me "maniac" when, in the time where there was no
PCs, I held the family budget to the cent!
But then he found that pretty useful.

But from all the maths, trigonometry was not my preferred. I could do
it, but I am absolutely not "visual", and I preferred algebra much
more.
But it is all so long ago..

Answer #16    Answered By: Angelica Ramos     Answered On: Oct 22

My guess is that when conditional expressions are equal, VB defaults
to the Else condition, and JS to the If condition. If you change to

If angratio >= arc2crd Then

then you get the 'correct' answer (though not really)

Your input yields 2=2, thus shunting to the Else condition, which
happens to yield the wrong answer in this case.

Personally, I don't like the algorithm in that it isn't convergent to
the answer, just the increment.

Answer #17    Answered By: Lonnie Rogers     Answered On: Oct 22

Look at the source.
They did not hide their javascript code.
So I think that, with your programmer experience, (maybe print it
first) you'll be able find the formula your looking for and then
figure out how to write it for Excel.

Since javascript is much more familiar to me then VBA, if you don't
find, tell me exactly which option(s) you would select, and I'll find
the formula for you. I'd be so happy to be able to help for once!

Answer #18    Answered By: Hubba Akhtar     Answered On: Oct 22

The line ED, referred to as the Sagitta (Latin for arrow) is also called the
Bow of curve ADB.

Answer #19    Answered By: Candace Foster     Answered On: Oct 22

Yes indeedy ...

You've declared all the variables as Long. This is integer, so you've lost
all the floating point parts.

"ct" and "sigfig" should be declared as Integer. All the rest should be
declared as Double.

Having done that, I get 10.

Note also, that the original has the statement "apo=Math.sqrt(apo);" in it,
and you didn't transcribe that to VBA. It doesn't appear to be used in
calculation of the two results you're using, but it does affect the JS's
ans.

Answer #20    Answered By: Jo Fowler     Answered On: Oct 22

> My guess is that when conditional expressions are equal, VB defaults
> to the Else condition, and JS to the If condition.

Not sure I'm understanding you correctly here, but > means "greater than and
not equal" in both languages.

Answer #21    Answered By: Blaze Fischer     Answered On: Oct 22

On actually thinking rather than just typing, my comment most
certainly is absurd (A lot of embarrassment here). I noticed that if
the condition >= were used rather than just >, the correct answer was
(almost) obtained. I read your post on variable typing. I rarely
declare variables, (more embarrassment) so I incorrectly assumed that
Long was the same as Double, at least in that the fractional parts
were not discarded. I should've realized this just based on the output
(I'm beet red by now). The incorrect typing would also explain why the
algorithm was not convergent (and sensitive to initial conditions).

Didn't find what you were looking for? Find more on 2003 - Trigonometry puzzle Or get search suggestion and latest updates.

Tagged: