Documentation
¶
Index ¶
- Constants
- func Boundaries(n, e, p float64) string
- func InStringSlice(word string, slice []string) bool
- func MakeCells(cell vector.Vec4, faceReflections []string, numLayers int, ...) ([]vector.Vec4, []string)
- func ReduceWord(word string, p, q, r int) string
- type BaseReflections
- type Cell
- type Distances
- type GoursatTetrahedron
- func GoursatTetrahedron33n(n float64) GoursatTetrahedron
- func GoursatTetrahedron34n(n float64) GoursatTetrahedron
- func GoursatTetrahedron35n(n float64) GoursatTetrahedron
- func GoursatTetrahedron36n(n float64) GoursatTetrahedron
- func GoursatTetrahedron43n(n float64) GoursatTetrahedron
- func GoursatTetrahedron44n(n float64) GoursatTetrahedron
- func GoursatTetrahedron53n(n float64) GoursatTetrahedron
- func GoursatTetrahedron63n(n float64) GoursatTetrahedron
- func GoursatTetrahedronpqr(p, q, r float64) GoursatTetrahedron
- func (gt *GoursatTetrahedron) DistanceSquared(u, v vector.Vec4) float64
- func (gt *GoursatTetrahedron) Dump()
- func (gt *GoursatTetrahedron) EnumerateReflections(reflections []Reflect, faceReflections []string) []Reflect
- func (gt *GoursatTetrahedron) GenerateInnerProduct()
- func (gt *GoursatTetrahedron) GramSchmidt(w, x, y, z vector.Vec4) (vector.Vec4, vector.Vec4, vector.Vec4, vector.Vec4)
- func (gt *GoursatTetrahedron) Normalise(v vector.Vec4) vector.Vec4
- func (gt *GoursatTetrahedron) Populate()
- func (gt *GoursatTetrahedron) ProjectToLine(d, n, m vector.Vec4) vector.Vec4
- func (gt *GoursatTetrahedron) ProjectToPlane(g, n vector.Vec4) vector.Vec4
- func (gt *GoursatTetrahedron) ReflectionGenerator(n vector.Vec4) func(vector.Vec4) vector.Vec4
- func (gt *GoursatTetrahedron) ScaleVEFC()
- func (gt *GoursatTetrahedron) UniformHoneycombGenerator(v, e, f, c float64) UniformHoneycomb
- type Heights
- type Normals
- type Reflect
- type ReflectionMatrices
- type Reflections
- type UniformHoneycomb
- type VectorIP
Constants ¶
View Source
const ( Rt2 = 1.41421356237309514547462185873882845044136047363281 Rt3 = 1.73205080756887719317660412343684583902359008789062 Rt5 = 2.23606797749978980505147774238139390945434570312500 Rt7 = 2.64575131106459071617109657381661236286163330078125 Rt11 = 3.31662479035539980998237297171726822853088378906250 Rt_2 = 0.70710678118654746171500846685376018285751342773438 Rt_3 = 0.57735026918962584208117050366126932203769683837891 Rt_5 = 0.44721359549995792770360480972158256918191909790039 Rt_7 = 0.37796447300922719758631274089566431939601898193359 Rt_11 = 0.30151134457776362918224322129390202462673187255859 P = (1.0 + Rt5) * 0.5 P2 = (3.0 + Rt5) * 0.5 P3 = 2.0 + Rt5 P4 = (7.0 + 3.0*Rt5) * 0.5 P5 = (11.0 + 5.0*Rt5) * 0.5 P6 = P3 * P3 P8 = P4 * P4 P_1 = (Rt5 - 1.0) * 0.5 P_2 = (3.0 - Rt5) * 0.5 P_3 = Rt5 - 2.0 P_4 = (7.0 - 3.0*Rt5) * 0.5 )
View Source
const BoundaryEps = 0.00001
View Source
const DistanceSquaredEps = 0.0001
View Source
const GenerateEdgeDataEps = 0.00001
View Source
const GenerateFaceDataEps = 0.00001
View Source
const IPEpsilon = 0.00001
View Source
const MAXLENGTH = 1000
View Source
const TestEps = 0.00001
Variables ¶
This section is empty.
Functions ¶
func Boundaries ¶
func InStringSlice ¶ added in v1.3.17
func ReduceWord ¶ added in v1.2.0
Types ¶
type BaseReflections ¶ added in v1.3.17
type GoursatTetrahedron ¶ added in v1.2.0
type GoursatTetrahedron struct {
P float64
Q float64
R float64
V vector.Vec4
E vector.Vec4
F vector.Vec4
C vector.Vec4
EVal float64
PVal float64
Distances Distances
Normals Normals
Heights Heights
BaseReflections BaseReflections
Reflections Reflections
Scale func(vector.Vec4) vector.Vec4
IP func(vector.Vec4, vector.Vec4) float64
Metric string
}
func GoursatTetrahedron33n ¶ added in v1.2.0
func GoursatTetrahedron33n(n float64) GoursatTetrahedron
func GoursatTetrahedron34n ¶ added in v1.2.0
func GoursatTetrahedron34n(n float64) GoursatTetrahedron
func GoursatTetrahedron35n ¶ added in v1.2.0
func GoursatTetrahedron35n(n float64) GoursatTetrahedron
func GoursatTetrahedron36n ¶ added in v1.2.0
func GoursatTetrahedron36n(n float64) GoursatTetrahedron
func GoursatTetrahedron43n ¶ added in v1.2.0
func GoursatTetrahedron43n(n float64) GoursatTetrahedron
func GoursatTetrahedron44n ¶ added in v1.2.0
func GoursatTetrahedron44n(n float64) GoursatTetrahedron
func GoursatTetrahedron53n ¶ added in v1.2.0
func GoursatTetrahedron53n(n float64) GoursatTetrahedron
func GoursatTetrahedron63n ¶ added in v1.2.0
func GoursatTetrahedron63n(n float64) GoursatTetrahedron
func GoursatTetrahedronpqr ¶ added in v1.2.0
func GoursatTetrahedronpqr(p, q, r float64) GoursatTetrahedron
func (*GoursatTetrahedron) DistanceSquared ¶ added in v1.3.17
func (gt *GoursatTetrahedron) DistanceSquared(u, v vector.Vec4) float64
func (*GoursatTetrahedron) Dump ¶ added in v1.3.23
func (gt *GoursatTetrahedron) Dump()
func (*GoursatTetrahedron) EnumerateReflections ¶ added in v1.3.17
func (gt *GoursatTetrahedron) EnumerateReflections(reflections []Reflect, faceReflections []string) []Reflect
func (*GoursatTetrahedron) GenerateInnerProduct ¶ added in v1.3.17
func (gt *GoursatTetrahedron) GenerateInnerProduct()
func (*GoursatTetrahedron) GramSchmidt ¶ added in v1.3.17
func (gt *GoursatTetrahedron) GramSchmidt(w, x, y, z vector.Vec4) (vector.Vec4, vector.Vec4, vector.Vec4, vector.Vec4)
GramSchmidt runs the Gram-Schmidt algorithm on the four vectors w, x, y, z with the inner product given by gt.
Returns:
a = w b = x - <x,a>a c = y - <y,a>a - <y,b>b d = z - <z,a>a - <z,b>b - <z,c>c
func (*GoursatTetrahedron) Normalise ¶ added in v1.3.17
func (gt *GoursatTetrahedron) Normalise(v vector.Vec4) vector.Vec4
Normalise normalises the vector using the inner product from the Goursat Tetrahedron.
Normalise(n) = n/sqrt(|<n,n>|)
func (*GoursatTetrahedron) Populate ¶ added in v1.3.17
func (gt *GoursatTetrahedron) Populate()
func (*GoursatTetrahedron) ProjectToLine ¶ added in v1.3.17
func (gt *GoursatTetrahedron) ProjectToLine(d, n, m vector.Vec4) vector.Vec4
func (*GoursatTetrahedron) ProjectToPlane ¶ added in v1.3.17
func (gt *GoursatTetrahedron) ProjectToPlane(g, n vector.Vec4) vector.Vec4
ProjectToPlane removes the n component of g and returns the result using the inner product from gt
i.e. projects g to the hyperplane with normal n.
ProjectToPlane(g, n) = g - <g,n> n
func (*GoursatTetrahedron) ReflectionGenerator ¶ added in v1.3.17
func (*GoursatTetrahedron) ScaleVEFC ¶ added in v1.3.17
func (gt *GoursatTetrahedron) ScaleVEFC()
ScaleVEFC normalises the Goursat Tetrahedron's vertices with respect to the inner product.
func (*GoursatTetrahedron) UniformHoneycombGenerator ¶ added in v1.3.17
func (gt *GoursatTetrahedron) UniformHoneycombGenerator(v, e, f, c float64) UniformHoneycomb
type ReflectionMatrices ¶ added in v1.3.17
type Reflections ¶ added in v1.3.17
type UniformHoneycomb ¶ added in v1.3.17
type UniformHoneycomb struct {
GoursatTetrahedron GoursatTetrahedron
G VectorIP
G_VE VectorIP
G_VF VectorIP
G_VC VectorIP
G_EF VectorIP
G_EC VectorIP
G_FC VectorIP
G_VEF VectorIP
G_VEC VectorIP
G_VFC VectorIP
G_EFC VectorIP
}
func (*UniformHoneycomb) GenerateCells ¶ added in v1.3.17
func (uh *UniformHoneycomb) GenerateCells() []Cell
Source Files
¶
Click to show internal directories.
Click to hide internal directories.