To restate the problem:
given:	v1 = <a, b, c> and
	v2 = <d, e, f>
	v1 not parallel to v2
	angle r
How do you find v3 = <g, h, i> such that the angle between v1 and v3 is 
r, and v1, v2, and v3 are coplanar?
There is at least one restriction I missed there, that v1 is rotated 
"towards" v2 by the angle r to achieve v3.  (if r was negative it would 
be "away").
I would like to see an answer like g = f(a, d); h = f(b, e); i = f(c, f)
but anything would be helpful!
Thanks in advance!
-Ben
snip
>To restate the problem:
>given:	v1 = <a, b, c> and
>	v2 = <d, e, f>
>	v1 not parallel to v2
>	angle r
>How do you find v3 = <g, h, i> such that the angle between v1 and v3 is 
>r, and v1, v2, and v3 are coplanar?
>
>There is at least one restriction I missed there, that v1 is rotated 
>"towards" v2 by the angle r to achieve v3.  (if r was negative it would 
>be "away").
what please is "towards" ? the problem can be reduced into a two dimensional
one (irrespective of the dimension of v_i) Now, usually towards means
in the mathematical positive sense, hence counterclockwise?
                    *  *
                 *     |  *
                *      |    *
               *       |     *
               *        ------------------->  VT1
               *      /
                * \  /
                 _* /
                   /
                  /
                 VT2 
>I would like to see an answer like g = f(a, d); h = f(b, e); i = f(c, f)
>but anything would be helpful!
>Thanks in advance!
>-Ben
now the reduction to this case:
you use two Householder reflectors to do this (and after rotation
in the x1-x2-plane transform back)
If 
   v1 = (a,b,c)'     (I think of vectors always as columns)    
then
   h1= ( sign(a)*(|a|+sqrt(a^2+b^2+c^2)) , b  , c )'   
          (here sign(0)=1)
and you set 
   vt1 = sign(a)*v1 -2* sign(a)*h1* (h1'*v1)/(h1'*h1)
   vt2 = sign(a)*v2 -2*sign(a)*h1*(h1'*v2)/(h1'*h1)  = ( g,h,i)' (say)
(the corresponding Householderreflector is 
    sign(a)*(Id - (2/(h1'*h1))*h1*h1' )     
remark: h1'*h1 is a scalar, the sum of squares of the components of h1, but
h1*h1' is a 3 by 3 matrix.})
Now vt1 is a positive multiple of (1,0,0)' . 
next you treat vt2 similar:
    h2 = ( 0 , sign(h)*(|h|+sqrt(h^2+i^2)),i )'
    vtt2=sign(h)*vt2 - sign(h)*2*((h2'*vt2)/(h2'*h2))*h2 ;
    vtt1 =sign(h)*vt1  
now vtt2 has a positive second component and a zero in component 3. 
vtt1 is a positive multiple of (1,0,0)' if h>=0  and otherwise a negative
multiple.
(if vectors are longer, anything is done word for word the same way, the sqrt()
has as argument the sum of squares of the components 1..n resp 2..n and the 
remaining components of the h_i are copies of the components of the vectors to be
treated. )
what you mean by "towards" is now determined by those signs.
now the rotation applies to components 1 and 2 only, multiplying them by
the matrix 
    [ cos(phi) ,  -sin(phi) ]
    [ sin(phi) ,  cos(phi)  ] 
where 0<phi<2*pi is in radians    
this is counterclockwise, if you need it clockwise, exchange the "-" before the
"sin" (i.e. transpose the matrix).
now the vector wanted is obtained by transforming it (vvt1-rotated) back 
in reverse order
   multiply by sign(h) to obtain some vector w,
   then
   w_back=sign(a)*w-sign(a)*2*(h1'*w)/(h1'*h1)
done (and hopefully correct)
peter
 
Hello Ben,
v3 = v3|| + v3|_ (where v3|| is parallel to v1), so you get
v3 = cos(r) * v1 + sin(r) * (v1 x v2) x v1 / |v1 x v2|
(where x denotes the cross product of 2 vectors and |v| is the lenght of
a vector v). This can also be transformed into
v3 = cos(r) * v1 + sin(r) * ((v1 v1) v2 - (v1 v2) v1) / |v1 x v2|
(where (v1 v2) is the dot product of the 2 vectors).
For other vector rotating problems have a look at my webpage (in german) at
http://www.tu-chemnitz.de/~luta/drawlat/drawmath.html
Hope this helps,
Lutz Tautenhahn