IUBio GIL .. BIOSCI/Bionet News .. Biosequences .. Software .. FTP

simple problem

Lothar Esser esser at chop.swmed.edu
Tue May 23 10:31:53 EST 2000


Mark wrote:

> Given the cartesian coordinates of
> two points a and b in 3D space, I need the position
> of a third point c such that the angle c-a-b has a fixed
> value, say 104.5 degrees.
>
>           c
>            \
>             a - b
>
> how can I obtain the coordinates (x,y,z) of c from the
> known coordinates of a and b?
> Clearly there are many equivalent choices of c satisfying
> this requirement; what I'm looking for is simply the direction of some
> a-c axis which form the required angle with the a-b axis.
>
> is it a trivial problem? I haven't found a solution...
> any help appreciated
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Hi Mark,

   it seems that this is not quite as easy as it appears. Yesterday ,
just as I was about to finish an elaborate answer to your question, my
netscape browser had a segmentation fault. I don't feel like typing it in
again but in short, the answer of a simple minded chemist would be
something like this:
I started by defining b' to be on the negative x axis, a' was in the
origin and the cone extended to the postive x axis. The cone can be
defined by C ( the distance from a  to c ) and the angele PHI which is
180 - 104.5.  The actual position of c' on the surface of the cone can be
parameterized by defining an angle say PSI which tells you by how much c'
is rotated out of  the xy plane.
This is essentially all, except that one needs to rotate the system until
the vector b'-a' is parallel with b-a and then translate it by a. This
part is a bit messy.

T
c(new) = a + |My * |Mz *|Rx ( PSI) * ( C* cos(PHI), C*sin(PHI), 0)

This is the equation I came up with. Again in short:

c (new) is a point on the surface of the cone.
PHI is the angle between c-a and b-a or in your case 180 -104.5. deg (
cone angle ).
C is the length of c-a.
PSI is the angle by which c' is rotated out of the xy plane.
Rx is the rotation matrix around x given the angle PSI.
Mz is the rotation matrix that moves (-B,0,0) to ( -sqrt(b'x^2 +b'y^2),
0, b'z)
My is the rotation matirx that moves it to (b'x,b'y,b'z)
and

a is the translation vector that moves the origin to a and b' to b.

If you need more details I will be glad to give them to you. But I need
to send it off before my browser crashes again.

Lothar Esser


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://iubio.bio.indiana.edu/bionet/mm/molmodel/attachments/20000523/326c70fe/attachment.html


More information about the Molmodel mailing list

Send comments to us at archive@iubioarchive.bio.net