(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 167681, 3528]*) (*NotebookOutlinePosition[ 201866, 4682]*) (* CellTagsIndexPosition[ 200438, 4646]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Averaging Schemes for Polyhedral Meshes", "Chapter", CounterAssignments->{{"Chapter", 6}}, CellTags->"CHA polyhedral"], Cell[TextData[{ "To evaluate a particular cell, simply hit \"Shift+Enter\" with the cursor \ positioned in that cell. If ", StyleBox["Mathematica", FontSlant->"Italic"], " asks to evaluate initialization cell, click \"Yes\". See the ", StyleBox["Mathematica ", FontSlant->"Italic"], "Help browser or wolfram.com for more information on using ", StyleBox["Mathematica", FontSlant->"Italic"], "." }], "Text"], Cell["\<\ This notebook and those for the other seven chapters use a common stylesheet \ that has been imported into the notebook. This style sheet supports \ chapters, section, subsections, numbered equations, numbered figures and \ citations. A separate copy of the stylesheet can be download from the same \ page where this notebook was downloaded. \ \>", "Text"], Cell[TextData[{ StyleBox["COPYRIGHT ISSUES:", FontWeight->"Bold"], " The authors reserve all copyrights associated with this work. Any of \ the material appearing in these notebooks (such as the polyhedral meshes in \ chapter 7) can be used and modified without restriction as long as the use is \ non\[Hyphen]commercial. We simply ask that you acknowledge the authors when \ using material from these notebooks. For those readers interested in \ commercial use of the material in these notebooks, please contact \ jwarren@cs.rice.edu. " }], "Text"], Cell[CellGroupData[{ Cell["Helper functions from previous chapters", "Subsubsection"], Cell[BoxData[ \(displayTaggedMesh[{T_, p_}, tags_, offs_, plotRange_] := \[IndentingNewLine]Show[ Graphics[\[IndentingNewLine]{PointSize[0.04], Point[{0, 0}], \[IndentingNewLine]Table[ Line[Append[ p\[LeftDoubleBracket]T\[LeftDoubleBracket] i\[RightDoubleBracket]\[RightDoubleBracket], p\[LeftDoubleBracket]T\[LeftDoubleBracket]i, 1\[RightDoubleBracket]\[RightDoubleBracket]]], {i, Length[T]}], \[IndentingNewLine]Table[ Text[tags\[LeftDoubleBracket]i\[RightDoubleBracket], p\[LeftDoubleBracket]i\[RightDoubleBracket], offs\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, Length[p]}]}], \[IndentingNewLine]AspectRatio \[Rule] Automatic, TextStyle \[Rule] {FontSize \[Rule] 12}, PlotRange \[Rule] plotRange]\)], "Input", InitializationCell->True], Cell[BoxData[ \(checkRoots[s_, k_] := \[IndentingNewLine]\((\((s /. {x \[Rule] 1, y \[Rule] \(-1\)})\) \[Equal] 0)\)\ && \ \((\((s /. {x \[Rule] \(-1\), y \[Rule] 1})\) \[Equal] 0)\)\ && \ \((\((s /. {x \[Rule] \(-1\), y \[Rule] \(-1\)})\) \[Equal] 0)\)\ && \[IndentingNewLine]If[k \[Equal] 0, True, \[IndentingNewLine]checkRoots[D[s, x], k - 1] && checkRoots[D[s, y], k - 1]]\)], "Input", InitializationCell->True, CellTags->"EQ check roots"], Cell[CellGroupData[{ Cell[BoxData[ \(computeMatrixMask[s_, {lx_, ly_}, k_] := Module[{\[IndentingNewLine]lDiff = Table[\(\((\(-1\) + x)\)\^\(k + 1 - i\)\) \((\(-1\) + y)\)\^i, {i, 0, k + 1}], \[IndentingNewLine]rDiff = Table[\(\((\(-1\) + x\^2)\)\^\(k + 1 - i\)\) \((\(-1\) + y\^2)\)\^i, {i, 0, k + 1}], \[IndentingNewLine]matrix = Table[Sum[\((\(tP[i, j]\)[I, J] - \(tN[i, j]\)[I, J])\) \(x\^I\) y\^J, \[IndentingNewLine]{I, 0, lx + \((k + 1 - i)\) - \((2 k + 2 - 2 j)\)}, {J, 0, ly + i - 2 j}], {i, 0, k + 1}, {j, 0, k + 1}], \[IndentingNewLine]eqs, ineqs, ans}, \[IndentingNewLine]eqs = Flatten[CoefficientList[\(2\^k\) lDiff*s - matrix . rDiff, {x, y}]]; \[IndentingNewLine]ineqs = Flatten[Apply[Plus, Table[Apply[Plus, Abs[Transpose[ Partition[\[IndentingNewLine]If[ matrix\[LeftDoubleBracket]i, j\[RightDoubleBracket] === 0, {{0}}, CoefficientList[ matrix\[LeftDoubleBracket]i, j\[RightDoubleBracket], {x, y}]], {2, 2}, {2, 2}, {1, 1}, 0], \[IndentingNewLine]{3, 4, 1, 2}]], {2, 4}], {j, k + 2}, {i, k + 2}]]] /. {\(tN[ i1_, j1_]\)[i2_, j2_] \[Rule] \(-\(tN[i1, j1]\)[i2, j2]\)}; \[IndentingNewLine]ans = ConstrainedMin[z, Join[\[IndentingNewLine]Table[ eqs\[LeftDoubleBracket]i\[RightDoubleBracket] \[Equal] 0, {i, Length[eqs]}], \[IndentingNewLine]Table[ z \[GreaterEqual] ineqs\[LeftDoubleBracket]i\[RightDoubleBracket], {i, Length[ineqs]}]], \[IndentingNewLine]Variables[ Join[{z}, eqs, ineqs]]]; \[IndentingNewLine]matrix /. ans\[LeftDoubleBracket]2\[RightDoubleBracket]]\)], "Input", CellDingbat->None, InitializationCell->True, CellTags->"EQ difference scheme"], Cell[BoxData[ \(General::"spell1" \(\(:\)\(\ \)\) "Possible spelling error: new symbol name \"\!\(rDiff\)\" is similar to \ existing symbol \"\!\(lDiff\)\"."\)], "Message"] }, Open ]], Cell[BoxData[ \(matrixNorm2D[t_, k_] := Module[{tk = t}, \[IndentingNewLine]Do[ tk = tk . \((t /. {x \[Rule] x\^\(2\^i\), y \[Rule] y\^\(2\^i\)})\), {i, 1, k - 1}]; \[IndentingNewLine]Max[ Apply[Plus, Table[Apply[Plus, Abs[Transpose[ Partition[\[IndentingNewLine]If[ tk\[LeftDoubleBracket]i, j\[RightDoubleBracket] === 0, {{0}}, CoefficientList[ tk\[LeftDoubleBracket]i, j\[RightDoubleBracket], {x, y}]], \[IndentingNewLine]{2\^k, 2\^k}, {2\^k, 2\^k}, {1, 1}, 0], {3, 4, 1, 2}]], {2, 4}], {j, Length[t]}, {i, Length[t]}]]]]\)], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["Topological properties of polyhedral meshes", "Section"], Cell[CellGroupData[{ Cell["Polyhedral meshes", "Subsection"], Cell[CellGroupData[{ Cell["Definition and display of monochromatic polyhedral meshes", \ "Subsubsection"], Cell[TextData[{ "Simple triangular and quad meshes. The mesh are of the form ", Cell[BoxData[ \({T, p}\)]], " where ", Cell[BoxData[ \(T\)]], " is a list polygons whose vertices are indexed by the points in the list \ of points ", Cell[BoxData[ \(p\)]], "." }], "Text"], Cell[BoxData[{ \(\(\(tetra = {{{1, 3, 2}, {1, 2, 4}, {1, 4, 3}, {2, 3, 4}}, {{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}};\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(octa = {{{1, 2, 5}, {2, 3, 5}, {3, 4, 5}, {4, 1, 5}, {2, 1, 6}, {3, 2, 6}, {4, 3, 6}, {1, 4, 6}}, \[IndentingNewLine]{{1, 0, 0}, {0, 1, 0}, {\(-1\), 0, 0}, {0, \(-1\), 0}, {0, 0, 1}, {0, 0, \(-1\)}}};\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(cube = {{{1, 4, 3, 2}, {1, 2, 6, 5}, {2, 3, 7, 6}, {3, 4, 8, 7}, {4, 1, 5, 8}, {5, 6, 7, 8}}, {{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}, {0, 0, 1}, {1, 0, 1}, {1, 1, 1}, {0, 1, 1}}};\)\)}], "Input", InitializationCell->True], Cell["An interesting quad mesh - a torus made of 16 quads", "Text"], Cell[BoxData[ \(\(doughnut = {{\[IndentingNewLine]{1, 2, 6, 5}, {2, 3, 7, 6}, {3, 4, 8, 7}, {4, 1, 5, 8}, \[IndentingNewLine]{9, 10, 14, 13}, {10, 11, 15, 14}, {11, 12, 16, 15}, {12, 9, 13, 16}, \[IndentingNewLine]{1, 9, 10, 2}, {2, 10, 11, 3}, {3, 11, 12, 4}, {4, 12, 9, 1}, \[IndentingNewLine]{5, 6, 14, 13}, {6, 7, 15, 14}, {7, 8, 16, 15}, {8, 5, 13, 16}}, \[IndentingNewLine]{{1, 1, 1}, {1, \(-1\), 1}, {\(-1\), \(-1\), 1}, {\(-1\), 1, 1}, \[IndentingNewLine]{3, 3, 1}, {3, \(-3\), 1}, {\(-3\), \(-3\), 1}, {\(-3\), 3, 1}, \[IndentingNewLine]{1, 1, \(-1\)}, {1, \(-1\), \(-1\)}, {\(-1\), \(-1\), \(-1\)}, \ {\(-1\), 1, \(-1\)}, \[IndentingNewLine]{3, 3, \(-1\)}, {3, \(-3\), \(-1\)}, {\(-3\), \(-3\), \(-1\)}, \ {\(-3\), 3, \(-1\)}}};\)\)], "Input", InitializationCell->True], Cell["An interesting triangular mesh - stellated octahedron", "Text"], Cell[BoxData[ \(\(stellatedOcta = {{{1, 2, 7}, {2, 5, 7}, {5, 1, 7}, {2, 3, 8}, {3, 5, 8}, {5, 2, 8}, \[IndentingNewLine]{3, 4, 9}, {4, 5, 9}, {5, 3, 9}, {4, 1, 10}, {1, 5, 10}, {5, 4, 10}, \[IndentingNewLine]{2, 1, 11}, {1, 6, 11}, {6, 2, 11}, {3, 2, 12}, {2, 6, 12}, {6, 3, 12}, \[IndentingNewLine]{4, 3, 13}, {3, 6, 13}, {6, 4, 13}, {1, 4, 14}, {4, 6, 14}, {6, 1, 14}}, \[IndentingNewLine]{{1, 0, 0}, {0, 1, 0}, {\(-1\), 0, 0}, {0, \(-1\), 0}, {0, 0, 1}, {0, 0, \(-1\)}, \[IndentingNewLine]{1, 1, 1}, {\(-1\), 1, 1}, {\(-1\), \(-1\), 1}, {1, \(-1\), 1}, {1, 1, \(-1\)}, {\(-1\), 1, \(-1\)}, {\(-1\), \(-1\), \(-1\)}, {1, \(-1\), \ \(-1\)}}};\)\)], "Input", InitializationCell->True], Cell[TextData[{ Cell[BoxData[ \(displayMesh[{T, G}]\)]], " displays mesh with topology ", Cell[BoxData[ \(T\)]], " and geometry ", Cell[BoxData[ \(G\)]] }], "Text"], Cell[BoxData[ \(displayMesh[{T_, G_}, opts___] := \[IndentingNewLine]Show[ Graphics3D[\[IndentingNewLine]Table[ Polygon[G\[LeftDoubleBracket] T\[LeftDoubleBracket]i\[RightDoubleBracket], {1, 2, 3}\[RightDoubleBracket]], {i, Length[T]}]], Axes \[Rule] True, Ticks \[Rule] False, opts]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[GraphicsArray[{displayMesh[octa], displayMesh[cube]}]]\)], "Input",\ CellTags->"FIG oct and cube"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Definition and display of color meshes", "Subsubsection"], Cell[TextData[{ "Example of mesh where vertex information includes positions and RGB \ values. The meshes are of the form ", Cell[BoxData[ \({T, p}\)]], " where ", Cell[BoxData[ \(p\)]], " is a six\[Hyphen]tuple including three coordinates of position and three \ coordinates of vertex color. Note that subdividing the color information \ leads to smooth colors over the mesh. Note that ", Cell[BoxData[ \(colorRing\)]], " and ", Cell[BoxData[ \(colorAxe\)]], " include creases edges and vertices. See section 7.2.4 for details." }], "Text"], Cell[BoxData[{ \(\(\(colorCube = {{{1, 4, 3, 2}, {1, 2, 6, 5}, {2, 3, 7, 6}, {3, 4, 8, 7}, {4, 1, 5, 8}, {5, 6, 7, 8}}, {{0, 0, 0, 1, 0, 0}, {1, 0, 0, 1, 0, 0}, {1, 1, 0, 1, 0, 0}, {0, 1, 0, 1, 0, 0}, {0, 0, 1, 0, 1, 0}, {1, 0, 1, 0, 1, 0}, {1, 1, 1, 0, 1, 0}, {0, 1, 1, 0, 1, 0}}};\)\(\n\) \)\), "\[IndentingNewLine]", \(\(\(colorRing = {{{5, 6, 2, 1}, {6, 7, 3, 2}, {7, 8, 4, 3}, {8, 5, 1, 4}, {13, 9, 10, 14}, {14, 10, 11, 15}, {15, 11, 12, 16}, {16, 12, 9, 13}, {2, 3, 11, 10}, {3, 4, 12, 11}, {4, 1, 9, 12}, {6, 5, 13, 14}, {7, 6, 14, 15}, {8, 7, 15, 16}, {5, 8, 16, 13}, {1, 20, 17, 9}, {17, 18, 10, 9}, {18, 19, 2, 10}, {19, 20, 1, 2}, {26, 25, 21, 22}, {27, 26, 22, 23}, {28, 27, 23, 24}, {25, 28, 24, 21}, {24, 23, 22, 21}, {17, 18}, {18, 19}, {19, 20}, {20, 17}, {25, 26}, {26, 27}, {27, 28}, {28, 25}, {24}, {23}, {22}, {21}}, {{\(-3\), 3, 1, 1, 1, 0}, {3, 3, 1, 1, 1, 0}, {3, \(-3\), 1, 1, 1, 0}, {\(-3\), \(-3\), 1, 1, 1, 0}, {\(-2.5\), 2.5, 1, 1, 1, 0}, {2.5, 2.5, 1, 1, 1, 0}, {2.5, \(-2.5\), 1, 1, 1, 0}, {\(-2.5\), \(-2.5\), 1, 1, 1, 0}, {\(-3\), 3, \(-1\), 1, 1, 0}, {3, 3, \(-1\), 1, 1, 0}, {3, \(-3\), \(-1\), 1, 1, 0}, {\(-3\), \(-3\), \(-1\), 1, 1, 0}, {\(-2.5\), 2.5, \(-1\), 1, 1, 0}, {2.5, 2.5, \(-1\), 1, 1, 0}, {2.5, \(-2.5\), \(-1\), 1, 1, 0}, {\(-2.5\), \(-2.5\), \(-1\), 1, 1, 0}, {\(- .5\), 3, \(- .5\), 1, 1, 0}, { .5, 3, \(- .5\), 1, 1, 0}, { .5, 3, .5, 1, 1, 0}, {\(- .5\), 3, .5, 1, 1, 0}, {\(-1\), 4, \(-1\), 1, 1, 1}, {1, 4, \(-1\), 1, 1, 1}, {1, 4, 1, 1, 1, 1}, {\(-1\), 4, 1, 1, 1, 1}, {\(- .5\), 3, \(- .5\), 1, 1, 1}, { .5, 3, \(- .5\), 1, 1, 1}, { .5, 3, .5, 1, 1, 1}, {\(- .5\), 3, .5, 1, 1, 1}}};\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(colorAxe = {{{1, 2, 3, 10}, {8, 9, 10, 3}, {2, 3, 8, 9}, {3, 4, 7, 8}, {4, 5, 6, 7}, {2}, {9}, {2, 1}, {1, 10}, {10, 9}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {5}, {6}, {11, 20, 13, 12}, {18, 13, 20, 19}, {12, 19, 18, 13}, {13, 18, 17, 14}, {14, 17, 16, 15}, {12}, {19}, {12, 11}, {11, 20}, {20, 19}, {12, 13}, {13, 14}, {14, 15}, {15, 16}, {16, 17}, {17, 18}, {18, 19}, {15}, {16}, {9, 8, 18, 19}, {8, 7, 17, 18}, {7, 6, 16, 17}, {3, 2, 12, 13}, {4, 3, 13, 14}, {5, 4, 14, 15}, {21, 30, 23, 22}, {28, 23, 30, 29}, {22, 29, 28, 23}, {23, 28, 27, 24}, {24, 27, 26, 25}, {22}, {29}, {22, 21}, {21, 30}, {30, 29}, {22, 23}, {23, 24}, {24, 25}, {25, 26}, {26, 27}, {27, 28}, {28, 29}, {25}, {26}, {31, 32, 33, 40}, {38, 39, 40, 33}, {32, 33, 38, 39}, {33, 34, 37, 38}, {34, 35, 36, 37}, {32}, {39}, {32, 31}, {31, 40}, {40, 39}, {32, 33}, {33, 34}, {34, 35}, {35, 36}, {36, 37}, {37, 38}, {38, 39}, {35}, {36}, {29, 39, 38, 28}, {28, 38, 37, 27}, {27, 37, 36, 26}, {23, 33, 32, 22}, {24, 34, 33, 23}, {25, 35, 34, 24}, {41, 42}, {42, 43}, {43, 44}, {44, 41}, {45, 46}, {46, 47}, {47, 48}, {48, 45}, {45, 41, 42, 46}, {46, 42, 43, 47}, {47, 43, 44, 48}, {48, 44, 41, 45}, {48, 45, 46, 47}, {41, 44, 43, 42}}, {{\(-4.0\), \(-2.0\), 0.0, .5, .5, .5}, {\(-3.0\), \(-3.0\), 0.0, .5, .5, .5}, {\(-3.1\), \(-2.0\), 0.2, .5, .5, .5}, {\(-2.0\), \(-1.0\), 0.3, .5, .5, .5}, {0.0, \(-1.0\), 0.5, .5, .5, .5}, {0.0, 1.0, 0.5, .5, .5, .5}, {\(-2.0\), 1.0, 0.3, .5, .5, .5}, {\(-3.1\), 2.0, 0.2, .5, .5, .5}, {\(-3.0\), 3.0, 0.0, .5, .5, .5}, {\(-4.0\), 2.0, 0.0, .5, .5, .5}, {\(-4.0\), \(-2.0\), 0.0, .5, .5, .5}, {\(-3.0\), \(-3.0\), 0.0, .5, .5, .5}, {\(-3.1\), \(-2.0\), \(-0.2\), .5, .5, \ .5}, {\(-2.0\), \(-1.0\), \(-0.3\), .5, .5, .5}, {0.0, \(-1.0\), \(-0.5\), \ .5, .5, .5}, {0.0, 1.0, \(-0.5\), .5, .5, .5}, {\(-2.0\), 1.0, \(-0.3\), .5, .5, .5}, {\(-3.1\), 2.0, \(-0.2\), .5, .5, .5}, {\(-3.0\), 3.0, 0.0, .5, .5, .5}, {\(-4.0\), 2.0, 0.0, .5, .5, .5}, {4.0, \(-2.0\), 0.0, .5, .5, .5}, {3.0, \(-3.0\), 0.0, .5, .5, .5}, {3.1, \(-2.0\), 0.2, .5, .5, .5}, {2.0, \(-1.0\), 0.3, .5, .5, .5}, {\(-0.0\), \(-1.0\), 0.5, .5, .5, .5}, {\(-0.0\), 1.0, 0.5, .5, .5, .5}, {2.0, 1.0, 0.3, .5, .5, .5}, {3.1, 2.0, 0.2, .5, .5, .5}, {3.0, 3.0, 0.0, .5, .5, .5}, {4.0, 2.0, 0.0, .5, .5, .5}, {4.0, \(-2.0\), 0.0, .5, .5, .5}, {3.0, \(-3.0\), 0.0, .5, .5, .5}, {3.1, \(-2.0\), \(-0.2\), .5, .5, .5}, \ {2.0, \(-1.0\), \(-0.3\), .5, .5, .5}, {\(-0.0\), \(-1.0\), \(-0.5\), .5, \ .5, .5}, {\(-0.0\), 1.0, \(-0.5\), .5, .5, .5}, {2.0, 1.0, \(-0.3\), .5, .5, .5}, {3.1, 2.0, \(-0.2\), .5, .5, .5}, {3.0, 3.0, 0.0, .5, .5, .5}, {4.0, 2.0, 0.0, .5, .5, .5}, {\(- .75\), 2, \(- .75\), .5, .25, 0}, { .75, 2, \(- .75\), .5, .25, 0}, { .75, 2, .75, .5, .25, 0}, {\(- .75\), 2, .75, .5, .25, 0}, {\(- .75\), \(-10\), \(- .75\), .5, .25, 0}, { .75, \(-10\), \(- .75\), .5, .25, 0}, { .75, \(-10\), 1, .5, .25, 0}, {\(- .75\), \(-10\), .75, .5, .25, 0}}};\)\)}], "Input", InitializationCell->True], Cell[TextData[{ Cell[BoxData[ \(displayMeshColor\)]], " takes mesh whose vertex information includes an RGB value and rendering \ the mesh using the average of the RGB values at the corner of each polygonal \ face." }], "Text"], Cell[BoxData[{ \(\(Unprotect[RGBColor];\)\), "\n", \(RGBColor[{a_, b_, c_}] := RGBColor[a, b, c]\), "\[IndentingNewLine]", \(\(\(Protect[RGBColor];\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(displayMeshColor[{T_, G_}, opts___] := \[IndentingNewLine]Show[ Graphics3D[ Table[{\[IndentingNewLine]SurfaceColor[ RGBColor[\(1\/4\) Apply[Plus, G\[LeftDoubleBracket]T\[LeftDoubleBracket] i\[RightDoubleBracket], {4, 5, 6}\[RightDoubleBracket]]]], \ \[IndentingNewLine]Polygon[ G\[LeftDoubleBracket]T\[LeftDoubleBracket] i\[RightDoubleBracket], {1, 2, 3}\[RightDoubleBracket]]}, {i, Length[T]}]], opts]\)}], "Input", InitializationCell->True], Cell["Examples", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(displayMeshColor[colorCube]\), "\[IndentingNewLine]", \(displayMeshColor[colorRing]\), "\[IndentingNewLine]", \(displayMeshColor[colorAxe]\)}], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Orientation testing for polyhedral meshes", "Subsubsection"], Cell[TextData[{ Cell[BoxData[ \(orientationTest\)]], " draws front (counterclockwise) faces white and back (clockwise) faces as \ black. Note that all of the meshes defined above are oriented so that \ counterclockwise faces point outward." }], "Text"], Cell[BoxData[ \(orientationTest[{T_, G_}] := \[IndentingNewLine]Show[ Graphics3D[ Table[{FaceForm[GrayLevel[1], GrayLevel[0]], Polygon[G\[LeftDoubleBracket] T\[LeftDoubleBracket]i\[RightDoubleBracket], {1, 2, 3}\[RightDoubleBracket]]}, {i, Length[T]}]], Lighting \[Rule] False]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(orientationTest[doughnut]\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Topological subdivision of polyhedral meshes", "Subsection"], Cell[CellGroupData[{ Cell["A code fragment for maintaining a hash table on edges", "Subsubsection"], Cell[TextData[{ "A fragment of ", StyleBox["Mathematica", FontSlant->"Italic"], " code that maintains a hash table suitable for vertex lookup. The \ variable ", Cell[BoxData[ \(idx\)]], " is table that takes the indices at the endpoints of an edge and returns a \ unique index for the edge." }], "Text"], Cell[BoxData[{ \( (*\ define\ an\ order\ independent\ hash\ table\ idx, \ intialize\ it\ to\ zero\ *) \ \[IndentingNewLine]\[IndentingNewLine]\(SetAttributes[idx, Orderless];\)\), "\[IndentingNewLine]", \(\(idx[_, _] = 0;\)\[IndentingNewLine]\[IndentingNewLine] (*\ lookup\ function\ index, \ increments\ global\ counter\ currIndex\ when\ new\ vertex\ is\ \ encountered\ *) \[IndentingNewLine]\), "\[IndentingNewLine]", \(\(index[i_, j_] := If[idx[i, j] == 0, idx[i, j] = \(++currIndex\), idx[i, j]];\)\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Linear subdivision for polyedhral meshes", "Subsubsection"], Cell[TextData[{ Cell[BoxData[ \(quadSub[{T, p}]\)]], " applies bi\[Hyphen]linear subdivision to quad mesh with topology ", Cell[BoxData[ \(T\)]], " and geometry ", Cell[BoxData[ \(p\)]], ", maintain consistent orientation" }], "Text"], Cell[BoxData[ RowBox[{\(quadSub[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({idx, index, currIndex = Length[p], newT, newp}\), ",", "\n", "\[IndentingNewLine]", \( (*\ define\ an\ order\ independent\ hash\ table\ idx, \ intialize\ it\ to\ zero, \[IndentingNewLine]\ lookup\ function\ index, \ increments\ global\ counter\ currIndex\ when\ new\ vertex\ is\ \ encountered\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{\(SetAttributes[idx, Orderless]\), ";", "\[IndentingNewLine]", \(idx[_, _] = 0\), ";", "\[IndentingNewLine]", \(index[i_, j_] := If[idx[i, j] == 0, idx[i, j] = \(++currIndex\), idx[i, j]]\), ";", "\n", "\n", "\[IndentingNewLine]", \( (*\ allocate\ table\ of\ size\ sufficient\ to\ hold\ new\ vertex\ \ locations\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(newp = Table[0, {2 Length[T] + 2 Length[p] + 10}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ subdivide\ mesh\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"newT", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"With", "[", RowBox[{\({i00 = T\[LeftDoubleBracket]l, 1\[RightDoubleBracket], i20 = T\[LeftDoubleBracket]l, 2\[RightDoubleBracket], i22 = T\[LeftDoubleBracket]l, 3\[RightDoubleBracket], i02 = T\[LeftDoubleBracket]l, 4\[RightDoubleBracket]}\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({i01 = index[i00, i02], i12 = index[i02, i22], i10 = index[i00, i20], i21 = index[i20, i22], i11 = \(++currIndex\)}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ update\ geometric\ info\ in\ newG\ *) \), "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket]{i00, i20, i22, i02, i10, i21, i12, i01, i11}\[RightDoubleBracket]\), "=", RowBox[{\(1\/4\), RowBox[{ RowBox[{"(", GridBox[{ {"4", "0", "0", "0"}, {"0", "4", "0", "0"}, {"0", "0", "4", "0"}, {"0", "0", "0", "4"}, {"2", "2", "0", "0"}, {"0", "2", "2", "0"}, {"0", "0", "2", "2"}, {"2", "0", "0", "2"}, {"1", "1", "1", "1"} }], ")"}], ".", \(p\[LeftDoubleBracket]T\ \[LeftDoubleBracket]l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ create\ four\ subtriangles, \ keep\ orientation\ consistent\ *) \), "\[IndentingNewLine]", \({{i00, i10, i11, i01}, \[IndentingNewLine]{i02, i01, i11, i12}, \[IndentingNewLine]{i20, i21, i11, i10}, \[IndentingNewLine]{i22, i12, i11, i21}}\)}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ return\ topology\ plus\ part\ of\ newG\ that\ was\ actually\ \ used\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \({newT, Take[newp, currIndex]}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[TextData[{ Cell[BoxData[ \(triSub[{T, p}]\)]], " performs linear subdivision on a triangle mesh with topology ", Cell[BoxData[ \(T\)]], " and geometry ", Cell[BoxData[ \(p\)]] }], "Text"], Cell[BoxData[ RowBox[{\(triSub[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({idx, index, currIndex = Length[p], newT, newp}\), ",", "\n", "\[IndentingNewLine]", \( (*\ define\ an\ order\ independent\ hash\ table\ idx, \ intialize\ it\ to\ zero, \[IndentingNewLine]\ lookup\ function\ index, \ increments\ global\ counter\ currIndex\ when\ new\ vertex\ is\ \ encountered\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{\(SetAttributes[idx, Orderless]\), ";", "\[IndentingNewLine]", \(idx[_, _] = 0\), ";", "\[IndentingNewLine]", \(index[i_, j_] := If[idx[i, j] == 0, idx[i, j] = \(++currIndex\), idx[i, j]]\), ";", "\n", "\n", "\[IndentingNewLine]", \( (*\ allocate\ table\ of\ size\ sufficient\ to\ hold\ new\ vertex\ \ locations\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(newp = Table[0, {Length[T] + 2 Length[p] + 10}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ subdivide\ mesh\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"newT", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"With", "[", RowBox[{\({i0 = T\[LeftDoubleBracket]l, 1\[RightDoubleBracket], i1 = T\[LeftDoubleBracket]l, 2\[RightDoubleBracket], i2 = T\[LeftDoubleBracket]l, 3\[RightDoubleBracket]}\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({i01 = index[i0, i1], i12 = index[i1, i2], i02 = index[i0, i2]}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ update\ geometric\ info\ in\ newG\ *) \), "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket]{i0, i1, i2, i01, i12, i02}\[RightDoubleBracket]\), "=", RowBox[{\(1\/2\), RowBox[{ RowBox[{"(", GridBox[{ {"2", "0", "0"}, {"0", "2", "0"}, {"0", "0", "2"}, {"1", "1", "0"}, {"0", "1", "1"}, {"1", "0", "1"} }], ")"}], ".", \(p\[LeftDoubleBracket]T\ \[LeftDoubleBracket]l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ create\ four\ subtriangles\ *) \), "\[IndentingNewLine]", \({{i0, i01, i02}, {i01, i1, i12}, {i02, i12, i2}, {i12, i02, i01}}\)}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ return\ topology\ plus\ part\ of\ newG\ that\ was\ actually\ \ used\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \({newT, Take[newp, currIndex]}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[TextData[{ "Examples of ", Cell[BoxData[ \(triSub\)]], " and ", Cell[BoxData[ \(quadSub\)]], " applied to the octahedron and cube, respectively." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{displayMesh[Nest[triSub, octa, 3]], displayMesh[Nest[quadSub, cube, 3]]}]]\)], "Input", CellTags->"FIG oct and cube three rounds"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Topological subdivision diagrams", "Subsubsection"], Cell["Helper functions for topological splits", "Text"], Cell[BoxData[ \(nGon[n_] := Table[{Sin[\(2 \[Pi]\ i\)\/n + \[Pi]\/n], \(-Cos[\(2 \[Pi]\ i\)\/n + \ \[Pi]\/n]\)}, {i, 0, n - 1}]\)], "Input", InitializationCell->True], Cell[BoxData[ \(midpt[p_] := Append[Table[\(p\[LeftDoubleBracket]i\[RightDoubleBracket] + p\ \[LeftDoubleBracket]i + 1\[RightDoubleBracket]\)\/2, {i, 1, Length[p] - 1}], \(p\[LeftDoubleBracket]1\[RightDoubleBracket] + \ Last[p]\)\/2]\)], "Input", InitializationCell->True], Cell[BoxData[ \(triSplit[n_] := \[IndentingNewLine]Graphics[ With[{p = nGon[n]}, \[IndentingNewLine]{Thickness[0.01], Line[Append[p, First[p]]], \[IndentingNewLine]PointSize[0.04], Table[Point[p\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, n}], \[IndentingNewLine]With[{m = midpt[p]}, \[IndentingNewLine]{Dashing[{0.05}], Line[Append[m, First[m]]], \[IndentingNewLine]GrayLevel[ 0.75], Table[ Point[m\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, n}]}]}]]\)], "Input", InitializationCell->True], Cell[BoxData[ \(quadSplit[n_] := \[IndentingNewLine]Graphics[ With[{p = nGon[n]}, \[IndentingNewLine]{Thickness[0.01], Line[Append[p, First[p]]], \[IndentingNewLine]PointSize[0.04], Table[Point[p\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, n}], \[IndentingNewLine]With[{m = midpt[p]}, \[IndentingNewLine]{Dashing[{0.05}], Table[Line[{{0, 0}, m\[LeftDoubleBracket]i\[RightDoubleBracket]}], {i, n}], \[IndentingNewLine]GrayLevel[0.75], Table[Point[m\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, n}], Point[{0, 0}]}]}]]\)], "Input", InitializationCell->True], Cell["FIgure showing triangular and quad splits", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]Table[ Show[triSplit[i], AspectRatio \[Rule] 1], {i, 3, 5}], Table[Show[quadSplit[i], AspectRatio \[Rule] 1], {i, 3, 5}]}]]\)], "Input", CellTags->"FIG Topological subdivision"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["4-8 subdivision figure", "Text"], Cell[CellGroupData[{ Cell[BoxData[{ \(g1 = Show[Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{0, 0}, {2, 0}, {2, 2}, {0, 2}, {0, 0}}], \[IndentingNewLine]Line[{{0, 0}, {2, 2}}], \[IndentingNewLine]Dashing[{0.05}], Line[{{2, 0}, {0, 2}}], \[IndentingNewLine]Point[{0, 0}], Point[{2, 0}], Point[{2, 2}], Point[{0, 2}], \[IndentingNewLine]GrayLevel[0.75], Point[{1, 1}]}], AspectRatio \[Rule] 1]\), "\[IndentingNewLine]", \(g2 = Show[Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{0, 0}, {2, 0}, {2, 2}, {0, 2}, {0, 0}}], \[IndentingNewLine]Line[{{0, 0}, {2, 2}}], Line[{{2, 0}, {0, 2}}], \[IndentingNewLine]Dashing[{0.05}], Line[{{1, 0}, {1, 2}}], Line[{{0, 1}, {2, 1}}], \[IndentingNewLine]Point[{0, 0}], Point[{2, 0}], Point[{2, 2}], Point[{0, 2}], Point[{1, 1}], \[IndentingNewLine]GrayLevel[0.75], Point[{1, 0}], Point[{2, 1}], Point[{1, 2}], Point[{0, 1}]}], AspectRatio \[Rule] 1]\), "\[IndentingNewLine]", \(Show[GraphicsArray[{g1, g2}]]\)}], "Input", CellTags->"FIG 4-8 subdivision"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Smooth subdivision for quad meshes", "Section"], Cell[CellGroupData[{ Cell["Bilinear subdivision plus quad averaging", "Subsection"], Cell[CellGroupData[{ Cell[TextData[{ "Initial version of ", Cell[BoxData[ \(quadAverage\)]] }], "Subsubsection"], Cell[TextData[{ "The function ", Cell[BoxData[ \(quadAverage\)]], " applies quad averaging to a quadrilateral mesh ", Cell[BoxData[ \({T, p}\)]], ". It does not account for the existence of crease edges and vertices" }], "Text"], Cell[BoxData[ RowBox[{\(quadAverage[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({newp = 0*p, \ val = Table[0, {Length[p]}]}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ compute\ table\ of\ vertex\ valences\ *) \), "\[IndentingNewLine]", RowBox[{\(Do[\(++val\[LeftDoubleBracket] T\[LeftDoubleBracket]l, i\[RightDoubleBracket]\[RightDoubleBracket]\), \ \[IndentingNewLine]{l, Length[T]}, {i, Length[T\[LeftDoubleBracket]l\[RightDoubleBracket]]}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ apply\ smoothing\ mask\ to\ each\ cell\ and\ accumulate\ \ results*) \), "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\), "+=", " ", RowBox[{\(1\/\(4 val\[LeftDoubleBracket]T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)\), RowBox[{ RowBox[{"(", GridBox[{ {"1", "1", "1", "1"}, {"1", "1", "1", "1"}, {"1", "1", "1", "1"}, {"1", "1", "1", "1"} }], ")"}], ".", \(p\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \({T, newp}\)}]}], "]"}]}]], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["Examples", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{displayMesh[cube, PlotRange \[Rule] {{0, 1.01}, {0, 1.01}, {0, 1.01}}], \[IndentingNewLine]displayMesh[quadSub[cube], PlotRange \[Rule] {{0, 1.01}, {0, 1.01}, {0, 1.01}}], \[IndentingNewLine]displayMesh[ quadAverage[quadSub[cube]], PlotRange \[Rule] {{0, 1.01}, {0, 1.01}, {0, 1.01}}], \[IndentingNewLine]displayMesh[ quadSub[quadAverage[quadSub[cube]]], PlotRange \[Rule] {{0, 1.01}, {0, 1.01}, {0, 1.01}}], \[IndentingNewLine]displayMesh[ quadAverage[quadSub[quadAverage[quadSub[cube]]]], PlotRange \[Rule] {{0, 1.01}, {0, 1.01}, {0, 1.01}}]}]]\)], "Input", CellTags->"FIG two rounds of cube subdivision"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["HENRIK: BUILD CODE FOR FIGURE 7.6", "Text", FontColor->RGBColor[0, 1, 0]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{displayMesh[ Nest[Composition[quadAverage, quadSub], doughnut, 0], PlotRange \[Rule] {{\(-3.01\), 3.01}, {\(-3.01\), 3.01}, {\(-1.01\), 1.01}}], \[IndentingNewLine]displayMesh[ Nest[Composition[quadAverage, quadSub], doughnut, 1], PlotRange \[Rule] {{\(-3\), 3}, {\(-3\), 3}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ Nest[Composition[quadAverage, quadSub], doughnut, 2], PlotRange \[Rule] {{\(-3\), 3}, {\(-3\), 3}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ Nest[Composition[quadAverage, quadSub], doughnut, 3], PlotRange \[Rule] {{\(-3\), 3}, {\(-3\), 3}, {\(-1\), 1}}]}]]\)], "Input", CellTags->"FIG doughnut"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["Extra non\[Hyphen]manifold example", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(With[{doubleCube = {{{1, 2, 4, 3}, {5, 6, 8, 7}, {1, 3, 7, 5}, {2, 4, 8, 6}, {1, 5, 6, 2}, {3, 7, 8, 4}, \[IndentingNewLine]{7, 8, 10, 9}, {11, 12, 14, 13}, {7, 8, 12, 11}, {7, 9, 13, 11}, {9, 10, 14, 13}, {8, 10, 14, 12}}, \[IndentingNewLine]{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {1, 1, 0}, {0, 0, 1}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}, \[IndentingNewLine]{0, 2, 1}, {1, 2, 1}, {0, 1, 2}, {1, 1, 2}, {0, 2, 2}, {1, 2, 2}}}}, \[IndentingNewLine]displayMesh[ Nest[Composition[quadAverage, quadSub], doubleCube, 3]]]\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Comparison to other quad schemes", "Subsection"], Cell[CellGroupData[{ Cell["Catmull\[Hyphen]Clark using matrix updates", "Subsubsection", CellTags->"SUBSEC catmull clark matrix update"], Cell[TextData[{ "The function ", Cell[BoxData[ \(ccAverage\)]], " implement Catmull\[Hyphen]Clark subdivision as smoothing pass over a quad \ mesh that has been subdivided using bilinear subdivision. This smoothing \ algorithm is implemented using a matrix update scheme similar that described \ for Loop subdivision in section 7.3.2." }], "Text"], Cell[BoxData[ RowBox[{\(ccAverage[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({newp = 0*p, \ val = Table[0, {Length[p]}]}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ compute\ table\ of\ vertex\ valences\ *) \), "\[IndentingNewLine]", RowBox[{\(Do[\(++val\[LeftDoubleBracket] T\[LeftDoubleBracket]l, i\[RightDoubleBracket]\[RightDoubleBracket]\), \ \[IndentingNewLine]{l, Length[T]}, {i, Length[T\[LeftDoubleBracket]l\[RightDoubleBracket]]}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ apply\ smoothing\ mask\ to\ each\ cell\ and\ accumulate\ \ results*) \), "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"With", "[", RowBox[{\({a = 1\/val\[LeftDoubleBracket]T\[LeftDoubleBracket]l\ \[RightDoubleBracket]\[RightDoubleBracket]}\), ",", "\[IndentingNewLine]", RowBox[{\(newp\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\), "+=", " ", RowBox[{\(1\/val\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\), RowBox[{ RowBox[{"(", GridBox[{ {\(1 - 3 a\[LeftDoubleBracket]1\ \[RightDoubleBracket]\), \(a\[LeftDoubleBracket]1\[RightDoubleBracket]\), \(a\ \[LeftDoubleBracket]1\[RightDoubleBracket]\), \(a\[LeftDoubleBracket]1\ \[RightDoubleBracket]\)}, {\(a\[LeftDoubleBracket]2\[RightDoubleBracket]\ \), \(1 - 3 a\[LeftDoubleBracket]2\ \[RightDoubleBracket]\), \(a\[LeftDoubleBracket]2\[RightDoubleBracket]\), \(a\ \[LeftDoubleBracket]2\[RightDoubleBracket]\)}, {\(a\[LeftDoubleBracket]3\[RightDoubleBracket]\ \), \(a\[LeftDoubleBracket]3\[RightDoubleBracket]\), \(1 - 3 a\[LeftDoubleBracket]3\ \[RightDoubleBracket]\), \(a\[LeftDoubleBracket]3\[RightDoubleBracket]\)}, {\(a\[LeftDoubleBracket]4\[RightDoubleBracket]\ \), \(a\[LeftDoubleBracket]4\[RightDoubleBracket]\), \(a\[LeftDoubleBracket]4\ \[RightDoubleBracket]\), \(1 - 3 a\[LeftDoubleBracket]4\ \[RightDoubleBracket]\)} }], ")"}], ".", \(p\[LeftDoubleBracket]T\[LeftDoubleBracket]l\ \[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}]}], "]"}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \({T, newp}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]displayMesh[ Nest[Composition[quadAverage, quadSub], cube, 3]], displayMesh[ Nest[Composition[ccAverage, quadSub], cube, 3]]}]]\)], "Input", CellTags->"FIG comparison of quad cubes"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Figures for quad subdivision rules", "Subsubsection"], Cell[BoxData[ \(nQuads[ n_] := \[IndentingNewLine]{Join[ Table[{1, i, n + i, i + 1}, {i, 2, n}], {{1, n + 1, 2 n + 1, 2}}], \[IndentingNewLine]Join[{{0, 0}}, \[IndentingNewLine]0.75 Table[{Cos[\(2 \[Pi]\ i\)\/n], Sin[\(2\ \[Pi]\ i\)\/n]} // N, {i, 0, n - 1}], \[IndentingNewLine]0.75 Table[{Cos[\(2 \[Pi]\ i\)\/n] + Cos[\(2 \[Pi]\ \((i + 1)\)\)\/n], Sin[\(2\ \[Pi]\ i\)\/n] + Sin[\(2 \[Pi]\ \((i + 1)\)\)\/n]} // N, {i, 0, n - 1}]]}\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3, 4}}, \(1\/2\) {{1, 1}, {1, \(-1\)}, {\(-1\), \(-1\)}, {\(-1\), 1}}}, {1\/4, 1\/4, 1\/4, 1\/4}, {{\(-1\), \(-1\)}, {\(-1\), 1}, {1, 1}, {1, \(-1\)}}, {{\(-1.3\), 1.3}, {\(-1.3\), 1.3}}], \[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3, 4}, {1, 2, 5, 6}}, \(1\/2\) {{\(-1\), 0}, {1, 0}, {1, 2}, {\(-1\), 2}, {1, \(-2\)}, {\(-1\), \(-2\)}}}, {3\/8, 3\/8, 1\/16, 1\/16, 1\/16, 1\/16}, {{1, 0}, {\(-1\), 0}, {\(-1\), \(-1\)}, {1, \(-1\)}, {\(-1\), 1}, {1, 1}}, {{\(-1.3\), 1.3}, {\(-1.3\), 1.3}}], \[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3, 4}, {1, 2, 5, 6}, {1, 7, 8, 4}, {1, 7, 9, 6}}, {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {1, \(-1\)}, {0, \(-1\)}, {\(-1\), 0}, {\(-1\), 1}, {\(-1\), \(-1\)}}}, {9\/16, 3\/32, 1\/64, 3\/32, 1\/64, 3\/32, 3\/32, 1\/64, 1\/64}, {{1, 1}, {\(-1\), 0}, {\(-1\), \(-1\)}, {0, \(-1\)}, {\(-1\), 1}, {0, 1}, {1, 0}, {1, \(-1\)}, {1, 1}}, {{\(-1.3\), 1.3}, {\(-1.3\), 1.3}}]}]]\)], "Input", CellTags->"FIG quad face/edge rules"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]displayTaggedMesh[ nQuads[5], \[IndentingNewLine]{9\/16, 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\), 1\/\(16 n\), 1\/\(16 n\), 1\/\(16 n\), 1\/\(16 n\), 1\/\(16 n\)}, \[IndentingNewLine]{{1.5, 0}, {\(-1\), 0}, {\(-1\), \(-1\)}, {1, \(-1\)}, {1, 1}, {\(-0.5\), 1}, {0, \(-1\)}, {0, \(-1\)}, {1, 0}, {0, 1}, {0, 1}}, {{\(-1.4\), 1.4}, {\(-1.4\), 1.4}}], \[IndentingNewLine]displayTaggedMesh[ nQuads[5], \[IndentingNewLine]{1 - 7\/\(4 n\), 3\/\(2 n\^2\), 3\/\(2 n\^2\), 3\/\(2 n\^2\), 3\/\(2 n\^2\), 3\/\(2 n\^2\), 1\/\(4 n\^2\), 1\/\(4 n\^2\), 1\/\(4 n\^2\), 1\/\(4 n\^2\), 1\/\(4 n\^2\)}, \[IndentingNewLine]{{1.5, 0}, {\(-1\), 0}, {\(-1\), \(-1\)}, {1, \(-1\)}, {1, 1}, {\(-0.5\), 1}, {0, \(-1\)}, {0, \(-1\)}, {1, 0}, {0, 1}, {0, 1}}, {{\(-1.4\), 1.4}, {\(-1.4\), 1.4}}]}]]\)], "Input", CellTags->"FIG quad rules"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Weighted averaging for surfaces of revolution", "Subsection"], Cell["\<\ Weighted averaging is implemented in a separate, auxiliary notebook \ \"meshes.nb\" that is available on the same web page where this notebook \ resides. This implementation uses a slightly difference mesh representation \ that allows the incorporation of both tensions and creases in simple compact \ manner. Please consult this notebook for the code used to generate figures \ 7.15-7.18.\ \>", "Text"], Cell[CellGroupData[{ Cell["Figure for weighted averaging", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ Graphics[\[IndentingNewLine]{Thickness[0.01], Line[{{1, 1}, {1, \(-1\)}}], Line[{{0, 1}, {0, \(-1\)}}], Line[{{\(-1\), 1}, {\(-1\), \(-1\)}}], \[IndentingNewLine]Line[{{1, 1}, {\(-1\), 1}}], Line[{{1, 0}, {\(-1\), 0}}], Line[{{\(-1\), \(-1\)}, {1, \(-1\)}}], \[IndentingNewLine]PointSize[ 0.04], Point[{0, 0}], \[IndentingNewLine]Dashing[{0.05}], Thickness[ 0.01], \[IndentingNewLine]Line[{{1\/3, 1}, {1\/3, \(-1\)}}], Line[{{\(-1\)\/3, 1}, {\(-1\)\/3, \(-1\)}}], \[IndentingNewLine]Line[{{1, 1\/3}, {\(-1\), 1\/3}}], Line[{{1, \(-1\)\/3}, {\(-1\), \(-1\)\/3}}], \ \[IndentingNewLine]GrayLevel[0.5], Point[{1\/3, 1\/3}], \[IndentingNewLine]Point[{\(-\(1\/3\)\), 1\/3}], Point[{1\/3, \(-\(1\/3\)\)}], Point[{\(-\(1\/3\)\), \(-\(1\/3\)\)}], \[IndentingNewLine]GrayLevel[ 0], \[IndentingNewLine]Text[ HoldForm[\(\[Sigma]\_k\) \[Rho]\_k], {1\/6, 1\/8}], Text[HoldForm[1], {7\/8, 7\/8}], \[IndentingNewLine]Text[ HoldForm[\[Sigma]\_k], {1\/8, 7\/8}], Text[HoldForm[\[Rho]\_k], {7\/8, 1\/8}], \[IndentingNewLine]Text[ v, {\(-1\)\/16, \(-1\)\/16}], Text[u, {17\/16, \(-1\)\/16}], Text[t, {\(-1\)\/16, 17\/16}], Text[s, {17\/16, 17\/16}]}], TextStyle \[Rule] {FontSize \[Rule] 14}, AspectRatio \[Rule] 1]\)], "Input", CellTags->"FIG weighted centroids"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[BoxData[ \(genCoarse[{T_, p_}] := Graphics[\[IndentingNewLine]{Thickness[0.01], Table[Line[ p\[LeftDoubleBracket]Join[ T\[LeftDoubleBracket] i\[RightDoubleBracket], {T\[LeftDoubleBracket]i, 1\[RightDoubleBracket]}]\[RightDoubleBracket]], {i, Length[T]}], \[IndentingNewLine]PointSize[ 0.04], \[IndentingNewLine]Table[ Point[p\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, Length[p]}]}]\)], "Input", InitializationCell->True], Cell[BoxData[ \(genFine[{T_, p_}] := Graphics[\[IndentingNewLine]{Dashing[{0.03}], Thickness[0.01], Table[Line[ p\[LeftDoubleBracket]Join[ T\[LeftDoubleBracket] i\[RightDoubleBracket], {T\[LeftDoubleBracket]i, 1\[RightDoubleBracket]}]\[RightDoubleBracket]], {i, Length[T]}], \[IndentingNewLine]PointSize[0.04], GrayLevel[0.75], \[IndentingNewLine]Table[ Point[p\[LeftDoubleBracket]i\[RightDoubleBracket]], {i, Length[p]}]}]\)], "Input", InitializationCell->True], Cell[BoxData[ \(nDegTris[ n_] := \[IndentingNewLine]{Join[ Table[{1, 1, i, i + 1}, {i, 2, n}], {{1, 1, n + 1, 2}}], \[IndentingNewLine]Join[{{0, 0}}, Table[{Cos[\(2 \[Pi]\ i\)\/n], Sin[\(2\ \[Pi]\ i\)\/n]} // N, {i, 0, n - 1}]]}\)], "Input", InitializationCell->True], Cell[BoxData[ \(genFine[{T_, p_}] := Graphics[\[IndentingNewLine]{Dashing[{0.03}], Thickness[0.005], Table[\[IndentingNewLine]Table[ Line[Sort[ p\[LeftDoubleBracket]{T\[LeftDoubleBracket]i, j\[RightDoubleBracket], T\[LeftDoubleBracket]i, j + 1\[RightDoubleBracket]}\[RightDoubleBracket]]], \ \[IndentingNewLine]{j, Length[T\[LeftDoubleBracket]i\[RightDoubleBracket]] - 1}], {i, Length[T]}]}]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[genFine[quadSub[nDegTris[6]]], genCoarse[nDegTris[6]], AspectRatio \[Rule] 1]\)], "Input", CellTags->"FIG pole"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Averaging for quad meshes with embedded creases", "Subsection", CellTags->"SEC creases"], Cell[TextData[{ "This section contains a ", StyleBox["Mathematica", FontSlant->"Italic"], " implementation for quad averaging in the presence of creases. The \ implementation in this section works on meshes defined using the flattened \ polyhedral representation of section 7.2.1. The auxiliary notebook \ \"meshes.nb\" contains more examples of polyhedral subdivision for meshes \ based on the cubic mesh representation discussed in that notebook. In \ particular, figures 7.21-7.24 were created using this code." }], "Text"], Cell[CellGroupData[{ Cell["Code to handle lower dimensional creases", "Subsubsection"], Cell[TextData[{ Cell[BoxData[ \(dimension\)]], " compute dimension of cell in the topological mesh ", Cell[BoxData[ \(T\)]] }], "Text"], Cell[BoxData[ \(dimension[cell_] := If[Length[cell] \[Equal] 1, 0, If[Length[cell] \[Equal] 2, 1, 2]]\)], "Input", InitializationCell->True], Cell[TextData[{ "Modify ", Cell[BoxData[ RowBox[{"quadSub", Cell[""]}]]], " to subdivide lower dimensional cells" }], "Text"], Cell[BoxData[ RowBox[{\(quadCreaseSub[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({idx, index, currIndex = Length[p], newT, newp}\), ",", "\[IndentingNewLine]", "\n", "\[IndentingNewLine]", \( (*\ define\ an\ order\ independent\ hash\ table\ idx, \ intialize\ it\ to\ zero, \[IndentingNewLine]\ lookup\ function\ index, \ increments\ global\ counter\ currIndex\ when\ new\ vertex\ is\ \ encountered\ *) \), "\[IndentingNewLine]", RowBox[{\(SetAttributes[idx, Orderless]\), ";", "\[IndentingNewLine]", \(idx[_, _] = 0\), ";", "\[IndentingNewLine]", \(index[i_, j_] := If[idx[i, j] == 0, idx[i, j] = \(++currIndex\), idx[i, j]]\), ";", "\n", "\n", "\[IndentingNewLine]", \( (*\ allocate\ table\ of\ size\ sufficient\ to\ hold\ new\ vertex\ \ locations\ *) \), "\[IndentingNewLine]", \(newp = Table[0, {2 Length[T] + 2 Length[p] + 10}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"newT", "=", RowBox[{"Flatten", "[", RowBox[{ RowBox[{ "Table", "[", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ subdivide\ a\ quad\ into\ four\ quads\ using\ bi - linear\ interpolation\ *) \), "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{\(dimension[ T\[LeftDoubleBracket] l\[RightDoubleBracket]] \[Equal] 2\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({i00 = T\[LeftDoubleBracket]l, 1\[RightDoubleBracket], i20 = T\[LeftDoubleBracket]l, 2\[RightDoubleBracket], i22 = T\[LeftDoubleBracket]l, 3\[RightDoubleBracket], i02 = T\[LeftDoubleBracket]l, 4\[RightDoubleBracket]}\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({i01 = index[i00, i02], i12 = index[i02, i22], i10 = index[i00, i20], i21 = index[i20, i22], i11 = \(++currIndex\)}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ update\ geometric\ info\ in\ newG\ *) \), "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket]{i00, i20, i22, i02, i10, i21, i12, i01, i11}\[RightDoubleBracket]\), "=", RowBox[{\(1\/4\), RowBox[{ RowBox[{"(", GridBox[{ {"4", "0", "0", "0"}, {"0", "4", "0", "0"}, {"0", "0", "4", "0"}, {"0", "0", "0", "4"}, {"2", "2", "0", "0"}, {"0", "2", "2", "0"}, {"0", "0", "2", "2"}, {"2", "0", "0", "2"}, {"1", "1", "1", "1"} }], ")"}], ".", \(p\[LeftDoubleBracket]T\ \[LeftDoubleBracket]l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ create\ four\ subtriangles\ *) \), "\[IndentingNewLine]", \({{i00, i10, i11, i01}, \[IndentingNewLine]{i02, i01, i11, i12}, \[IndentingNewLine]{i20, i21, i11, i10}, \[IndentingNewLine]{i22, i12, i11, i21}}\)}]}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ split\ segment, \ copy\ vertex\ *) \), "\[IndentingNewLine]", RowBox[{"If", "[", RowBox[{\(dimension[ T\[LeftDoubleBracket]l\[RightDoubleBracket]]\ \[Equal] 1\), ",", "\[IndentingNewLine]", RowBox[{"With", "[", RowBox[{\({i0 = T\[LeftDoubleBracket]l, 1\[RightDoubleBracket], i1 = T\[LeftDoubleBracket]l, 2\[RightDoubleBracket], i01 = index[ T\[LeftDoubleBracket]l, 1\[RightDoubleBracket], T\[LeftDoubleBracket]l, 2\[RightDoubleBracket]]}\), ",", "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket]{i0, i01, i1}\[RightDoubleBracket]\), "=", RowBox[{\(1\/2\), RowBox[{ RowBox[{"(", GridBox[{ {"2", "0"}, {"1", "1"}, {"0", "2"} }], ")"}], ".", \(p\[LeftDoubleBracket]T\ \[LeftDoubleBracket]l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ";", \({{i0, i01}, {i01, i1}}\)}]}], "]"}], ",", "\[IndentingNewLine]", \(newp\ \[LeftDoubleBracket]T\[LeftDoubleBracket]l, 1\[RightDoubleBracket]\ \[RightDoubleBracket] = p\[LeftDoubleBracket]T\[LeftDoubleBracket]l, 1\[RightDoubleBracket]\ \[RightDoubleBracket]; {T\[LeftDoubleBracket]l\[RightDoubleBracket]}\)}], "]"}]}], "]"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ return\ topology\ plus\ part\ of\ newG\ that\ was\ actually\ \ used\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \({newT, Take[newp, currIndex]}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[TextData[{ "Modify ", Cell[BoxData[ \(quadAverage\)]], " to compute ", Cell[BoxData[ \(dim\)]], " and ", Cell[BoxData[ \(val\)]], " for each vertex, modify smoothing rule" }], "Text"], Cell[BoxData[ \(quadCreaseAverage[{T_, p_}] := Module[{newp = 0*p, \ val = Table[0, {Length[p]}], dim = Table[\[Infinity], {Length[ p]}]}, \[IndentingNewLine]\[IndentingNewLine] (*\ compute\ table\ of\ vertex\ valences\ and\ dimensions\ \ *) \[IndentingNewLine]Do[ With[{d = dimension[ T\[LeftDoubleBracket] l\[RightDoubleBracket]]}, \[IndentingNewLine]Do[ With[{idx = T\[LeftDoubleBracket]l, i\[RightDoubleBracket]}, \[IndentingNewLine]If[ d < dim\[LeftDoubleBracket] idx\[RightDoubleBracket], \[IndentingNewLine]dim\ \[LeftDoubleBracket]idx\[RightDoubleBracket] = d; val\[LeftDoubleBracket]idx\[RightDoubleBracket] = 1, \[IndentingNewLine]If[ d \[Equal] dim\[LeftDoubleBracket] idx\[RightDoubleBracket], \(++val\[LeftDoubleBracket] idx\[RightDoubleBracket]\)]]], \[IndentingNewLine]{i, Length[T\[LeftDoubleBracket] l\[RightDoubleBracket]]}]], \[IndentingNewLine]{l, Length[T]}]; \[IndentingNewLine]\[IndentingNewLine] (*\ apply\ smoothing\ mask\ to\ each\ cell\ and\ accumulate\ results\ *) \[IndentingNewLine]Do[ With[{cent = Apply[Plus, p\[LeftDoubleBracket]T\[LeftDoubleBracket]l\ \[RightDoubleBracket]\[RightDoubleBracket]]\/Length[T\[LeftDoubleBracket]l\ \[RightDoubleBracket]]}, \[IndentingNewLine]Do[ With[{idx = T\[LeftDoubleBracket]l, i\[RightDoubleBracket]}, \[IndentingNewLine]If[ dimension[ T\[LeftDoubleBracket]l\[RightDoubleBracket]] \[Equal] dim\[LeftDoubleBracket]idx\[RightDoubleBracket], newp\[LeftDoubleBracket]idx\[RightDoubleBracket] += cent\/val\[LeftDoubleBracket]idx\[RightDoubleBracket]]], \ \[IndentingNewLine]{i, Length[T\[LeftDoubleBracket] l\[RightDoubleBracket]]}]], \[IndentingNewLine]{l, Length[T]}]; \[IndentingNewLine]\[IndentingNewLine]{T, newp}]\)], "Input", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["Example of a simple polyhedral surface with creases", "Subsubsection"], Cell[TextData[{ "To allow for creases, we add topological edges and vertices to the \ topology list ", Cell[BoxData[ \(T\)]], ". Below is the surface mesh of equation 7.6." }], "Text"], Cell[BoxData[ \(\(surface = {{{1}, {3}, {7}, {9}, {1, 4}, {4, 7}, {1, 2}, {2, 3}, {3, 6}, {6, 9}, {7, 8}, {8, 9}, \[IndentingNewLine]{1, 2, 5, 4}, {4, 5, 8, 7}, {2, 3, 6, 5}, {5, 6, 9, 8}}, \[IndentingNewLine]{{0, 0, 0}, {1, 0, 1}, {2, 0, 0}, {0, 1, 1}, {1, 1, 2}, {2, 1, 1}, {0, 2, 0}, {1, 2, 1}, {2, 2, 0}}};\)\)], "Input", InitializationCell->True], Cell["\<\ Examples of rectangluar surface mesh with boundary creases, example from \ first of section\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{displayMesh[ surface], \[IndentingNewLine]displayMesh[quadCreaseSub[surface]], displayMesh[ quadCreaseAverage[quadCreaseSub[surface]]]}]]\)], "Input", CellTags->"FIG bilinear subdivision plus averaging"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{Nest[ Composition[quadCreaseAverage, quadCreaseSub], surface, 0] // displayMesh, \[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], surface, 1] // displayMesh, \[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], surface, 2] // displayMesh, \[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], surface, 3] // displayMesh}]]\)], "Input", CellTags->{ "FIG bilinear subdivision plus averaging", "Fig: Tensor product cubic B-spline"}], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell["\<\ An example of cube with a single crease curve formed by six connected edges\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Nest[ Composition[quadCreaseAverage, quadCreaseSub], {{{1, 2}, {2, 4}, {4, 8}, {1, 3}, {3, 7}, {7, 8}, \[IndentingNewLine]{1, 2, 4, 3}, {5, 6, 8, 7}, {1, 3, 7, 5}, {2, 4, 8, 6}, {1, 5, 6, 2}, {3, 7, 8, 4}}, \[IndentingNewLine]{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {1, 1, 0}, {0, 0, 1}, {1, 0, 1}, {0, 1, 1}, {1, 1, 1}}}, 3] // displayMesh\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] Graphics3D \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Ring and axe examples", "Subsubsection"], Cell["Two more interesting examples", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{{\[IndentingNewLine]displayMeshColor[ Nest[Composition[quadCreaseAverage, quadCreaseSub], colorRing, 0], ViewPoint -> {\(-0.070\), \ 1.645, \ \(-2.956\)}], \[IndentingNewLine]displayMeshColor[ Nest[Composition[quadCreaseAverage, quadCreaseSub], colorRing, 1], ViewPoint -> {\(-0.070\), \ 1.645, \ \(-2.956\)}]}, \ {\[IndentingNewLine]displayMeshColor[ Nest[Composition[quadCreaseAverage, quadCreaseSub], colorRing, 2], ViewPoint -> {\(-0.070\), \ 1.645, \ \(-2.956\)}], \[IndentingNewLine]displayMeshColor[ Nest[Composition[quadCreaseAverage, quadCreaseSub], colorRing, 3], ViewPoint -> {\(-0.070\), \ 1.645, \ \(-2.956\)}]}}]]\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]{Nest[ Composition[quadCreaseAverage, quadCreaseSub], colorAxe, 0] // displayMeshColor, \[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], colorAxe, 1] // displayMeshColor}, {\[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], colorAxe, 2] // displayMeshColor, \[IndentingNewLine]Nest[ Composition[quadCreaseAverage, quadCreaseSub], colorAxe, 3] // displayMeshColor}}]]\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Code used in creating figure 7.8", "Subsubsection"], Cell["Non\[Hyphen]manifold butterfly curve with curve plotting function", \ "Text"], Cell[BoxData[ \(curvePlot[{T_, G_}, dotSize_, opts___] := Show[Graphics[\[IndentingNewLine]Join[{PointSize[dotSize]}, Flatten[Table[ If[Length[ T\[LeftDoubleBracket]i\[RightDoubleBracket]] \[Equal] 0, Point[ G\[LeftDoubleBracket]T\[LeftDoubleBracket] i\[RightDoubleBracket]\[RightDoubleBracket]], \ \[IndentingNewLine]{Point[ G\[LeftDoubleBracket]T\[LeftDoubleBracket]i, 1\[RightDoubleBracket]\[RightDoubleBracket]], Point[G\[LeftDoubleBracket] T\[LeftDoubleBracket]i, 2\[RightDoubleBracket]\[RightDoubleBracket]], Line[G\[LeftDoubleBracket]T\[LeftDoubleBracket] i\[RightDoubleBracket]\[RightDoubleBracket]]}], {i, Length[T]}]]]], AspectRatio \[Rule] Automatic, opts]\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(With[{butterfly = {{{1, 2}, {2, 3}, {3, 1}, {1, 4}, {4, 5}, {5, 1}}, {{0, 0}, {1, 1}, {1\/2, \(-1\)}, {\(-1\), 1}, {\(-1\)\/2, \(-1\)}}}}, \n Show[GraphicsArray[{\[IndentingNewLine]curvePlot[ Nest[Composition[quadCreaseAverage, quadCreaseSub], butterfly, 0], \[IndentingNewLine]0.02, PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]curvePlot[ Nest[Composition[quadCreaseAverage, quadCreaseSub], butterfly, 1], \[IndentingNewLine]0.02, PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]curvePlot[ Nest[Composition[quadCreaseAverage, quadCreaseSub], butterfly, 2], \[IndentingNewLine]0.02, PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]curvePlot[ Nest[Composition[quadCreaseAverage, quadCreaseSub], butterfly, 3], \[IndentingNewLine]0.02, PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}}]}]]]\)], "Input", CellTags->"FIG butterfly"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Smooth subdivision for triangular meshes", "Section"], Cell[CellGroupData[{ Cell["Linear subdivision plus triangle averaging", "Subsection", CellTags->"SUBSEC smooth triangular"], Cell[CellGroupData[{ Cell["Triangle averaging", "Subsubsection"], Cell[TextData[{ "Initial version of ", Cell[BoxData[ \(triAverage\)]] }], "Text"], Cell[BoxData[ RowBox[{\(triAverage[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({newp = 0*p, \ val = Table[0, {Length[p]}]}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ compute\ table\ of\ vertex\ valences\ *) \), "\[IndentingNewLine]", RowBox[{\(Do[\(++val\[LeftDoubleBracket] T\[LeftDoubleBracket]l, i\[RightDoubleBracket]\[RightDoubleBracket]\), \ \[IndentingNewLine]{l, Length[T]}, {i, Length[T\[LeftDoubleBracket]l\[RightDoubleBracket]]}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ apply\ smoothing\ mask\ to\ each\ cell\ *) \), "\[IndentingNewLine]", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{\(newp\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\), "+=", " ", RowBox[{\(1\/\(8 val\[LeftDoubleBracket]T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)\), RowBox[{ RowBox[{"(", GridBox[{ {"2", "3", "3"}, {"3", "2", "3"}, {"3", "3", "2"} }], ")"}], ".", \(p\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}]}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \({T, newp}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{{displayMesh[triSub[octa], PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ triAverage[triSub[octa]], PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}]}, \[IndentingNewLine]{displayMesh[ triSub[triAverage[triSub[octa]]], PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ triAverage[triSub[triAverage[triSub[octa]]]], PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}]}}]]\)], "Input", CellTags->"Fig: 3 rounds of linear subdivision plus triangle smoothing"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{displayMesh[ Nest[Composition[triAverage, triSub], stellatedOcta, 0], \[IndentingNewLine]PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ Nest[Composition[triAverage, triSub], stellatedOcta, 3], \[IndentingNewLine]PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}], \[IndentingNewLine]displayMesh[ Nest[Composition[loopAverage, triSub], stellatedOcta, 3], \[IndentingNewLine]PlotRange \[Rule] {{\(-1\), 1}, {\(-1\), 1}, {\(-1\), 1}}]}]]\)], "Input", CellTags->"FIG stellated octahedron example"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Comparison to other triangle schemes", "Subsection"], Cell[CellGroupData[{ Cell["Figures for triangle masks", "Subsubsection"], Cell[BoxData[ \(nTris[ n_] := \[IndentingNewLine]{Join[ Table[{1, i, i + 1}, {i, 2, n}], {{1, n + 1, 2}}], \[IndentingNewLine]Join[{{0, 0}}, Table[{Cos[\(2 \[Pi]\ i\)\/n], Sin[\(2\ \[Pi]\ i\)\/n]} // N, {i, 0, n - 1}]]}\)], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(\(\(Show[ GraphicsArray[{\[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3}, {1, 2, 4}}, \(1\/2\) {{\(-1\), 0}, {1, 0}, {0, 2}, {0, \(-2\)}}}, {3\/8, 3\/8, 1\/8, 1\/8}, {{1, 0}, {\(-1\), 0}, {0, \(-1\)}, {0, 1}}, {{\(-3\)\/2, 3\/2}, {\(-3\)\/2, 3\/2}}], \[IndentingNewLine]displayTaggedMesh[ nTris[5], {5\/8, 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\), 3\/\(8 n\)}, \[IndentingNewLine]{{2, 0}, {\(-1\), 0}, {0, \(-1\)}, {1, \(-1\)}, {1, 1}, {0, 1}}, {{\(-1.2\), 1.2}, {\(-1.2\), 1.2}}], \[IndentingNewLine]displayTaggedMesh[ nTris[5], {1 - w[n], w[n]\/n, w[n]\/n, w[n]\/n, w[n]\/n, w[n]\/n}, \[IndentingNewLine]{{1, 0}, {\(-1\), 0}, {0, \(-1\)}, {1, \(-1\)}, {1, 1}, {0, 1}}, {{\(-1.2\), 1.2}, {\(-1.2\), 1.2}}]}]]\)\(\[IndentingNewLine]\) \)\)], "Input", CellTags->"FIG tri vertex rules"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Implementation of Loop's scheme", "Subsubsection"], Cell[BoxData[ RowBox[{\(loopAverage[{T_, p_}]\), ":=", RowBox[{"Module", "[", RowBox[{\({newp = 0*p, \ val = Table[0, {Length[p]}]}\), ",", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ compute\ table\ of\ vertex\ valences\ *) \), "\[IndentingNewLine]", RowBox[{\(Do[\(++val\[LeftDoubleBracket] T\[LeftDoubleBracket]l, i\[RightDoubleBracket]\[RightDoubleBracket]\), \ \[IndentingNewLine]{l, Length[T]}, {i, Length[T\[LeftDoubleBracket]l\[RightDoubleBracket]]}]\), ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \( (*\ apply\ smoothing\ mask\ to\ each\ cell\ *) \), "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{"With", "[", RowBox[{\({a = 5\/8 - \((3\/8 + \(1\/4\) Cos[\(2.0 \[Pi]\)\/val\ \[LeftDoubleBracket]T\[LeftDoubleBracket]l\[RightDoubleBracket]\ \[RightDoubleBracket]])\)\^2}\), ",", "\[IndentingNewLine]", RowBox[{\(newp\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\), "+=", RowBox[{\(1\/\(\(\ \)\(val\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)\ \)\), RowBox[{ RowBox[{"(", GridBox[{ {\(1 - 2 a\[LeftDoubleBracket]1\ \[RightDoubleBracket]\), \(a\[LeftDoubleBracket]1\[RightDoubleBracket]\), \(a\ \[LeftDoubleBracket]1\[RightDoubleBracket]\)}, {\(a\[LeftDoubleBracket]2\[RightDoubleBracket]\ \), \(1 - 2 a\[LeftDoubleBracket]2\ \[RightDoubleBracket]\), \(a\[LeftDoubleBracket]2\[RightDoubleBracket]\)}, {\(a\[LeftDoubleBracket]3\[RightDoubleBracket]\ \), \(a\[LeftDoubleBracket]3\[RightDoubleBracket]\), \(1 - 2 a\[LeftDoubleBracket]3\ \[RightDoubleBracket]\)} }], ")"}], ".", \(p\[LeftDoubleBracket] T\[LeftDoubleBracket] l\[RightDoubleBracket]\[RightDoubleBracket]\)}]}\ ]}]}], "]"}], ",", "\[IndentingNewLine]", \({l, Length[T]}\)}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", \({T, newp}\)}]}], "]"}]}]], "Input", InitializationCell->True], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[\[IndentingNewLine]{Nest[Composition[triAverage, triSub], octa, 3] // displayMesh, Nest[Composition[loopAverage, triSub], octa, 3] // displayMesh}]]\)], "Input", CellTags->"FIG averaging versus Loop"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Other types of polyhedral schemes", "Section"], Cell[CellGroupData[{ Cell["Face\[Hyphen]splitting schemes", "Subsection"], Cell[CellGroupData[{ Cell["Face\[Hyphen]splitting topological subdivision figure", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{1, \(-3\)}, {1, 3}}], \[IndentingNewLine]Line[{{\(-1\), \(-3\)}, \ {\(-1\), 3}}], \[IndentingNewLine]Line[{{\(-3\), 1}, {3, 1}}], \[IndentingNewLine]Line[{{\(-3\), \(-1\)}, {3, \ \(-1\)}}], \[IndentingNewLine]Point[{1, 1}], Point[{\(-1\), 1}], Point[{\(-1\), \(-1\)}], Point[{1, \(-1\)}], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[{{2, 2}, {\(-2\), \(-2\)}}], Line[{{\(-2\), 2}, {2, \(-2\)}}], \[IndentingNewLine]Line[{{3, \ \(-1\)}, {\(-1\), 3}}], Line[{{1, \(-3\)}, {\(-3\), 1}}], \[IndentingNewLine]Line[{{\(-1\), \(-3\)}, {3, 1}}], Line[{{\(-3\), \(-1\)}, {1, 3}}], \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[{0, 0}], Point[{2, 0}], Point[{0, 2}], Point[{\(-2\), 0}], Point[{0, \(-2\)}]}], AspectRatio \[Rule] Automatic], g2 = With[{p0 = {0, 0}, p1 = {2, 0}, p2 = {1, \@3}}, \[IndentingNewLine]Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{p0, p1}], \[IndentingNewLine]Line[{p0, p2}], \[IndentingNewLine]Line[{p1, p2}], \[IndentingNewLine]Line[{\(p0 + p1\)\/2, \(p1 + \ p2\)\/2}], \[IndentingNewLine]Line[{\(p0 + p1\)\/2, \(p0 + p2\)\/2}], \ \[IndentingNewLine]Line[{\(p0 + p2\)\/2, \(p1 + p2\)\/2}], \ \[IndentingNewLine]Point[p0], Point[p1], Point[p2], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[{p0, \(p1 + p2\)\/2}], \[IndentingNewLine]Line[{p1, \ \(p0 + p2\)\/2}], \[IndentingNewLine]Line[{p2, \(p1 + p0\)\/2}], \ \[IndentingNewLine]Line[{\(3 p0 + p1\)\/4, \(p0 + p2\)\/2}], Line[{\(3 p0 + p2\)\/4, \(p0 + p1\)\/2}], \ \[IndentingNewLine]Line[{\(3 p1 + p0\)\/4, \(p1 + p2\)\/2}], Line[{\(3 p1 + p2\)\/4, \(p0 + p1\)\/2}], \ \[IndentingNewLine]Line[{\(3 p2 + p1\)\/4, \(p0 + p2\)\/2}], Line[{\(3 p2 + p0\)\/4, \(p1 + p2\)\/2}], \ \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[\(p0 + p1 + p2\)\/3], \ \[IndentingNewLine]Point[\(4 p0 + p1 + p2\)\/6], Point[\(p0 + 4 p1 + p2\)\/6], Point[\(p0 + p1 + 4 p2\)\/6]}], AspectRatio \[Rule] Automatic]]}]]\)], "Input", CellTags->"FIG face-splitting subdivisions"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Figures for interpolatory subdivision masks", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3, 4}, {1, 2, 5, 6}, {2, 3, 7, 8}, {3, 4, 9, 10}, {1, 4, 11, 12}}, \[IndentingNewLine]0.45 {{\(-1\), \(-1\)}, {1, \ \(-1\)}, {1, 1}, {\(-1\), 1}, {1, \(-3\)}, {\(-1\), \(-3\)}, {3, 1}, {3, \(-1\)}, {\(-1\), 3}, {1, 3}, {\(-3\), 1}, {\(-3\), \(-1\)}}}, {5\/16, 5\/16, 5\/16, 5\/16, \(-\(1\/32\)\), \(-\(1\/32\)\), \(-\(1\/32\)\), \ \(-\(1\/32\)\), \(-\(1\/32\)\), \(-\(1\/32\)\), \(-\(1\/32\)\), \ \(-\(1\/32\)\)}, {{1, 1}, {\(-1\), 1}, {\(-1\), \(-1\)}, {1, \(-1\)}, {\(-1\), 0}, {1, 0}, {0, \(-1\)}, {0, 1}, {1, 0}, {\(-1\), 0}, {0, \(-1\)}, {0, 1}}, {{\(-1.5\), 1.5}, {\(-1.5\), 1.5}}], \[IndentingNewLine]displayTaggedMesh[{{{1, 2, 3}, {1, 2, 4}, {2, 3, 5}, {1, 3, 6}}, \(1\/2\) {{\(-1\), \(-5\)\/6}, {1, \(-5\)\/6}, {0, 7\/6}, {0, \(-3\) + 1\/6}, {2, 7\/6}, {\(-2\), 7\/6}}}, {4\/9, 4\/9, 4\/9, \(-\(1\/9\)\), \(-\(1\/9\)\), \(-\(1\/9\)\)}, \ \[IndentingNewLine]{{1, 1}, {\(-1\), 1}, {0, \(-1\)}, {\(-1.5\), \(-1\)}, {\(-1\), 0}, {1, 0}}, {{\(-1.3\), 1.3}, {\(-1.5\), 1.0}}]}]]\)], "Input", CellTags->"FIG interpolatory face-split rules"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Code to test smoothness of interpolatory face splitting quad scheme\ \>", "Subsubsection", CellTags->"SUBSEC face splitting quad analysis"], Cell[TextData[{ "Transformations for quad case, represent as subset of integer grids via \ two transfromations ", Cell[BoxData[ \({x \[Rule] x\ y, y \[Rule] \(x\^\(-1\)\) y}\)]], " and ", Cell[BoxData[ \({x \[Rule] x\ y\^\(-1\), y \[Rule] x\ y}\)]], ". The composition of the two transfromation yields standard dilation \ (i.e., ", Cell[BoxData[ \({x \[Rule] x\^2, y \[Rule] y\^2}\)]], ")." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(\({x, y} /. {x \[Rule] x\ y, y \[Rule] \(x\^\(-1\)\) y}\) /. {x \[Rule] x\ y\^\(-1\), y \[Rule] x\ y}\)], "Input"], Cell[BoxData[ \({x\^2, y\^2}\)], "Output"] }, Open ]], Cell["Define interpolatory mask with cubic precision", "Text"], Cell[BoxData[ \(\(s = 1 + \(5\/16\) x + \(5\/16\) y + \(5\/16\) x\^\(-1\) + \(5\/16\) y\^\(-1\) - \[IndentingNewLine]\(1\/32\) \(x\^2\) y - \(1\/32\) x\ y\^2 - \(1\/32\) \(x\^\(-2\)\) y - \(1\/32\) \(x\^\(-1\)\) y\^2 - \[IndentingNewLine]\(1\/32\) \(x\^2\) y\^\(-1\) - \(1\/32\) x\ y\^\(-2\) - \(1\/32\) \(x\^\(-2\)\) y\^\(-1\) - \(1\/32\) \(x\^\(-1\)\) y\^\(-2\);\)\)], "Input"], Cell["Define equivalent mask for two rounds of subdivison", "Text"], Cell[BoxData[ \(\(ss = \((s /. {x \[Rule] x\ y, y \[Rule] \(x\^\(-1\)\) y})\)*s // Expand;\)\)], "Input"], Cell["\<\ Use functions from chapter 2 to confirm cubic precision on expanded mask\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(checkRoots[ss, 3]\)], "Input"], Cell[BoxData[ \(True\)], "Output"] }, Open ]], Cell["\<\ Compute matrix mask for difference of first divided differences for the \ scheme\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(t = computeMatrixMask[\(x\^5\) \(y\^5\) ss, {10, 10}, 1]\)], "Input"], Cell[BoxData[ \({{671\/47616 + \(671\ x\^2\)\/23808 + \(889\ x\^3\)\/72704 + \(13393\ x\ \^4\)\/416640 + \(551\ x\^5\)\/18176 + \(7859\ x\^6\)\/277760 + \(1031\ \ x\^7\)\/72704 + \(7859\ x\^8\)\/555520 + \(355\ x\ y\)\/22528 + \(1163\ x\^3\ \ y\)\/45056 + \(25\ x\^5\ y\)\/352 + \(211\ x\^7\ y\)\/5632 - \(2271\ \ y\^2\)\/138880 + \(4655\ x\ y\^2\)\/72704 + \(1315\ x\^3\ y\^2\)\/18176 + \ \(8441\ x\^4\ y\^2\)\/208320 + \(9\ x\^7\ y\^2\)\/512 - \(445\ x\^8\ \ y\^2\)\/27776 + y\^3\/256 - \(7\ x\^2\ y\^3\)\/512 + \(1753\ x\^3\ y\^3\)\/22528 - \ \(7\ x\^6\ y\^3\)\/512 - \(255\ x\^7\ y\^3\)\/5632 + \(x\^8\ y\^3\)\/256 - \ \(66813\ x\ y\^4\)\/581632 - \(27933\ x\^2\ y\^4\)\/277760 + \(11939\ x\^4\ y\ \^4\)\/83328 + \(77\ x\^5\ y\^4\)\/1136 - \(5513\ x\^6\ y\^4\)\/55552 - \ \(2777\ x\^7\ y\^4\)\/36352 - \(161\ x\ y\^5\)\/5632 - \(25\ x\^2\ \ y\^5\)\/256 + \(4383\ x\^3\ y\^5\)\/45056 + \(47\ x\^4\ y\^5\)\/64 + \(87\ \ x\^5\ y\^5\)\/704 - \(25\ x\^6\ y\^5\)\/256 - \(1287\ y\^6\)\/277760 + \ \(25635\ x\^3\ y\^6\)\/145408 + \(56237\ x\^4\ y\^6\)\/138880 + \(6329\ x\^5\ \ y\^6\)\/36352 - \(739\ x\^8\ y\^6\)\/222208 + y\^7\/256 - \(19\ x\ y\^7\)\/512 - \(7\ x\^2\ y\^7\)\/512 - \(7\ \ x\^6\ y\^7\)\/512 - \(255\ x\^7\ y\^7\)\/5632 + \(x\^8\ y\^7\)\/256 + \(7027\ \ y\^8\)\/1666560 + \(6039\ x\ y\^8\)\/581632 + \(943\ x\^2\ y\^8\)\/208320 + \ \(715\ x\^7\ y\^8\)\/72704 + \(773\ x\ y\^9\)\/22528 + \(729\ x\^3\ \ y\^9\)\/11264 + \(25\ x\^5\ y\^9\)\/352 + \(211\ x\^7\ y\^9\)\/5632 + \(2231\ \ y\^10\)\/833280 + \(2679\ x\ y\^10\)\/290816 + \(2231\ x\^2\ y\^10\)\/416640 \ + \(2963\ x\^3\ y\^10\)\/145408 + \(573\ x\^4\ y\^10\)\/138880 + \(329\ x\^5\ \ y\^10\)\/36352 + \(1173\ x\^6\ y\^10\)\/138880 + \(129\ x\^7\ y\^10\)\/36352 \ + \(5777\ x\^8\ y\^10\)\/1111040, \(x\^2\ y\)\/512 - \(x\^8\ y\)\/512 - \ \(x\^2\ y\^7\)\/512 + \(x\^8\ y\^7\)\/512, \(-\(671\/47616\)\) - \(747\ \ x\^3\)\/72704 + \(10373\ x\^4\)\/1666560 + \(1457\ x\^7\)\/36352 + \(10649\ x\ \^8\)\/1666560 - \(1031\ x\^11\)\/72704 - \(7859\ x\^12\)\/555520 - \(355\ x\ \ y\)\/22528 + \(81\ x\^3\ y\)\/45056 - \(7\ x\^4\ y\)\/512 - \(9\ x\^6\ \ y\)\/256 + \(5133\ x\^7\ y\)\/45056 - \(7\ x\^8\ y\)\/512 - \(211\ x\^11\ y\)\ \/5632 - \(9859\ y\^2\)\/833280 - \(4513\ x\ y\^2\)\/72704 - \(10169\ x\^2\ y\ \^2\)\/277760 + \(6575\ x\^5\ y\^2\)\/72704 + \(731\ x\^6\ y\^2\)\/6510 - \ \(1997\ x\^10\ y\^2\)\/55552 - \(1599\ x\^11\ y\^2\)\/36352 - \(487\ x\^12\ y\ \^2\)\/39680 - y\^3\/512 - \(399\ x\ y\^3\)\/11264 - \(3\ x\^2\ y\^3\)\/256 - \ \(447\ x\^5\ y\^3\)\/11264 + \(39\ x\^6\ y\^3\)\/256 - \(23\ x\^9\ \ y\^3\)\/1408 - \(3\ x\^10\ y\^3\)\/256 - \(189\ x\^11\ y\^3\)\/5632 - \(x\^12\ \ y\^3\)\/512 - \(5317\ y\^4\)\/555520 - \(15619\ x\ y\^4\)\/581632 - \(4185\ \ x\^3\ y\^4\)\/290816 + \(9197\ x\^4\ y\^4\)\/555520 + \(32621\ x\^5\ \ y\^4\)\/581632 + \(1511\ x\^8\ y\^4\)\/79360 - \(563\ x\^9\ y\^4\)\/36352 - \ \(1089\ x\^11\ y\^4\)\/72704 - \(5777\ x\^12\ y\^4\)\/555520 - \(773\ x\ y\^5\ \)\/22528 - \(7\ x\^4\ y\^5\)\/512 + \(1335\ x\^5\ y\^5\)\/22528 - \(9\ x\^6\ \ y\^5\)\/256 + \(845\ x\^7\ y\^5\)\/11264 - \(7\ x\^8\ y\^5\)\/512 - \(211\ \ x\^11\ y\^5\)\/5632 - \(2231\ y\^6\)\/833280 - \(2679\ x\ y\^6\)\/290816 + \ \(8245\ x\^5\ y\^6\)\/290816 - \(5567\ x\^6\ y\^6\)\/416640 + \(5\ x\^7\ y\^6\ \)\/145408 + \(581\ x\^8\ y\^6\)\/158720 + \(x\^10\ y\^6\)\/512 - \(129\ \ x\^11\ y\^6\)\/36352 - \(5777\ x\^12\ y\^6\)\/1111040}, {22895\/1714432 - \ \(1931\ x\)\/47552 + \(22895\ x\^2\)\/857216 - \(4361\ x\^3\)\/190208 - \ \(38399\ x\^4\)\/1714432 - \(255\ x\^5\)\/190208 - \(70101\ x\^6\)\/6857728 - \ \(1253\ x\^7\)\/760832 - \(23437\ y\)\/1747200 - \(86923\ x\^2\ y\)\/3494400 \ + \(417\ x\^3\ y\)\/837376 + \(3779\ x\^4\ y\)\/1747200 + \(24565\ x\^5\ \ y\)\/1674752 + \(323\ x\^6\ y\)\/20800 + \(6959\ x\^7\ y\)\/837376 - \(37557\ \ y\^2\)\/3428864 - \(22389\ x\^3\ y\^2\)\/760832 + \(92521\ x\^6\ \ y\^2\)\/3428864 + \(1091\ y\^3\)\/46592 - \(21647\ x\ y\^3\)\/209344 - \ \(30665\ x\^3\ y\^3\)\/837376 - \(3011\ x\^4\ y\^3\)\/349440 - \(23651\ x\^7\ \ y\^3\)\/1674752 - \(4301\ x\ y\^4\)\/190208 - \(50951\ x\^2\ y\^4\)\/857216 - \ \(52083\ x\^4\ y\^4\)\/1714432 + \(6051\ x\^7\ y\^4\)\/760832 + \(197749\ x\ \ y\^5\)\/1674752 - \(459\ x\^2\ y\^5\)\/46592 + \(78759\ x\^5\ y\^5\)\/1674752 \ - \(17203\ x\^6\ y\^5\)\/698880 - \(66149\ y\^6\)\/3428864 + \(43195\ x\^3\ y\ \^6\)\/380416 + \(28133\ x\^5\ y\^6\)\/1521664 - \(1103\ y\^7\)\/698880 - \ \(26041\ x\^3\ y\^7\)\/1674752 + \(2189\ x\^4\ y\^7\)\/46592 - \(355\ x\^5\ y\ \^7\)\/13084 - \(443\ x\^6\ y\^7\)\/11648 - \(7119\ x\^7\ y\^7\)\/1674752 + \ \(32583\ x\^2\ y\^8\)\/428608 - \(63\ x\^5\ y\^8\)\/1024 + \(38945\ x\^6\ \ y\^8\)\/6857728 + \(15569\ x\ y\^9\)\/1674752 - \(3541\ x\^2\ y\^9\)\/349440 \ + \(x\^5\ y\^9\)\/256 + \(9\ x\^6\ y\^9\)\/512 + \(3891\ y\^10\)\/428608 + \ \(7567\ x\ y\^10\)\/190208 - \(3625\ x\^2\ y\^10\)\/857216 - \(4949\ x\^3\ \ y\^10\)\/760832 - \(819\ x\^4\ y\^10\)\/428608 + \(8085\ x\^5\ \ y\^10\)\/1521664 + \(3421\ x\^6\ y\^10\)\/3428864 + \(573\ x\^7\ \ y\^10\)\/380416 - \(89\ y\^11\)\/145600 - \(445\ x\ y\^11\)\/837376 + \(1447\ \ x\^2\ y\^11\)\/249600 - \(5051\ x\^3\ y\^11\)\/1674752 + \(49477\ x\^4\ y\^11\ \)\/3494400 + \(497\ x\^5\ y\^11\)\/837376 + \(10663\ x\^6\ y\^11\)\/1747200 \ + \(471\ x\^7\ y\^11\)\/209344, \(21431\ x\)\/380416 + \(447039\ \ x\^4\)\/6857728 + \(43869\ x\ y\)\/418688 + \(47221\ x\ y\^2\)\/760832 + \ \(404383\ x\^4\ y\^2\)\/6857728 + \(1288721\ x\^4\ y\^4\)\/3428864 + \(55469\ \ x\^5\ y\^4\)\/190208 + \(x\^4\ y\^5\)\/2 + \(165475\ x\^5\ y\^5\)\/418688 + \ \(68457\ x\ y\^8\)\/760832, \(-\(22895\/1714432\)\) - \(5983\ x\)\/380416 - \ \(32097\ x\^4\)\/6857728 + \(18143\ x\^7\)\/760832 - x\^9\/512 + \(70101\ x\^10\)\/6857728 + \(1253\ x\^11\)\/760832 + \ \(23437\ y\)\/1747200 - \(43869\ x\ y\)\/418688 + \(42025\ x\^3\ y\)\/418688 \ - \(18913\ x\^4\ y\)\/349440 + \(30273\ x\^7\ y\)\/837376 + \(5731\ x\^8\ y\)\ \/174720 - \(323\ x\^10\ y\)\/20800 - \(6959\ x\^11\ y\)\/837376 - \(54023\ y\ \^2\)\/3428864 - \(26805\ x\ y\^2\)\/760832 - \(22127\ x\^2\ y\^2\)\/857216 - \ \(8755\ x\^5\ y\^2\)\/95104 + \(64619\ x\^7\ y\^2\)\/760832 + \(76397\ x\^8\ \ y\^2\)\/857216 - \(29117\ x\^10\ y\^2\)\/3428864 + \(1253\ x\^11\ \ y\^2\)\/380416 + \(4687\ y\^3\)\/873600 - \(4421\ x\ y\^3\)\/837376 + \(17\ x\ \^2\ y\^3\)\/1456 - \(43433\ x\^5\ y\^3\)\/837376 + \(22643\ x\^6\ \ y\^3\)\/349440 + \(1447\ x\^9\ y\^3\)\/209344 - \(2259\ x\^10\ y\^3\)\/83200 \ - \(233\ x\^11\ y\^3\)\/52336 - \(68953\ y\^4\)\/3428864 + \(10893\ x\ y\^4\)\ \/760832 + \(11989\ x\^3\ y\^4\)\/760832 + \(99417\ x\^4\ y\^4\)\/3428864 - \ \(943405\ x\^6\ y\^4\)\/6857728 + \(293431\ x\^8\ y\^4\)\/3428864 + \(4883\ x\ \^9\ y\^4\)\/190208 - \(79417\ x\^10\ y\^4\)\/6857728 - \(403\ x\^11\ \ y\^4\)\/380416 + \(89\ y\^5\)\/72800 - \(4265\ x\ y\^5\)\/418688 + \(2813\ \ x\^3\ y\^5\)\/52336 - \(17\ x\^4\ y\^5\)\/1365 - \(24313\ x\^10\ \ y\^5\)\/873600 - \(471\ x\^11\ y\^5\)\/104672 - \(3891\ y\^6\)\/428608 + \ \(38189\ x\ y\^6\)\/760832 + \(70059\ x\^2\ y\^6\)\/3428864 - \(147\ x\^5\ \ y\^6\)\/2048 + \(22427\ x\^6\ y\^6\)\/1714432 - \(529\ x\^9\ y\^6\)\/1521664 \ - \(3421\ x\^10\ y\^6\)\/3428864 - \(573\ x\^11\ y\^6\)\/380416 + \(89\ \ y\^7\)\/145600 + \(445\ x\ y\^7\)\/837376 - \(2453\ x\^2\ y\^7\)\/349440 - \ \(4187\ x\^5\ y\^7\)\/418688 + \(3551\ x\^6\ y\^7\)\/174720 + \(x\^9\ \ y\^7\)\/256 - \(10663\ x\^10\ y\^7\)\/1747200 - \(471\ x\^11\ \ y\^7\)\/209344}, {\(-\(7343\/867712\)\) - \(39159\ x\^2\)\/6941696 - x\^3\/512 - \(9787\ x\^4\)\/3470848 - \(47\ x\^6\)\/108464 - \ \(163249\ y\)\/7522304 + \(x\ y\)\/20480 - \(155903\ x\^2\ y\)\/3761152 - \ \(21529\ x\^4\ y\)\/1880576 + \(x\^5\ y\)\/20480 + \(x\^6\ y\)\/1024 - \ \(91887\ x\^2\ y\^2\)\/3470848 - \(3\ x\^3\ y\^2\)\/256 + \(9\ y\^3\)\/512 + \ \(341\ x\^3\ y\^3\)\/5120 - \(173763\ x\^4\ y\^3\)\/3761152 + \(514139\ \ y\^4\)\/13883392 - \(7\ x\ y\^4\)\/512 + \(55765\ x\^4\ y\^4\)\/6941696 - \(7\ \ x\^5\ y\^4\)\/512 - \(12025\ x\^6\ y\^4\)\/13883392 + \(185451\ \ y\^5\)\/7522304 + \(821\ x\ y\^5\)\/20480 + \(222181\ x\^2\ y\^5\)\/3761152 - \ \(329\ x\^3\ y\^5\)\/1280 + \(821\ x\^5\ y\^5\)\/20480 - \(21021\ x\^6\ \ y\^5\)\/3761152 - \(387627\ y\^6\)\/6941696 - \(9\ x\ y\^6\)\/256 + \(30817\ \ x\^2\ y\^6\)\/433856 + \(39\ x\^3\ y\^6\)\/256 - \(9\ x\^5\ y\^6\)\/256 - \ \(101329\ x\^6\ y\^6\)\/6941696 + \(6205\ y\^7\)\/3761152 + \(123\ x\^3\ y\^7\ \)\/1280 + \(381711\ x\^4\ y\^7\)\/3761152 - \(7\ x\ y\^8\)\/512 + \(1717\ \ x\^4\ y\^8\)\/108464 - \(7\ x\^5\ y\^8\)\/512 + \(183\ x\ y\^9\)\/5120 - \ \(8487\ x\^2\ y\^9\)\/940288 + \(183\ x\^5\ y\^9\)\/5120 + \(95809\ x\^6\ \ y\^9\)\/1880576 + \(161675\ y\^10\)\/6941696 - \(3\ x\^3\ y\^10\)\/256 + \ \(20693\ x\^6\ y\^10\)\/6941696 - \(6163\ y\^11\)\/940288 - \(137\ x\ y\^11\)\ \/10240 - \(45549\ x\^2\ y\^11\)\/1880576 - \(157\ x\^3\ y\^11\)\/5120 - \ \(111829\ x\^4\ y\^11\)\/1880576 - \(137\ x\^5\ y\^11\)\/10240 - \(57751\ \ x\^6\ y\^11\)\/1880576 - \(161675\ y\^12\)\/13883392 - \(161675\ x\^2\ \ y\^12\)\/6941696 - \(x\^3\ y\^12\)\/512 - \(37615\ x\^4\ y\^12\)\/6941696 - \ \(37615\ x\^6\ y\^12\)\/13883392, \(x\ y\^2\)\/512 - \(x\^7\ y\^2\)\/512 - \ \(x\ y\^8\)\/512 + \(x\^7\ y\^8\)\/512, 7343\/867712 - \(78329\ x\^2\)\/6941696 + x\^3\/256 + \(3019\ x\^6\)\/6941696 + x\^7\/256 + x\^8\/512 + \(47\ x\^10\)\/108464 + \(163249\ y\)\/7522304 - \(x\ y\ \)\/20480 - \(39\ x\^3\ y\)\/10240 - \(506475\ x\^4\ y\)\/7522304 - \(81\ \ x\^5\ y\)\/10240 - \(39\ x\^7\ y\)\/10240 + \(28875\ x\^8\ y\)\/1880576 - \(x\ \^9\ y\)\/20480 - \(x\^10\ y\)\/1024 + \(7343\ y\^2\)\/433856 - \(7\ x\^3\ \ y\^2\)\/512 - \(34835\ x\^4\ y\^2\)\/433856 - \(25\ x\^5\ y\^2\)\/256 - \(7\ \ x\^7\ y\^2\)\/512 + \(47\ x\^10\ y\^2\)\/54232 + \(104481\ y\^3\)\/3761152 - \ \(41\ x\ y\^3\)\/10240 + \(46563\ x\^4\ y\^3\)\/470144 + \(1401\ x\^5\ y\^3\)\ \/5120 + \(105951\ x\^6\ y\^3\)\/940288 + \(157035\ x\^8\ y\^3\)\/3761152 - \ \(41\ x\^9\ y\^3\)\/10240 - \(215907\ y\^4\)\/13883392 + \(84227\ x\^2\ \ y\^4\)\/867712 + \(2242699\ x\^4\ y\^4\)\/13883392 + \(47\ x\^5\ y\^4\)\/64 + \ \(5326855\ x\^6\ y\^4\)\/13883392 - \(24159\ x\^10\ y\^4\)\/13883392 + \ \(28325\ y\^5\)\/1880576 - \(33\ x\ y\^5\)\/2560 + \(373\ x\^3\ y\^5\)\/2560 \ + \(351717\ x\^4\ y\^5\)\/1880576 + \(373\ x\^7\ y\^5\)\/2560 + \(1961\ x\^8\ \ y\^5\)\/29384 - \(33\ x\^9\ y\^5\)\/2560 + \(11683\ x\^10\ y\^5\)\/940288 + \ \(148117\ x\^2\ y\^6\)\/3470848 - \(7\ x\^3\ y\^6\)\/512 - \(380641\ x\^4\ \ y\^6\)\/3470848 - \(25\ x\^5\ y\^6\)\/256 - \(7\ x\^7\ y\^6\)\/512 + \(7135\ \ x\^8\ y\^6\)\/3470848 + \(8461\ x\^10\ y\^6\)\/3470848 + \(6163\ \ y\^7\)\/940288 + \(137\ x\ y\^7\)\/10240 + \(12285\ x\^2\ y\^7\)\/940288 - \ \(217\ x\^5\ y\^7\)\/5120 - \(153415\ x\^6\ y\^7\)\/1880576 + \(137\ x\^9\ \ y\^7\)\/10240 + \(57751\ x\^10\ y\^7\)\/1880576 + \(161675\ y\^8\)\/13883392 \ + \(x\^3\ y\^8\)\/256 - \(409795\ x\^4\ y\^8\)\/13883392 + \(210505\ x\^6\ \ y\^8\)\/13883392 + \(x\^7\ y\^8\)\/256 + \(37615\ x\^10\ \ y\^8\)\/13883392}}\)], "Output"] }, Open ]], Cell[TextData[{ "Compute ", Cell[BoxData[ \(\[LeftDoubleBracketingBar]T\[RightDoubleBracketingBar]\^k\)]], " for various values of ", Cell[BoxData[ \(k\)]], ". Values are ", Cell[BoxData[ \(5.25, 1.3125, 1.40351, 1.24433, 1.02684, 0.809806\)]], " so uniform scheme is ", Cell[BoxData[ \(\[ScriptCapitalC]\^1\)]], "." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(matrixNorm2D[N[t], 3]\)], "Input"], Cell[BoxData[ \(1.2443293100659578`\)], "Output"] }, Open ]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Dual subdivision schemes", "Subsection"], Cell[CellGroupData[{ Cell["Dual diagrams", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{2, 2}, {2, \(-2\)}}], Line[{{0, 2}, {0, \(-2\)}}], \[IndentingNewLine]Line[{{\(-2\), 2}, {\(-2\), \(-2\)}}], Line[{{2, 2}, {\(-2\), 2}}], \[IndentingNewLine]Line[{{2, 0}, {\(-2\), 0}}], Line[{{\(-2\), \(-2\)}, {2, \(-2\)}}], \ \[IndentingNewLine]Point[{0, 0}], Point[{2, 0}], Point[{\(-2\), 0}], \[IndentingNewLine]Point[{2, 2}], Point[{0, 2}], Point[{\(-2\), 2}], \[IndentingNewLine]Point[{0, \(-2\)}], Point[{\(-2\), \(-2\)}], Point[{2, \(-2\)}], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[{{1, \(-2\)}, {1, 2}}], \[IndentingNewLine]Line[{{\(-1\), \(-2\)}, \ {\(-1\), 2}}], \[IndentingNewLine]Line[{{\(-2\), 1}, {2, 1}}], \[IndentingNewLine]Line[{{\(-2\), \(-1\)}, {2, \ \(-1\)}}], \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[{1, 1}], Point[{1, \(-1\)}], Point[{\(-1\), \(-1\)}], Point[{\(-1\), 1}]}], AspectRatio \[Rule] Automatic], With[{p0 = {0, 0}, p1 = {2, 0}, p2 = {1, \@3}}, \[IndentingNewLine]Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{p0, p1}], \[IndentingNewLine]Line[{p0, p2}], \[IndentingNewLine]Line[{p1, p2}], \[IndentingNewLine]Line[{\(p0 + p1\)\/2, \(p1 + \ p2\)\/2}], \[IndentingNewLine]Line[{\(p0 + p1\)\/2, \(p0 + p2\)\/2}], \ \[IndentingNewLine]Line[{\(p0 + p2\)\/2, \(p1 + p2\)\/2}], \ \[IndentingNewLine]Point[p0], Point[p1], Point[p2], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[{\(4 p0 + p1 + p2\)\/6, \(p0 + p1 + p2\)\/3}], \ \[IndentingNewLine]Line[{\(p0 + 4 p1 + p2\)\/6, \(p0 + p1 + p2\)\/3}], \ \[IndentingNewLine]Line[{\(p0 + p1 + 4 p2\)\/6, \(p0 + p1 + p2\)\/3}], \ \[IndentingNewLine]Line[{\(3 p0 + p1\)\/4, \(4 p0 + p1 + p2\)\/6}], Line[{\(3 p0 + p2\)\/4, \(4 p0 + p1 + p2\)\/6}], \ \[IndentingNewLine]Line[{\(3 p1 + p0\)\/4, \(p0 + 4 p1 + p2\)\/6}], Line[{\(3 p1 + p2\)\/4, \(p0 + 4 p1 + p2\)\/6}], \ \[IndentingNewLine]Line[{\(3 p2 + p1\)\/4, \(p0 + p1 + 4 p2\)\/6}], Line[{\(3 p2 + p0\)\/4, \(p0 + p1 + 4 p2\)\/6}], \ \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[\(p0 + p1 + p2\)\/3], \ \[IndentingNewLine]Point[\(4 p0 + p1 + p2\)\/6], Point[\(p0 + 4 p1 + p2\)\/6], Point[\(p0 + p1 + 4 p2\)\/6]}], AspectRatio \[Rule] Automatic]]}]]\)], "Input", CellTags->"FIG dual meshes"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{2, 2}, {2, \(-2\)}}], \[IndentingNewLine]Line[{{\(-2\), 2}, {\(-2\), \(-2\)}}], Line[{{2, 2}, {\(-2\), 2}}], Line[{{\(-2\), \(-2\)}, {2, \(-2\)}}], \ \[IndentingNewLine]Dashing[{0.05}], \[IndentingNewLine]Line[{{2, 0}, {\(-2\), 0}}], \[IndentingNewLine]Line[{{0, \(-2\)}, {0, 2}}], \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[{0, 0}]}], AspectRatio \[Rule] Automatic], \[IndentingNewLine]Show[ Graphics[{Thickness[0.01], PointSize[ 0.04], \[IndentingNewLine]Line[{{2, 2}, {2, \(-2\)}}], Line[{{0, 2}, {0, \(-2\)}}], \[IndentingNewLine]Line[{{\(-2\), 2}, {\(-2\), \(-2\)}}], Line[{{2, 2}, {\(-2\), 2}}], \[IndentingNewLine]Line[{{2, 0}, {\(-2\), 0}}], Line[{{\(-2\), \(-2\)}, {2, \(-2\)}}], \ \[IndentingNewLine]Dashing[{0.05}], \[IndentingNewLine]Line[{{1, \(-2\)}, {1, 2}}], \[IndentingNewLine]Line[{{\(-1\), \(-2\)}, \ {\(-1\), 2}}], \[IndentingNewLine]Line[{{\(-2\), 1}, {2, 1}}], \[IndentingNewLine]Line[{{\(-2\), \(-1\)}, {2, \ \(-1\)}}], \[IndentingNewLine]GrayLevel[ 0.75], \[IndentingNewLine]Point[{1, 1}], Point[{1, \(-1\)}], Point[{\(-1\), \(-1\)}], Point[{\(-1\), 1}]}], AspectRatio \[Rule] Automatic]}]]\)], "Input", CellTags->"FIG dual quad subdivision"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ \(Show[ GraphicsArray[{\[IndentingNewLine]Show[ Graphics[{\[IndentingNewLine]Thickness[0.01], PointSize[0.04], \[IndentingNewLine]Line[ Table[{Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\(2 \ \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], \[IndentingNewLine]Map[Point, Table[{Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\(2 \ \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], \[IndentingNewLine]Text[\(2 n + 1\)\/\(4 n\), \ {1, 0}, {\(-1.5\), 0}], \[IndentingNewLine]Text[\(n + 2\)\/\(8 n\), {1\/2, \ \@3\/2}, {\(-1.5\), 0}], \[IndentingNewLine]Text[ 1\/\(4 n\), {\(-1\)\/2, \@3\/2}, {1.5, 0}], \[IndentingNewLine]Text[ 1\/\(4 n\), {\(-1\), 0}, {1.5, 0}], \[IndentingNewLine]Text[ 1\/\(4 n\), {\(-1\)\/2, \(-\(\@3\/2\)\)}, {1.5, 0}], \[IndentingNewLine]Text[\(n + 2\)\/\(8 n\), {1\/2, \ \(-\(\@3\/2\)\)}, {\(-1.5\), 0}], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[ Table[\(2\/3\) {Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\ \(2 \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], GrayLevel[0.75], Point[{2\/3, 0}]}\[IndentingNewLine]], AspectRatio \[Rule] 1, TextStyle \[Rule] {FontSize \[Rule] 12}, PlotRange \[Rule] {{\(-2\), 2}, {\(-1.5\), 1.5}}], \[IndentingNewLine]Show[ Graphics[{\[IndentingNewLine]Thickness[0.01], PointSize[0.04], \[IndentingNewLine]Line[ Table[{Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\(2 \ \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], \[IndentingNewLine]Map[Point, Table[{Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\(2 \ \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], \[IndentingNewLine]Text[ w[0], {1, 0}, {\(-1.5\), 0}], \[IndentingNewLine]Text[ w[1], {1\/2, \@3\/2}, {\(-1.5\), 0}], \[IndentingNewLine]Text[ w[2], {\(-1\)\/2, \@3\/2}, {1.5, 0}], \[IndentingNewLine]Text[ w[\[Ellipsis]], {\(-1\), 0}, {1.5, 0}], \[IndentingNewLine]Text[ HoldForm[w[n - 2]], {\(-1\)\/2, \(-\(\@3\/2\)\)}, {1.5, 0}], \[IndentingNewLine]Text[ HoldForm[w[n - 1]], {1\/2, \(-\(\@3\/2\)\)}, {\(-1.5\), 0}], \[IndentingNewLine]Dashing[{0.05}], \ \[IndentingNewLine]Line[ Table[\(2\/3\) {Sin[\(2 \[Pi]\ i\)\/6 + \[Pi]\/6], \(-Cos[\ \(2 \[Pi]\ i\)\/6 + \[Pi]\/6]\)}, {i, 0, 6}]], GrayLevel[0.75], Point[{2\/3, 0}]}\[IndentingNewLine]], AspectRatio \[Rule] 1, TextStyle \[Rule] {FontSize \[Rule] 12}, PlotRange \[Rule] {{\(-2\), 2}, {\(-1.5\), 1.5}}]\[IndentingNewLine]}]]\)], "Input"], Cell[BoxData[ TagBox[\(\[SkeletonIndicator] GraphicsArray \[SkeletonIndicator]\), False, Editable->False]], "Output"] }, Open ]] }, Closed]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Extra: An interactive surface subdivider in Mathematica", "Section"], Cell[TextData[{ "The buttons above control an interactive subdivider written in ", StyleBox["Mathematica", FontSlant->"Italic"], ". Click on the arrow buttons to rotate the object in 3D. The code for \ this application is embedded in the definitions of the buttons and definition \ of the function ", Cell[BoxData[ \(dispMesh\)]], " given below." }], "Text"], Cell[BoxData[Cell[GraphicsData["PostScript", "\<\ %! %%Creator: Mathematica %%AspectRatio: 1 MathPictureStart /Mabs { Mgmatrix idtransform Mtmatrix dtransform } bind def /Mabsadd { Mabs 3 -1 roll add 3 1 roll add exch } bind def %% Graphics3D %%IncludeResource: font Courier %%IncludeFont: Courier /Courier findfont 10 scalefont setfont % Scaling calculations 0 1 0 1 [ [ 0 0 0 0 ] [ 1 1 0 0 ] ] MathScale % Start of Graphics 1 setlinecap 1 setlinejoin newpath 0 0 m 1 0 L 1 1 L 0 1 L closepath clip newpath .5 Mabswid [ ] 0 setdash .868 .56871 m .37984 .70061 L .37289 .83772 L p .569 .317 0 r F P 0 g s .37984 .70061 m .13132 .34885 L .10591 .48792 L p .975 .696 0 r F P 0 g s .10591 .48792 m .37289 .83772 L .37984 .70061 L p .975 .696 0 r F P 0 g s .40077 .6648 m .37984 .70061 L .868 .56871 L p .675 .724 0 r F P 0 g s .37984 .70061 m .40077 .6648 L .19855 .36892 L p .675 .724 0 r F P 0 g s .19855 .36892 m .13132 .34885 L .37984 .70061 L p .675 .724 0 r F P 0 g s .868 .56871 m .81198 .55199 L .40077 .6648 L p .675 .724 0 r F P 0 g s .37289 .83772 m .89081 .70741 L .868 .56871 L p .569 .317 0 r F P 0 g s .40077 .6648 m .81198 .55199 L .83148 .69082 L p .565 .309 0 r F P 0 g s .83148 .69082 m .39492 .80244 L .40077 .6648 L p .565 .309 0 r F P 0 g s .19855 .36892 m .40077 .6648 L .39492 .80244 L p .978 .694 0 r F P 0 g s .89081 .70741 m .37289 .83772 L .39492 .80244 L p .666 .738 0 r F P 0 g s .37289 .83772 m .10591 .48792 L .17797 .50807 L p .666 .738 0 r F P 0 g s .17797 .50807 m .39492 .80244 L .37289 .83772 L p .666 .738 0 r F P 0 g s .81198 .55199 m .868 .56871 L .69381 .16339 L p .675 .724 0 r F P 0 g s .69381 .16339 m .868 .56871 L .89081 .70741 L p .899 .585 0 r F P 0 g s .81198 .55199 m .66125 .21911 L .67303 .35704 L p .92 .606 0 r F P 0 g s .67303 .35704 m .83148 .69082 L .81198 .55199 L p .92 .606 0 r F P 0 g s .69381 .16339 m .66125 .21911 L .81198 .55199 L p .675 .724 0 r F P 0 g s .39492 .80244 m .17797 .50807 L .19855 .36892 L p .978 .694 0 r F P 0 g s .39492 .80244 m .83148 .69082 L .89081 .70741 L p .666 .738 0 r F P 0 g s .89081 .70741 m .70832 .30052 L .69381 .16339 L p .899 .585 0 r F P 0 g s .70832 .30052 m .89081 .70741 L .83148 .69082 L p .666 .738 0 r F P 0 g s .83148 .69082 m .67303 .35704 L .70832 .30052 L p .666 .738 0 r F P 0 g s .66125 .21911 m .19855 .36892 L .17797 .50807 L p .499 .203 0 r F P 0 g s .13132 .34885 m .19855 .36892 L .66125 .21911 L p .675 .724 0 r F P 0 g s .10591 .48792 m .13132 .34885 L .3528 .3079 L p .489 .189 0 r F P 0 g s .66125 .21911 m .69381 .16339 L .13132 .34885 L p .675 .724 0 r F P 0 g s .13132 .34885 m .69381 .16339 L .44799 .27693 L p .489 .189 0 r F P 0 g s .44799 .27693 m .3528 .3079 L .13132 .34885 L p .489 .189 0 r F P 0 g s .3528 .3079 m .34765 .37711 L .10591 .48792 L p .489 .189 0 r F P 0 g s .34765 .37711 m .3528 .3079 L .26331 .21523 L p .885 .544 .399 r F P 0 g s .45538 .14949 m .26331 .21523 L .3528 .3079 L p .655 .608 .789 r F P 0 g s .3528 .3079 m .44799 .27693 L .45538 .14949 L p .655 .608 .789 r F P 0 g s .17797 .50807 m .67303 .35704 L .66125 .21911 L p .499 .203 0 r F P 0 g s .44799 .27693 m .69381 .16339 L .70832 .30052 L p .489 .189 0 r F P 0 g s .70832 .30052 m .44615 .34599 L .44799 .27693 L p .489 .189 0 r F P 0 g s .45202 .28639 m .45538 .14949 L .44799 .27693 L p 0 0 .006 r F P 0 g s .44799 .27693 m .44615 .34599 L .45202 .28639 L p 0 0 .006 r F P 0 g s .26331 .21523 m .45538 .14949 L .45202 .28639 L p .467 .155 .353 r F P 0 g s .26331 .21523 m .24599 .35311 L .34765 .37711 L p .885 .544 .399 r F P 0 g s .45202 .28639 m .24599 .35311 L .26331 .21523 L p .467 .155 .353 r F P 0 g s .67303 .35704 m .17797 .50807 L .10591 .48792 L p .666 .738 0 r F P 0 g s .70832 .30052 m .10591 .48792 L .34765 .37711 L p .489 .189 0 r F P 0 g s .10591 .48792 m .70832 .30052 L .67303 .35704 L p .666 .738 0 r F P 0 g s .44615 .34599 m .34765 .37711 L .24599 .35311 L p .623 .875 .989 r F P 0 g s .34765 .37711 m .44615 .34599 L .70832 .30052 L p .489 .189 0 r F P 0 g s .24599 .35311 m .45202 .28639 L .44615 .34599 L p .623 .875 .989 r F P 0 g s % End of Graphics MathPictureEnd \ \>"], "Graphics", ShowSelection->False, ImageSize->{432, 432}, ImageMargins->{{0, 0}, {0, 0}}, ImageRegion->{{0, 1}, {0, 1}}, ImageCache->GraphicsData["Bitmap", "\<\ CF5dJ6E]HGAYHf4PAg9QL6QYHg/0003o00300000o`<0000000<0MbMJ000000000?l0jP000?l00;d0003o0`00000407LWFP03 000000000?l0003o0>T0003o002j0000o`<000001`1g9eX00`000000003o0000o`3Y0000o`00]`00 0?l3000000X0MbMJ00<000000000o`000?l0j@000?l00;@0003o0`00000=07LWFP03000000000?l0 003o0>T0003o002a0000o`<00000401g9eX00`000000003o0000o`1S0000o`800000Q0000?l00:h0 003o0`00000C07LWFP03000000000?l0003o0600003o0`0000000`1m<00000000000o`230000o`00 Z`000?l3000001H0MbMJ00<000000000o`000?l0G@000?l4000000<0OC000P0000230000o`00Z000 0?l3000001T0MbMJ00<000000000o`000?l0FP000?l5000000D0OC0000<000000>JE00000?l0PP00 0?l00:D0003o0`00000L07LWFP03000000000?l0003o05L0003o0`0000000`1m<000000000000007 07d`00030000003VU@0000000880003o002R0000o`<000007`1g9eX00`000000003o0000o`1D0000 o`<000000P1m<002000000X0OC000P0000220000o`00W`000?l300000280MbMJ00<000000000o`00 0?l0D@000?l300000080OC000`00000<07d`00030000003VU@0000000840003o002L0000o`<00000 9@1g9eX00`000000003o0000o`1>0000o`<000000`1m<002000000l0OC0000<000000>JE00000000 P@000?l009X0003o0P00000X07LWFP03000000000?l0003o04/0003o0`00000407d`008000004@1m <0000`000000iYD0000000210000o`00U`000?l3000002T0MbMJ00<000000000o`000?l0B@000?l3 000000D0OC000P00000C07d`00040000003VU@00iYD000000800003o002D0000o`<00000;01g9eX0 0`000000003o0000o`160000o`<000001P1m<002000001D0OC0000@000000>JE003VU@000000P000 0?l00940003o0`00000_07LWFP03000000000?l0003o04<0003o0`00000707d`008000005`1m<000 1@000000iYD00>JE003VU@00000007l0003o002>0000o`<00000JE003VU@00iYD00000001o0000o`00R`000?l3 000003D0MbMJ00<000000000o`000?l0?0000?l4000000P0OC000P00000L07d`00030000003VU@00 iYD00080iYD000<000000000o`000?l0O0000?l008P0003o0`00000h07LWFP03000000000?l0003o 03T0003o0`00000:07d`008000007P1m<0000`000000iYD00>JE00020>JE0003000000000?l0003o 07`0003o00250000o`<00000>`1g9eX00`000000003o0000o`0f0000o`<000002`1m<00200000240 OC0000D000000>JE003VU@00iYD00000001n0000o`00PP000?l3000003h0MbMJ00<000000000o`00 0?l0<`000?l3000000`0OC000P00000S07d`00030000003VU@00iYD00080iYD000<000000000o`00 0?l0N`000?l007l0003o0`00001107LWFP03000000000?l0003o0300003o0`00000=07d`00800000 9@1m<0000`000000iYD00>JE00020>JE0003000000000?l0003o07/0003o001l0000o`<00000A01g 9eX00`000000003o0000o`0]0000o`<000003@1m<003000002L0OC0000<000000>JE003VU@000`3V U@000`000000003o0000o`1j0000o`00N@000?l3000004L0MbMJ00<000000000o`000?l0:P000?l3 000000h0OC000P00000Z07d`00030000003VU@00iYD000<0iYD000<000000000o`000?l0NP000?l0 07H0003o0`00001:07LWFP03000000000?l0003o02L0003o0`00000?07d`00800000;01m<0000`00 0000iYD00>JE00040>JE0003000000000?l0003o07T0003o001c0000o`<00000C@1g9eX00`000000 003o0000o`0T0000o`<00000401m<002000002h0OC0000<000000>JE003VU@00103VU@000`000000 003o0000o`1i0000o`00L@000?l200000500MbMJ00<000000000o`000?l08@000?l300000140OC00 0P00000`07d`00030000003VU@00iYD000@0iYD000<000000000o`000?l0N@000?l00740003o00<0 000007LWFP1g9eX0C`1g9eX00`000000003o0000o`0N0000o`<000004P1m<00200000380OC0000<0 00000>JE003VU@001@3VU@000`000000003o0000o`1h0000o`00L@000?l00`000000MbMJ07LWFP1? 07LWFP03000000000?l0003o01/0003o0`00000C07d`00800000=01m<0000`000000iYD00>JE0005 0>JE0003000000000?l0003o07P0003o001a0000o`030000001g9eX0MbMJ04l0MbMJ00<000000000 o`000?l060000?l3000001<0OC000`00000g07d`00030000003VU@00iYD000D0iYD000<000000000 o`000?l0M`000?l00740003o00<0000007LWFP1g9eX0C`1g9eX00`000000003o0000o`0E0000o`<0 0000501m<002000003X0OC0000<000000>JE003VU@001@3VU@000`000000003o0000o`1g0000o`00 L0000?l00`000000MbMJ07LWFP1@07LWFP03000000000?l0003o0180003o0`00000E07d`00800000 ?01m<0000`000000iYD00>JE00060>JE0003000000000?l0003o07H0003o001`0000o`030000001g 9eX0MbMJ0500MbMJ00<000000000o`000?l03`000?l3000001H0OC000P00000n07d`00030000003V U@00iYD000H0iYD000<000000000o`000?l0MP000?l00700003o00<0000007LWFP1g9eX0D01g9eX0 0`000000003o0000o`0<0000o`<000005`1m<00200000400OC0000<000000>JE003VU@001P3VU@00 0`000000003o0000o`1f0000o`00L0000?l00`000000MbMJ07LWFP1@07LWFP03000000000?l0003o 00T0003o0`00000H07d`00800000@P1m<0000`000000iYD00>JE00070>JE0003000000000?l0003o 07D0003o001`0000o`030000001g9eX0MbMJ0500MbMJ00<000000000o`000?l01P000?l3000001P0 OC000`00001407d`00030000003VU@00iYD000L0iYD000<000000000o`000?l0M@000?l00700003o 00<0000007LWFP1g9eX0D01g9eX00`000000003o0000o`030000o`<000006@1m<002000004L0OC00 00<000000>JE003VU@00203VU@000`000000003o0000o`1d0000o`00L0000?l00`000000MbMJ07LW FP1@07LWFP03000000000?l0003o00<000006P1m<002000004T0OC0000<000000>JE003VU@00203V U@000`000000003o0000o`1d0000o`00L0000?l00`000000MbMJ07LWFP1@07LWFP<000006`1m<002 000004/0OC0000<000000>JE003VU@002@3VU@000`000000003o0000o`1c0000o`00K`000?l00`00 0000MbMJ07LWFP1A07LWFP030000001m<000OC0001T0OC000P00001>07d`00030000003VU@00iYD0 00P0iYD000<000000000o`000?l0L`000?l006l0003o00<0000007LWFP1g9eX0D@1g9eX00`000000 OC0007d`000G07d`00800000D01m<0000`000000iYD00>JE00080>JE0003000000000?l0003o07<0 003o001_0000o`030000001g9eX0MbMJ0540MbMJ00<0000007d`001m<000501m<00300000580OC00 00<000000>JE003VU@002@3VU@000`000000003o0000o`1b0000o`00K`000?l00`000000MbMJ07LW FP1A07LWFP030000001m<000OC000180OC000P00001E07d`00030000003VU@00iYD000T0iYD000<0 00000000o`000?l0LP000?l006l0003o00<0000007LWFP1g9eX0D01g9eX00`000000OC0007d`000A 07d`00800000E`1m<0000`000000iYD00>JE000:0>JE0003000000000?l0003o0740003o001_0000 o`030000001g9eX0MbMJ0500MbMJ00<0000007d`001m<0003`1m<002000005T0OC0000<000000>JE 003VU@002P3VU@000`000000003o0000o`1a0000o`00K`000?l00`000000MbMJ07LWFP1@07LWFP03 0000001m<000OC0000d0OC000P00001K07d`00030000003VU@00iYD000/0iYD000<000000000o`00 0?l0L0000?l006l0003o00<0000007LWFP1g9eX0D01g9eX00`000000OC0007d`000;07d`00800000 G@1m<0000`000000iYD00>JE000;0>JE0003000000000?l0003o0700003o001_0000o`030000001g 9eX0MbMJ0500MbMJ00<0000007d`001m<000201m<003000005l0OC0000<000000>JE003VU@002`3V U@000`000000003o0000o`1`0000o`00KP000?l00`000000MbMJ07LWFP1A07LWFP030000001m<000 OC0000H0OC000P00001R07d`00030000003VU@00iYD000`0iYD000<000000000o`000?l0K`000?l0 06h0003o00<0000007LWFP1g9eX0D@1g9eX00`000000OC0007d`000407d`00800000I@1m<0000`00 0000iYD00>JE000;0>JE0003000000000?l0003o06l0003o001^0000o`030000001g9eX0MbMJ0540 MbMJ00<0000007d`001m<0000P1m<002000006L0OC0000<000000>JE003VU@00303VU@000`000000 003o0000o`1^0000o`00KP000?l00`000000MbMJ07LWFP1A07LWFP030000001m<000OC0000800000 J@1m<0000`000000iYD00>JE000<0>JE0003000000000?l0003o06h0003o001^0000o`030000001g 9eX0MbMJ0540MbMJ0`00001[07d`00030000003VU@00iYD000d0iYD000<000000000o`000?l0K@00 0?l006h0003o00<0000007LWFP1g9eX0D@1g9eX00`000000OC0007d`001[07d`00030000003VU@00 iYD000d0iYD000<000000000o`000?l0K@000?l006h0003o00<0000007LWFP1g9eX0D@1g9eX00`00 0000OC0007d`001[07d`00030000003VU@00iYD000d0iYD000<000000000o`000?l0K@000?l006h0 003o00<0000007LWFP1g9eX0D@1g9eX00`000000OC0007d`001[07d`00030000003VU@00iYD000h0 iYD000<000000000o`000?l0K0000?l006d0003o00<0000007LWFP1g9eX0DP1g9eX00`000000OC00 07d`001[07d`00030000003VU@00iYD000h0iYD000<000000000o`000?l0K0000?l006d0003o00<0 000007LWFP1g9eX0D@1g9eX2000006d0OC0000<000000>JE003VU@003`3VU@000`000000003o0000 o`1[0000o`00K@000?l00`000000MbMJ07LWFP1>07LWFP<0000000<0Wmom0000001m<000K01m<000 0`000000iYD00>JE000?0>JE0003000000000?l0003o06/0003o001]0000o`030000001g9eX0MbMJ 04/0MbMJ0`00000409oOo@030000001m<000OC0006`0OC0000<000000>JE003VU@003`3VU@000`00 0000003o0000o`1Z0000o`00K@000?l00`000000MbMJ07LWFP1807LWFP<000001`2Ogod00`000000 OC0007d`001/07d`00030000003VU@00iYD000l0iYD000<000000000o`000?l0JP000?l006d0003o 00<0000007LWFP1g9eX0A@1g9eX3000000X0Wmom00<0000007d`001m<000K01m<0000`000000iYD0 0>JE000?0>JE0003000000000?l0003o06X0003o001]0000o`030000001g9eX0MbMJ0480MbMJ0`00 000=09oOo@030000001m<000OC0006`0OC0000<000000>JE003VU@00403VU@000`000000003o0000 o`1Y0000o`00K@000?l00`000000MbMJ07LWFP0o07LWFP<00000402Ogod00`000000OC0007d`001Z 07d`00<000004P3VU@000`000000003o0000o`1Y0000o`00K@000?l00`000000MbMJ07LWFP0l07LW FP<000004P2Ogod00`000000OC0007d`001U07d`00P0000000<0Z[`00>JE003VU@004@3VU@000`00 0000003o0000o`1X0000o`00K0000?l00`000000MbMJ07LWFP0j07LWFP<000005@2Ogod00`000000 OC0007d`001O07d`00X000000`2Z_0000`000000Z[`00000000B0>JE0003000000000?l0003o06P0 003o001/0000o`030000001g9eX0MbMJ03L0MbMJ0`00000H09oOo@030000001m<000OC0005X0OC00 1@00000307d`00<000001P2Z_00010000000Z[`00:Zl0000000C0>JE0003000000000?l0003o06L0 003o001[0000o`800000=P1g9eX3000001/0Wmom00<0000007d`001m<000E01m<006000000D0OC00 0`0000080:Zl00030000002Z_000Z[`00080Z[`000<000000>JE003VU@00403VU@000`000000003o 0000o`1W0000o`00J0000?l30000000307d`00000000MbMJ0380MbMJ0`00000N09oOo@030000001m <000OC0004h0OC001P00000807d`00<000002`2Z_0000`000000Z[`00:Zl00020:Zl00030000003V U@00iYD00100iYD000<000000000o`000?l0I`000?l006D0003o0`00000407d`00030000001g9eX0 MbMJ02h0MbMJ0`00000Q09oOo@030000001m<000OC0004T0OC001@00000;07d`00<000003@2Z_000 0`000000Z[`00:Zl00040:Zl00030000003VU@00iYD00100iYD000<000000000o`000?l0IP000?l0 0680003o0`00000707d`00030000001g9eX0MbMJ02/0MbMJ0`00000T09oOo@030000001m<000OC00 04<0OC001P00000<07d`00@00000402Z_0000`000000Z[`00:Zl00040:Zl00030000003VU@00iYD0 0100iYD000<000000000o`000?l0IP000?l005h0003o1000000:07d`00030000001g9eX0MbMJ02P0 MbMJ0`00000W09oOo@030000001m<000OC0003d0OC001P00000?07d`00<000004`2Z_0000`000000 Z[`00:Zl00060:Zl00030000003VU@00iYD00100iYD000<000000000o`000?l0I@000?l005/0003o 0`00000>07d`00030000001g9eX0MbMJ02@0MbMJ1000000Z09oOo@030000001m<000OC0003P0OC00 1@00000B07d`00<000005@2Z_0000`000000Z[`00:Zl00070:Zl00030000003VU@00iYD00100iYD0 00<000000000o`000?l0I@000?l005P0003o0`00000A07d`00030000001g9eX0MbMJ0240MbMJ0`00 000^09oOo@030000001m<000OC000380OC001P00000D07d`00<00000602Z_0000`000000Z[`00:Zl 00070:Zl00030000003VU@00iYD00140iYD000<000000000o`000?l0I0000?l005D0003o0`00000C 07d`00030000001g9eX0MbMJ01l0MbMJ0`00000a09oOo@030000001m<000OC0002d0OC001@