Hi Jim^2,[Sorry, couldn't resist.]
Aren't we trying to lay out marks FROM a computer screen or a piece of paper TO
the real thing on the ground?
So aren't we trying to FIND the radii of the distance circles GIVEN the
coordinates of the target point and the location of the second reference point
that Ron refers to?
That being the case here are my calcs using Ron Anthony's A and B when he first
surfaced this two reference point approach on Tue, 25 May 1999 14:17:32 -0700
, after he awoke from his semi-sleep!;-)
ASSUMPTIONS:
Horizontal, flat (usually impractical) dial surface.
Cartesian, X-Y, system has origin at A and +Y is North (LET THE AUSSIES DO IT
THEIR WAY!! :-))
Polar, R-Theta, system has origin at A and Zero Theta is East.
KNOWN:
The location (COORDINATES) of each target point on a computer screen or on
paper with reference to one origin in either polar (R, THETA) or cartesian
coordinates (X, Y).
The location of reference point B with respect to reference point A on the
ground. Lets follow everyone's simplification and agree that B is N metres
North of A and that A is at the centre of the dial circle or, equivalently, at
the intersection of the gnomon and the dial surface.
REQUIRED:The distance of the target point from each of two points A and B
on the ground.
Terminology:
Let
N = the distance, in metres, of Point B, North of Point A on the ground.
A = the distance, in metres, of the target point from Point A on the ground.
B = the distance, in metres, of the target point from Point B on the ground.
(X,Y) = the cartesian coordinates, in metres, of the target point with respect
to an origin at A.
(R,T) = the polar coordinates, in metres and radians, of the target point with
respect to an origin at A.
SOLUTIONS:
Cartesian:
A = SQRT(X^2 +Y^2)
B = SQRT(X^2 + (Y-N)^2)
Polar:
A = R
B = SQRT((RCosT)^2 + (RSinT-N)^2)
which simplifies a bit to,
B = SQRT(R^2 + N^2 - 2RNSinT)
These are easily calculated and displayed using a spreadsheet like Excel, the
major challenge being, for me, getting the stuff imported into Excel from my
design application. Dratted I/O files! Reminds me of FORTRAN! Yecch!
(Okay, if you really want to be an Aussie, put a negative value for N in the
above. Only take positive roots, since the radii, A B, are both positive.
If you end up with any imaginary roots the evening sun has set past the yardarm
so it is time to take a swig o' The Medicinal and wait 'til the mornin' sun
and use John Carmichael's Solution C.)
BTW, John, have we worked this one to death yet?
Cheers,
t
Jim_Cobb wrote:
In the special case described earlier the math is even easier. We
want two reference points, P with coordinates (0, 0) and Q, due north
of P (or south if you're an Aussie) at (0, a) at distance a from P.
Then the points at distance r from P and distance s from Q may be
found by solving the two quadratic equations:
x^2 + y^2 = r^2
and
x^2 + (y-a)^2 = s^2
What is nice about this setup is that y has a very simple solution.
Subtract the two equations to get
(y-a)^2 - y^2 = s^2 - r^2
expand
y^2 - 2 a y + a^2 - y^2 = s^2 - r^2
and conclude
y = (a^2 - s^2 + r^2) / 2 a
Then solve for x
x = +- sqrt(r^2 - y^2)
choosing the +/- root depending on whether the point is to the East or
West of line PQ.
If you find yourself attempting to take a square root of a negative
number, the circles do not intersect (more specifically, they have no
real points of intersection).
You will notice that you never make use of r or s. If you just use
the squares of their values the arithmetic is simplified even more.
Jim
--- --
| Jim Cobb | 540 Arapeen Dr. #100 | [EMAIL PROTECTED] |
| Parametric| Salt Lake City, UT | (801)-588-4632 |
| Technology Corp. | 84108-1202 | Fax (801)-588-4650 |
--- --
Science is trained and organized common sense. -- Alfred, Lord Tennyson
Jim Morrison [EMAIL PROTECTED] wrote:
Here is one way to calculate the intersection points of two circles:
Given circle of radius r1 at origin: x^2 + y^2 = r1^2
Circle at (x0,y0) with radius r2: (x-x0)^2 + (y-y0)^2 = r2^2
Intersection points between the circles lie on a line:
y = mx + b
Where: m = -x0/y0
b = - 1/2y0 (r2^2 - r1^2 - y0^2 - x0^2)
x = (-mb +/- SQR(m^2 b^2 - (m^2+1)(b^2-r1^2)) / (m^2 + 1)
If the roots of x are imaginary (i.e. the radical is negative) then
there is no intersection.
Adjust coordinates of intersecting circle relative to base circle.
I have this function coded in C, QBASIC and assembler if anyone wants it.
Best regards,
Jim
James E. Morrison
Astrolabe web pages at: http://myhouse.com/mc/planet/astrodir/astrolab.htm
--
Tom Semadeni O
[EMAIL PROTECTED]