`Bernstein.Bernstein`

— ModuleBernstein basis functions for simplices

`Bernstein.barycentric2cartesian`

— Method`p = barycentric2cartesian(s, λ)`

Convert barycentric to Cartesian coordinates.

**Arguments**

`s`

: Simplex vertices in Cartesian coordinates.`s`

has`N ≤ D + 1`

vertices in`D`

dimensions.`λ`

: Point in barycentric coordinates

**Result**

`p`

: Point in Cartesian coordinates

`Bernstein.bernstein`

— Function```
bernstein(α, λ)
bernstein(s, α, x)
```

Evaluate Bernstein polynomial

The order of approximation is given implicity by `sum(α)`

.

**Arguments**

`s`

: Vertices of simplex`α`

: multi-index describing polynomial`x`

: location where Bernstein polynomial is evaluated in Cartesian coordinates`λ`

: location where Bernstein polynomial is evaluated in barycentric coordinates

`Bernstein.bernstein_products`

— MethodOverlap integrals between Bernstein polynomials (which are neither orthogonal nor normalized)

`Bernstein.cartesian2barycentric`

— Method`λ = cartesian2barycentric(s, p)`

Convert Cartesian to barycentric coordinates.

**Arguments**

`s`

: Simplex vertices in Cartesian coordinates.`s`

has`N ≤ D + 1`

vertices in`D`

dimensions.`p`

: Point in Cartesian coordinates

**Result**

`λ`

: Point in barycentric coordinates

`Bernstein.cartesian2barycentric_setup`

— Method`cartesian2barycentric_setup(s)`

Prepare to convert Cartesian to barycentric coordinates.

The returned `setup`

structure can be passed to `cartesian2barycentric`

instead of the simplex vertices. This pre-calculates certain operations and is more efficient.

**Arguments**

`s`

: Simplex vertices in Cartesian coordinates.`s`

has`N=D+1`

vertices in`D`

dimensions.

**Result**

`setup`