Re: [Haskell-cafe] Geometry

2007-08-27 Thread Arie Groeneveld
Steve Schafer wrote: x = a - sqrt(a^2 - b^2) I don't know offhand if there's a straightforward way to arrive at this result without using trigonometry. Here you go, though with a slightly different result (same as Joel Koerwer): a^2=(b^2)/4+(a-x)^2 (Pythagoras) solving x: -- x(1,2) = a

Re: [Haskell-cafe] Geometry

2007-08-27 Thread Arie Groeneveld
Correction stefan a b = a - a * sqrt (1 - b*b / a*a) should be: stefan a b = a - a * sqrt (1 - b*b / (a*a)) *Main stefan 10 8 4.0 (0.01 secs, 524896 bytes) Thanks @@i ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Geometry

2007-08-27 Thread Steve Schafer
On Mon, 27 Aug 2007 19:05:06 +0200, you wrote: Where do I go wrong (I)? b is defined to be _half_ of the chord (the semichord, I suppose). You're assuming it to be the entire chord. Steve Schafer Fenestra Technologies Corp. http://www.fenestra.com/

Re: [Haskell-cafe] Geometry

2007-08-27 Thread Chaddaï Fouché
2007/8/27, Steve Schafer [EMAIL PROTECTED]: b is defined to be _half_ of the chord (the semichord, I suppose). You're assuming it to be the entire chord. Based on the drawing I thought it was the length of the arc (in blue) ? -- Jedaï ___

Re: [Haskell-cafe] Geometry

2007-08-27 Thread Peter Verswyvelen
The author of the question (Tony Morris) actually asked two different questions, and so people gave two different replies :) To quote Tony: "I may have misunderstood his problem (we were drawing in dirt) and actually, it is the straight line between the two points on the circumference that

[Haskell-cafe] Geometry

2007-08-26 Thread Tony Morris
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went camping on the weekend and a friend of mine who is a builder asked me many questions on geometry as they apply to his every day work - - most of which I could answer. However, there was one that I couldn't and I am having trouble googling a

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Joel Koerwer
Hi Tony, x is called the sagitta. At least when making a telescope mirror it is[1]. By bisecting your angle with another radius, you'll see that you have a right triangle with hypotenuse a, and legs of length (b/2) and (a-x). Then sagitta a b = a - sqrt (a*a - b*b/4) Considered as a function

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Chaddaï Fouché
You've got a which is the radius of the circle, and b which is the length of the arc, thus you've got the angle between the two red radiuses : u = b / a So with basic trigonometry, we can deduce a - x = a * cos(u/2) x = a *( cos(u/2) - 1) -- Jedaï ___

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Stefan O'Rear
On Mon, Aug 27, 2007 at 11:04:58AM +1000, Tony Morris wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went camping on the weekend and a friend of mine who is a builder asked me many questions on geometry as they apply to his every day work - - most of which I could answer.

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Chaddaï Fouché
2007/8/27, Chaddaï Fouché [EMAIL PROTECTED]: You've got a which is the radius of the circle, and b which is the length of the arc, thus you've got the angle between the two red radiuses : u = b / a So with basic trigonometry, we can deduce a - x = a * cos(u/2) x = a *( cos(u/2) - 1) --

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Steve Schafer
On Mon, 27 Aug 2007 11:04:58 +1000, you wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I went camping on the weekend and a friend of mine who is a builder asked me many questions on geometry as they apply to his every day work - - most of which I could answer. However, there was one that

Re: [Haskell-cafe] Geometry

2007-08-26 Thread Steve Schafer
On Sun, 26 Aug 2007 21:30:30 -0400, you wrote: I don't know offhand if there's a straightforward way to arrive at this result without using trigonometry. Duh. Of course there is Steve Schafer Fenestra Technologies Corp. http://www.fenestra.com/