Skip to content

salvipeter/qgb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quadratic GB patch

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:

  1. Call constructor QGB(size_t) with the number of sides
  2. Set all boundary curves with void setBoundary(size_t, const QGB::Boundary &)
  3. Set midpoint with either void setMidpoint(const Point3D &) or void resetMidpoint()
  4. Evaluate at a given parameter with Point3D eval(const Point2D &) or at a given resolution with TriMesh eval(size_t)

About

Quadratic GB patch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published