summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/splitpatch.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/splitpatch.asy')
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/splitpatch.asy32
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);