C0 GB patch with quadratic Bézier boundary curves and a settable midpoint. Note that there is no midpoint control for triangular patches.
Uses a regular domain; for four-sided surfaces it is the same as a quadratic tensor-product Bézier patch; for three-sided surfaces it is (probably?) the same as a triangular quadratic Bézier patch.
The example program reads files of the following format:
<# of sides>
<1st side 1st CP>
<1st side 2nd CP>
<1st side 3rd CP>
<2st side 1st CP = 1st side 3rd CP>
<2st side 2nd CP>
...
<nth side 3rd CP = 1st side 1st CP>
[central CP]
(cf. test.qgb)
The default position of the central CP is the mass center of the 2nd control points.
As a library it should be used as follows:
- Call constructor
QGB(size_t)with the number of sides - Set all boundary curves with
void setBoundary(size_t, const QGB::Boundary &) - Set midpoint with either
void setMidpoint(const Point3D &)orvoid resetMidpoint() - Evaluate at a given parameter with
Point3D eval(const Point2D &)or at a given resolution withTriMesh eval(size_t)