|
|
On Mon, 2 Feb 2004 12:11:37 -0000, Tom Melly <tom### [at] tomandlucouk> wrote:
> See: http://www.uk.ccl.com/tom/bi_circ.gif for accompanying illustration.
>
> Given a circle of radius r1 with a centre at <0,0,0>, how do I calculate
> the
> radius (r2) and vertical displacement (h2) of a second circle, such that
> the two
> circles bisect each other at y=0 with a particular height (h1) of the
> second
> circle at its apex?
>
> Hopefully the attached link will clear up any ambiguities in what I'm
> asking.
>
> (I have to admit that the question has become slightly academic, since
> I've
> accomplished roughly what I needed with two identical circles, and some
> scaling
> of y on the second circle)
>
<code>
//All the Math
#declare x1=0;
#declare y1=-r1;
#declare x2=-h1;
#declare y2=0;
#declare x3=0;
#declare y3=-r1;
#declare ma=(y2-y1)/(x2-x1);
#declare mb=(y3-y2)/(x3-x2);
#declare myx=((ma*mb*(y1-y3))+(mb*(x1+x2))-(ma*(x2+x3)))/(2*(mb-ma));
#declare NewRadius=(h1)+myx;
</code>
Is the way I found to do it; finds the centre of the new circle from three
points. You might want to check my math though:)
--
Phil
--
All thoughts and comments are my own unless otherwise stated and I am
happy to be proven wrong.
Post a reply to this message
|
|