|
![](/i/fill.gif) |
Hi
Sebastian Strand wrote:
> Well, thanks to all three of you that presented a solution. I will now
> proceed to try and decide which one to use, probably by testing which macro
> parses quickest :)
Try this:
#macro TorusConnect(SP,SMaR,SMiR,EP,EMaR,EMiR)
#local a=EP-SP;
#local b=SMaR-EMaR;
#local c=SMiR-EMiR;
#local d=vdot(a,a);
#local e=d+b*b;
#local f=sqrt(d);
#local g=sqrt(e-c*c);
#local h=(f*g-c*b)/e;
#local i=(f*c+g*b)/e;
#local j=a/f;
cone { SMiR*i*j+SP,SMiR*h+SMaR,(EMiR*i+f)*j+SP,EMiR*h+EMaR }
#end // macro TorusConnect
Tor Olav
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
![](/i/fill.gif) |