[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2397.0. "A brain-teaser." by SUBSYS::BUSCH (Dave Busch, NKS1-2/H6) Fri Mar 24 1989 14:08

I've been fooling around for a while (with no success) trying to come up with
the solution to the following set of equations. 

Given:	Constants A through L.
Find:	X, Y and Z.

	A� = (X-B)� + (Y-C)� + (Z-D)�		{sphere 1}
	E� = (X-F)� + (Y-G)� + (Z-H)�		{sphere 2}
	I� = (X-J)� + (Y-K)� + (Z-L)�		{sphere 3}

(note: for those without superscript capability on there terminals, all of the 
above terms are squared.)

Simply stated, it's the solution for the intersection of three spheres, where A,
E and I are the radii of the spheres and B, C and D are the X, Y and Z
co-ordinates of the center of the first sphere, etc. 

There are no special cases to worry about, such as coincident spheres or
imaginary roots since the data is to be generated from a real world application.
For the record, I'm trying to build a three-dimensional digitizer for the Amiga.
The input data will come from a set of three shaft encoders which I'm currently 
bread-boarding at home.

If anybody would care to try their hand at this little puzzle, I'd appreciate 
hearing from them. (It's been a while since I got out of school ;^)

Dave
T.RTitleUserPersonal
Name
DateLines
2397.1GOTO BRAIN_BOGGLERSLINCON::MGAINESMon Mar 27 1989 11:385
    Dave, plug this into the brain_bogglers notes file. I recall a few
    responses from several math majors. They should be able to easily
    answer the question. As for me yips....
    
    			MAG
2397.2Or the MATH notes fileMEMORY::BERKSONThink honk if you're a telepathMon Mar 27 1989 11:501
    
2397.3LEDS::ACCIARDIMon Mar 27 1989 12:468
    
    Hmmmm... simultaneous cubic equations... that's a tough one.  I
    have some BASIC routines for solving simultaneous equations by matrix
    inversion (Cramer's Rule), but it only handles first order variables.
    
    I'll have to ponder this one...
    
    Ed.
2397.4Code wheel artwork wanted.SUBSYS::BUSCHDave Busch, NKS1-2/H6Mon Apr 03 1989 13:4871
I've solved the equations that I stated in .0 so now I'm working on the
hardware. I've already built the photo-sensors etc. but what I need now is the
artwork for the coded wheel to build into the sensors. If anybody with access to
a workstation of some sort would care to give me a hand I'd appreciate it. 

What I need is a sixel file for printing the following image on an LN03:

1. Draw a pair of concentric circles, .25" and 1.8" diameters, respectively.

2. Connect the two circles with radial lines every 10 degrees.

3. Fill every other segment of the circle with black.

4. Repeat 1-3 above, but with the outer circle having a 1.8" diameter and with 
   the radial lines every 20 degrees. 

Dave

P.S. In case anyone is interested, the solution to the intersecting spheres is:
Spheres:	3-31-89
________________________________________________________________________________

Given:	a = radius of sphere with center at (0,0,0)	Find:	x
	b = radius of sphere with center at (d,e,0)		y
	c = radius of sphere with center at (f,g,0)		z

(1)	z� = a� - x� - y�
(2)	z� = b� - (x-d)� - (y-e)�
(3)	z� = c� - (x-f)� - (y-g)�

Combining (1) and (2)...

	b� - (x-d)� - (y-e)� = a� - x� - y� 
	b� - x� + 2dx - d� - y� + 2ey - e� = a� - x� - y�
	b� + 2dx - d� + 2ey - e� = a� 
	2dx = -2ey + a� - b� + d� + e�
(4)	x = (-2ey + a� - b� + d� + e�) / 2d

Combining (2) and (3)...

	b� - (x-d)� - (y-e)� = c� - (x-f)� - (y-g)�
	b� - x� + 2dx - d� - y� + 2ey - e� = c� - x� + 2fx - f� - y� + 2gy - g�
	b� + 2dx - d� + 2ey - e� = c� + 2fx - f� + 2gy - g�
	2x(d-f) = 2y(g-e) - b� + c� + d� + e� - f� - g�
(5)	x = [2y(g-e) - b� + c� + d� + e� - f� - g�] / 2(d-f)

Combining (4) and (5)...

	(-2ey +a�-b�+d�+e�) / 2d    = [2y(g-e) -b�+c�+d�+e�-f�-g�] / 2(d-f)
	(d-f)(-2ey +a�-b�+d�+e�)    = d[2y(g-e) -b�+c�+d�+e�-f�-g�]

	-2ey(d-f) + (d-f)(a�-b�+d�+e�) = 2dy(g-e) + d(-b�+c�+d�+e�-f�-g�)

	-2ey(d-f) - 2dy(g-e)        = d(-b�+c�+d�+e�-f�-g�) - (d-f)(a�-b�+d�+e�)
	-2dey + 2efy - 2dgy + 2dey  = d(-b�+c�+d�+e�-f�-g�) - (d-f)(a�-b�+d�+e�)
	2efy - 2dgy                 = d(-b�+c�+d�+e�-f�-g�) - (d-f)(a�-b�+d�+e�)
	2y(ef - dg)                 = d(-b�+c�+d�+e�-f�-g�) - (d-f)(a�-b�+d�+e�)

	y = [d(-b�+c�+d�+e�-f�-g�) - (d-f)(a�-b�+d�+e�)] / 2(ef - dg)
	y = [d(-b�+c�+d�+e�-f�-g�) - d(a�-b�+d�+e�) + f(a�-b�+d�+e�)]/2(ef - dg)
	y = [d(+c�-f�-g�) - d(a�) + f(a�-b�+d�+e�)] / 2(ef - dg)

(6)	y = [d(-a�+c�-f�-g�) + f(a�-b�+d�+e�)] / 2(ef - dg)

(4)	x = (-2ey + a� - b� + d� + e�) / 2d

And from (1)...
	      ____________
(7)	z = \/a� - x� - y�

________________________________________________________________________________