diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-24 18:33:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-24 18:33:44 +0000 |
commit | dbd941ed19b558edd09219a372b2b0832957b283 (patch) | |
tree | 9c6af6f3924d8b1fff6638e510a907306342fa7d /Master/texmf-dist/doc/asymptote/examples/splitpatch.asy | |
parent | a360890a6c2a4befab6b48084d0731ad09c46631 (diff) |
asymptote 2.69 support files
git-svn-id: svn://tug.org/texlive/trunk@57876 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/splitpatch.asy')
-rw-r--r-- | Master/texmf-dist/doc/asymptote/examples/splitpatch.asy | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/splitpatch.asy b/Master/texmf-dist/doc/asymptote/examples/splitpatch.asy index f8578bbbcc9..1fa9325f4ce 100644 --- a/Master/texmf-dist/doc/asymptote/examples/splitpatch.asy +++ b/Master/texmf-dist/doc/asymptote/examples/splitpatch.asy @@ -33,10 +33,10 @@ struct split if(depth > 0) write(pt.tree[i],qt.tree[j],Pi,Qj,depth); } - } + } } } - + // Output the subpatches of p from subdivision. void read(surface[] S, tree t, triple[][] p, int depth=n) { --depth; @@ -44,7 +44,7 @@ struct split triple[][][] P=Split(p); for(int i=0; i < 2; ++i) { - if(t.tree.initialized(i)) + if(t.tree.initialized(i)) read(S,t.tree[i],P[i],depth); else { S[0].push(patch(P[i])); @@ -62,19 +62,21 @@ struct split currentprojection=orthographic(0,0,1); -triple[][] A={ - {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, - {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)}, - {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)}, - {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)} -}; +triple[][] A= + { + {(0,0,0),(1,0,0),(1,0,0),(2,0,0)}, + {(0,4/3,0),(2/3,4/3,2),(4/3,4/3,2),(2,4/3,0)}, + {(0,2/3,0),(2/3,2/3,0),(4/3,2/3,0),(2,2/3,0)}, + {(0,2,0),(2/3,2,0),(4/3,2,0),(2,2,0)} + }; -triple[][] B={ - {(0.5,0,-1),(0.5,1,-1),(0.5,2,-1),(0.5,3,-1)}, - {(0.5,0,0),(0.5,1,0),(0.5,2,0),(0.5,3,0)}, - {(0.5,0,1),(0.5,1,1),(0.5,2,1),(0.5,3,1)}, - {(0.5,0,2),(0.5,1,2),(0.5,2,2),(0.5,3,2)} -}; +triple[][] B= + { + {(0.5,0,-1),(0.5,1,-1),(0.5,2,-1),(0.5,3,-1)}, + {(0.5,0,0),(0.5,1,0),(0.5,2,0),(0.5,3,0)}, + {(0.5,0,1),(0.5,1,1),(0.5,2,1),(0.5,3,1)}, + {(0.5,0,2),(0.5,1,2),(0.5,2,2),(0.5,3,2)} + }; split S=split(B,A); |