|
![](/i/fill.gif) |
#macro TorusConnect(p1,mj1,mn1,p2,mj2,mn2)
#local Dist = sqrt(pow(p1.x-p2.x,2)+pow(p1.y-p2.y,2)+pow(p1.z-p2.z,2));
#local Ang1 = atan2((mn1+mj1-mn2-mj2)/Dist,1);
#local Ang2 = asin((mn1-mn2)/sqrt(pow(Dist,2)+pow(mn1+mj1-mn2-mj2,2)));
cone { p1+vnormalize(p2-p1)*mn1*sin(Ang1+Ang2),mj1+mn1*cos(Ang1+Ang2)
p2+vnormalize(p2-p1)*mn2*sin(Ang1+Ang2),mj2+mn2*cos(Ang1+Ang2)
}
#end
If you want the math behind it I can give it to you :-)
And if you want a second cone differenced out of it to smoothly connect the
interior as well, most of the work is already done.
--
___ _______________________________________________
| \ |_ <dav### [at] faricy net> <ICQ 55354965>
|_/avid |ontaine http://www.faricy.net/~davidf/
"The only difference between me and a madman is that I'm not mad." -Dali
Post a reply to this message
|
![](/i/fill.gif) |