summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/asymptote/three_tube.asy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-26 21:51:04 +0000
committerKarl Berry <karl@freefriends.org>2020-03-26 21:51:04 +0000
commit26b61329ccfef7f8de119d7cf2ae772288e1497d (patch)
tree7576a5419d690e238031fb23fc92d17ebdab279d /Master/texmf-dist/asymptote/three_tube.asy
parent9d8ff0db40a3ccd5826fee73d7e3fb916b9f1841 (diff)
asymptote 2.65 support files
git-svn-id: svn://tug.org/texlive/trunk@54567 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/asymptote/three_tube.asy')
-rw-r--r--Master/texmf-dist/asymptote/three_tube.asy11
1 files changed, 4 insertions, 7 deletions
diff --git a/Master/texmf-dist/asymptote/three_tube.asy b/Master/texmf-dist/asymptote/three_tube.asy
index a5b8f3cc89c..3a7902587e9 100644
--- a/Master/texmf-dist/asymptote/three_tube.asy
+++ b/Master/texmf-dist/asymptote/three_tube.asy
@@ -14,12 +14,10 @@ struct rmf {
// Rotation minimizing frame
// http://www.cs.hku.hk/research/techreps/document/TR-2007-07.pdf
-rmf[] rmf(path3 g, real[] t)
+rmf[] rmf(path3 g, real[] t, triple perp=O)
{
- static triple s0;
triple T=dir(g,0);
- triple Tp=cross(s0,T);
- Tp=abs(Tp) < sqrtEpsilon ? perp(T) : unit(Tp);
+ triple Tp=abs(perp) < sqrtEpsilon ? perp(T) : unit(perp);
rmf[] R=new rmf[t.length];
R[0]=rmf(point(g,0),Tp,T);
for(int i=1; i < t.length; ++i) {
@@ -40,11 +38,10 @@ rmf[] rmf(path3 g, real[] t)
} else
R[i]=R[i-1];
}
- s0=R[t.length-1].s;
return R;
}
-rmf[] rmf(triple z0, triple c0, triple c1, triple z1, real[] t)
+rmf[] rmf(triple z0, triple c0, triple c1, triple z1, real[] t, triple perp=O)
{
static triple s0;
@@ -76,7 +73,7 @@ rmf[] rmf(triple z0, triple c0, triple c1, triple z1, real[] t)
T=z1-z0+3.0*(c0-c1);
}
T=unit(T);
- triple Tp=cross(s0,T);
+ triple Tp=perp == O ? cross(s0,T) : perp;
Tp=abs(Tp) < sqrtEpsilon ? perp(T) : unit(Tp);
rmf[] R=new rmf[t.length];
R[0]=rmf(z0,Tp,T);