vpbezier

package
v0.0.0-...-bf055c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package vpbezier contains Bezier curves tools.

Index

Constants

View Source
const PackageCopyright = "Copyright (C)  2015, 2016  Christian Mauduit <ufoot@ufoot.org>" // PackageCopyright set by version.sh

PackageCopyright contains a short copyright notice.

View Source
const PackageEmail = "ufoot@ufoot.org" // PackageEmail set by version.sh

PackageEmail contains a contact email for the package.

View Source
const PackageLicense = "GNU GPL v3" // PackageLicense set by version.sh

PackageLicense contains a short license information.

View Source
const PackageName = "Vapor Toolkit" // PackageName set by version.sh

PackageName contains a readable name of the package, suitable for display.

View Source
const PackageTarname = "vapor" // PackageTarname set by version.sh

PackageTarname contains a short name of the package, suitable for a filename.

View Source
const PackageURL = "https://github.com/ufoot/vapor" // PackageURL set by version.sh

PackageURL contains the address of the project homepage.

View Source
const VersionMajor = 0 // VersionMajor set by version.sh

VersionMajor is the project major version.

View Source
const VersionMinor = 3 // VersionMinor set by version.sh

VersionMinor is the project minor version.

View Source
const VersionStamp = "c6a4298" // VersionStamp set by version.sh

VersionStamp is the project stamp, possibly changes for each build.

Variables

This section is empty.

Functions

func F32Bernstein

func F32Bernstein(n, i int, t float32) float32

F32Bernstein returns a Berstein polynomial value.

func F32BernsteinDerivative

func F32BernsteinDerivative(n, i int, t float32) float32

F32BernsteinDerivative returns the derivative of the the Berstein polynomial func at a given point.

func F32CubicCurve1d

func F32CubicCurve1d(p0, p1, p2, p3 float32, t float32) (float32, float32)

F32CubicCurve1d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 scalars. First returned value is the position, second is the derivative.

func F32CubicCurve2d

func F32CubicCurve2d(p0, p1, p2, p3 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)

F32CubicCurve2d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 2d vectors. First returned value is the position, second is the derivative.

func F32CubicCurve3d

func F32CubicCurve3d(p0, p1, p2, p3 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)

F32CubicCurve3d returns the cubic Bezier curve from p0 to p3, going through p1 and p2. Points p1 and p2 are typically not reached, but they influence the curve, as it heads to p1 from p0, and conversely from p3 to p2. Works on float32 3d vectors. First returned value is the position, second is the derivative.

func F32CubicSurface1d

func F32CubicSurface1d(p [4][4]float32, u float32, v float32) (float32, float32, float32)

F32CubicSurface1d returns a quadratic Bezier surface between 9 points.

func F32CubicSurface2d

func F32CubicSurface2d(p *[4][4]vpvec2.F32, u float32, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)

F32CubicSurface2d returns a quadratic Bezier surface between 9 points.

func F32CubicSurface3d

func F32CubicSurface3d(p *[4][4]vpvec3.F32, u float32, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)

F32CubicSurface3d returns a quadratic Bezier surface between 9 points.

func F32LinearCurve1d

func F32LinearCurve1d(p0, p1 float32, t float32) (float32, float32)

F32LinearCurve1d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 scalars. First returned value is the position, second is the derivative.

func F32LinearCurve2d

func F32LinearCurve2d(p0, p1 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)

F32LinearCurve2d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 2d vectors. First returned value is the position, second is the derivative.

func F32LinearCurve3d

func F32LinearCurve3d(p0, p1 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)

F32LinearCurve3d returns the linear Bezier curve from p0 to p1, which is basically a Lerp. Works on float32 3d vectors. First returned value is the position, second is the derivative.

func F32LinearSurface1d

func F32LinearSurface1d(p [2][2]float32, u, v float32) (float32, float32, float32)

F32LinearSurface1d returns the linear Bezier surface between 4 points.

func F32LinearSurface2d

func F32LinearSurface2d(p *[2][2]vpvec2.F32, u, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)

F32LinearSurface2d returns the linear Bezier surface between 4 points.

func F32LinearSurface3d

func F32LinearSurface3d(p *[2][2]vpvec3.F32, u, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)

F32LinearSurface3d returns the linear Bezier surface between 4 points.

func F32QuadraticCurve1d

func F32QuadraticCurve1d(p0, p1, p2 float32, t float32) (float32, float32)

F32QuadraticCurve1d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 scalars. First returned value is the position, second is the derivative.

func F32QuadraticCurve2d

func F32QuadraticCurve2d(p0, p1, p2 *vpvec2.F32, t float32) (*vpvec2.F32, *vpvec2.F32)

F32QuadraticCurve2d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 2d vectors. First returned value is the position, second is the derivative.

func F32QuadraticCurve3d

func F32QuadraticCurve3d(p0, p1, p2 *vpvec3.F32, t float32) (*vpvec3.F32, *vpvec3.F32)

F32QuadraticCurve3d returns the quadratic Bezier curve from p0 to p2, going through p1. Point p1 is typically not reached, but it influences the curve, as it heads to p1 from p0, and conversely from p2 to p1. Works on float32 3d vectors. First returned value is the position, second is the derivative.

func F32QuadraticSurface1d

func F32QuadraticSurface1d(p [3][3]float32, u float32, v float32) (float32, float32, float32)

F32QuadraticSurface1d returns a quadratic Bezier surface between 9 points.

func F32QuadraticSurface2d

func F32QuadraticSurface2d(p *[3][3]vpvec2.F32, u float32, v float32) (*vpvec2.F32, *vpvec2.F32, *vpvec2.F32)

F32QuadraticSurface2d returns a quadratic Bezier surface between 9 points.

func F32QuadraticSurface3d

func F32QuadraticSurface3d(p *[3][3]vpvec3.F32, u float32, v float32) (*vpvec3.F32, *vpvec3.F32, *vpvec3.F32)

F32QuadraticSurface3d returns a quadratic Bezier surface between 9 points.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL