<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <!-- Scopes/Paths.html --> <!-- this view was generated by Scope --> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"/> <title >Synopsis - Paths</title> <link href="../style.css" type="text/css" rel="stylesheet" /> </head> <body class="Scope"> <div class="navigation"> <span class="normal"><a href="global.html" >Global Namespace</a></span> <span class="normal"><a href="../InheritanceTree.html" >Inheritance Tree</a></span> <span class="normal"><a href="../InheritanceGraph.html" >Inheritance Graph</a></span> <span class="normal"><a href="../NameIndex.html" >Name Index</a></span> </div> <!-- this part was generated by Heading --> <h1 >Namespace Paths </h1> <div class="doc"></div> <!-- this part was generated by Summary --> <div class="summary"> <div class="heading">Class templates Summary:</div> <div class="item"><div class="synopsis"><div class="template">template <size_t <span class="variable">Order</span>></div> class <a href="Paths/Bezier.html" >Bezier</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc"> The Bezier class.</div></div> <div class="item"><div class="synopsis"><div class="template">template <size_t <span class="variable">Order</span>></div> class <a href="Paths/Nurbs.html" >Nurbs</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc"><p>The Nurbs class.</p> </div></div> </div><!-- summary --> <div class="summary"> <div class="heading">Classes Summary:</div> <div class="item"><div class="synopsis">class <a href="Paths/Polyline.html" >Polyline</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc">The Polyline class.</div></div> </div><!-- summary --> <!-- this part was generated by Detail --> <div class="detail"> <div class="heading">Class templates Details:</div> <div class="item"><div class="synopsis"><div class="template">template <size_t <span class="variable">Order</span>></div> class <a href="Paths/Bezier.html" >Bezier</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc"> The Bezier class. It implements a Bezier curve for the given order.</div></div> <div class="item"><div class="synopsis"><div class="template">template <size_t <span class="variable">Order</span>></div> class <a href="Paths/Nurbs.html" >Nurbs</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc"><p>The Nurbs class. It implements a nurbs curve for the given order. It is a very powerful and flexible curve representation. For simpler cases you may prefer to use a <a class="reference" href="Paths/Bezier.html">Bezier</a> curve.</p> <p>While non-rational curves are not sufficient to represent a circle, this is one of many sets of NURBS control points for an almost uniformly parameterized circle:</p> <table border="1" class="docutils"> <colgroup> <col width="11%" /> <col width="21%" /> <col width="68%" /> </colgroup> <thead valign="bottom"> <tr><th class="head">x</th> <th class="head">y</th> <th class="head">weight</th> </tr> </thead> <tbody valign="top"> <tr><td>1</td> <td>0</td> <td>1</td> </tr> <tr><td>1</td> <td>1</td> <td><em>sqrt(2)/2</em></td> </tr> <tr><td>0</td> <td>1</td> <td>1</td> </tr> <tr><td>-1</td> <td>1</td> <td><em>sqrt(2)/2</em></td> </tr> <tr><td>-1</td> <td>0</td> <td>1</td> </tr> <tr><td>-1</td> <td>-1</td> <td><em>sqrt(2)/2</em></td> </tr> <tr><td>0</td> <td>-1</td> <td>1</td> </tr> <tr><td>1</td> <td>-1</td> <td><em>sqrt(2)/2</em></td> </tr> <tr><td>1</td> <td>0</td> <td>1</td> </tr> </tbody> </table> <p>The order is three, the knot vector is {0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4}. It should be noted that the circle is composed of four quarter circles, tied together with double knots. Although double knots in a third order NURBS curve would normally result in loss of continuity in the first derivative, the control points are positioned in such a way that the first derivative is continuous. (From <a class="reference" href="http://en.wikipedia.org/wiki/NURBS">Wikipedia</a> )</p> <p>Example:</p> <pre class="literal-block"> Nurbs<3> circle; circle.insert_control_point(0, Vertex(1., 0.), 1.); circle.insert_control_point(0, Vertex(1., 1.), sqrt(2.)/2.); ... </pre> </div></div> </div><!-- detail --> <div class="detail"> <div class="heading">Classes Details:</div> <div class="item"><div class="synopsis">class <a href="Paths/Polyline.html" >Polyline</a></div> <div class="xref"></div> <div class="source"></div> <div class="doc">The Polyline class. It is an ordered set of connected line segments.</div></div> </div><!-- detail --> <div class="logo">Generated on Fri Apr 17 08:48:05 2009 by <br/> <a href="http://synopsis.fresco.org" target="_blank"><img src="../synopsis.png" alt="logo"/> synopsis</a> (version devel)</div> </body> </html>