At 07:56 PM 5/30/2012, Troy Henderson wrote:
Well then in case anyone needs such a transformation, I've
constructed the (non-unique) transformation T
> t:=angle(f,e);
> q:=e++f;
> p:=(c*f-d*e)/q;
> s:=(c*e+d*f)/(q**2);
> transform T;
> T:=identity rotated t xscaled p yscaled q slanted s shifted (a,b);
This yields T=(a,b,c,d,e,f).
You can implement something like what you wanted directly
because, just as you can write equations for the parts of
a pair, you can also write equations for the parts of a
transform:
vardef mktransform (expr a,b,c,d,e,f) =
save T_; transform T_;
xpart T_ = a;
ypart T_ = b;
xxpart T_ = c;
xypart T_ = d;
yxpart T_ = e;
yypart T_ = f;
T_
enddef;
After this
transform T;
T := mktransform (1,2,3,4,5,6);
show T;
produces:
>> (1,2,3,4,5,6)
Regards,
Dan
Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas
http://www-cs-faculty.stanford.edu/~knuth/iaq.html
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________