Versions in this module Expand all Collapse all v1 v1.0.1 Jun 4, 2023 v1.0.0 Jun 4, 2023 Changes in this version + const AbsModuleCount + const AddModuleCount + const BillowModuleCount + const BlendModuleCount + const ClampModuleCount + const DefaultBias + const DefaultBillowFrequency + const DefaultBillowLacunarity + const DefaultBillowMaxOctave + const DefaultBillowOctaveCount + const DefaultBillowPersistence + const DefaultBillowQuality + const DefaultBillowSeed + const DefaultClampLowerBound + const DefaultClampUpperBound + const DefaultCylinderFrequency + const DefaultExp + const DefaultPerlinFrequency + const DefaultPerlinLacunarity + const DefaultPerlinOctaveCount + const DefaultPerlinPersistence + const DefaultPerlinQuality + const DefaultPerlinSeed + const DefaultRidgedFrequency + const DefaultRidgedGain + const DefaultRidgedLacunarity + const DefaultRidgedOctaveCount + const DefaultRidgedOffset + const DefaultRidgedQuality + const DefaultRidgedSeed + const DefaultRidgedSpectralWeight + const DefaultRotateX + const DefaultRotateY + const DefaultRotateZ + const DefaultScale + const DefaultScalePointX + const DefaultScalePointY + const DefaultScalePointZ + const DefaultSelectEdgeFalloff + const DefaultSelectLowerBound + const DefaultSelectUpperBound + const DefaultSphereFrequency + const DefaultTurbulenceFrequency + const DefaultTurbulencePower + const DefaultTurbulenceRoughness + const DefaultTurbulenceSeed + const DefaultVoronoiDisplacement + const DefaultVoronoiFrequency + const DefaultVoronoiSeed + const DegToRad + const DisplaceModuleCount + const ExponentModuleCount + const InvertModuleCount + const PerlinMaxOctave + const PowerModuleCount + const QualityBEST + const QualityFAST + const QualitySTD + const RidgedMaxOctave + const RotateModuleCount + const SQRT_2 + const SQRT_3 + const ScaleBiasModuleCount + const ScalePointModuleCount + const SeedNoiseGen + const SelectModuleCount + const ShiftNoiseGen + const TerraceModuleCount + const TurbulenceModuleCount + const XNoiseGen + const YNoiseGen + const ZNoiseGen + var RandomVectors = []float64 + func BlendChannel(channel0, channel1 uint8, alpha float64) uint8 + func ClampValue(value, lowerBound, upperBound int) int + func ClampValueFloat(value, lowerBound, upperBound float64) float64 + func CubicInterp(n0, n1, n2, n3, a float64) float64 + func GradientCoherentNoise3D(x, y, z float64, seed, quality int) float64 + func GradientNoise3D(fx, fy, fz, ix, iy, iz float64, seed int) float64 + func IntValueNoise3D(x, y, z, seed int) int + func LinearInterp(n0, n1, a float64) float64 + func LinearInterpColor(color0, color1 color.RGBA, alpha float64) color.RGBA + func MakeMap(width, height int) [][]float64 + func MapToCylinder(angle, height float64, source Module) float64 + func MapToLine(sx, sy, sz, ex, ey, ez, p float64, attenuate bool, source Module) float64 + func MapToPlane(x, y float64, source Module) float64 + func MapToSphere(lat, lon float64, source Module) float64 + func NoiseMapCylinder(lowerAngleBound, upperAngleBound, lowerHeightBound, upperHeightBound float64, ...) [][]float64 + func NoiseMapPlane(lowerXBound, upperXBound, lowerZBound, upperZBound float64, width, height int, ...) [][]float64 + func NoiseMapSphere(eastBound, westBound, northBound, southBound float64, width, height int, ...) [][]float64 + func SCurve3(a float64) float64 + func SCurve5(a float64) float64 + func ValueCoherentNoise3D(x, y, z float64, seed, quality int) float64 + func ValueNoise3D(x, y, z, seed int) float64 + type Abs struct + SourceModule []Module + func (a Abs) GetSourceModule(index int) Module + func (a Abs) GetValue(x, y, z float64) float64 + func (a Abs) SetSourceModule(index int, source Module) + type Add struct + SourceModule []Module + func (a Add) GetSourceModule(index int) Module + func (a Add) GetValue(x, y, z float64) float64 + func (a Add) SetSourceModule(index int, source Module) + type Billow struct + Frequency float64 + Lacunarity float64 + OctaveCount int + Persistence float64 + Quality int + Seed int + SourceModule []Module + func DefaultBillow() Billow + func (b Billow) GetSourceModule(index int) Module + func (b Billow) GetValue(x, y, z float64) float64 + func (b Billow) SetSourceModule(index int, module Module) + type Blend struct + SourceModule []Module + func (b Blend) GetSourceModule(index int) Module + func (b Blend) GetValue(x, y, z float64) float64 + func (b Blend) SetSourceModule(index int, sourceModule Module) + type Checkerboard struct + func (c Checkerboard) GetSourceModule(index int) Module + func (c Checkerboard) GetValue(x, y, z float64) float64 + func (c Checkerboard) SetSourceModule(index int, sourceModule Module) + type Clamp struct + LowerBound float64 + SourceModule []Module + UpperBound float64 + func DefaultClamp(module Module) *Clamp + func (c *Clamp) SetBounds(lowerBound, upperBound float64) + func (c Clamp) GetSourceModule(index int) Module + func (c Clamp) GetValue(x, y, z float64) float64 + func (c Clamp) SetSourceModule(index int, sourceModule Module) + type Constant struct + Value float64 + func (c Constant) GetSourceModule(index int) Module + func (c Constant) GetSourceModuleCount() int + func (c Constant) GetValue(x, y, z float64) float64 + func (c Constant) NewModule() Constant + func (c Constant) SetSourceModule(index int, sourceModule Module) + type Curve struct + ControlPoints map[float64]float64 + SourceModule []Module + func (c *Curve) AddControlPoint(inputValue, outputValue float64) + func (c *Curve) ClearAllControlPoints() + func (c Curve) GetSourceModule(index int) Module + func (c Curve) GetValue(x, y, z float64) float64 + func (c Curve) SetSourceModule(index int, sourceModule Module) + type Cylinders struct + Frequency float64 + func DefaultCylinders() Cylinders + func (c Cylinders) GetSourceModule(index int) Module + func (c Cylinders) GetValue(x, y, z float64) float64 + func (c Cylinders) SetSourceModule(index int, sourceModule Module) + type Displace struct + SourceModule []Module + func (d Displace) GetSourceModule(index int) Module + func (d Displace) GetValue(x, y, z float64) float64 + func (d Displace) SetSourceModule(index int, sourceModule Module) + func (d Displace) SetXDisplaceModule(source Module) + func (d Displace) SetXYZDisplaceModule(sourceX, sourceY, sourceZ Module) + func (d Displace) SetYDisplaceModule(source Module) + func (d Displace) SetZDisplaceModule(source Module) + type Exponent struct + Exponent float64 + SourceModule []Module + func DefaultExponent() Exponent + func (e Exponent) GetSourceModule(index int) Module + func (e Exponent) GetValue(x, y, z float64) float64 + func (e Exponent) SetSourceModule(index int, source Module) + type GradientColor struct + GradientPoints map[float64]color.RGBA + func (g *GradientColor) AddGradientPoint(position float64, color color.RGBA) + func (g *GradientColor) ClearGradient() + func (g *GradientColor) GetColor(position float64) color.RGBA + type Invert struct + SourceModule []Module + func (i Invert) GetSourceModule(index int) Module + func (i Invert) GetValue(x, y, z float64) float64 + func (i Invert) SetSourceModule(index int, source Module) + type Max struct + SourceModule []Module + func (m Max) GetSourceModule(index int) Module + func (m Max) GetValue(x, y, z float64) float64 + func (m Max) SetSourceModule(index int, source Module) + type Min struct + SourceModule []Module + func (m Min) GetSourceModule(index int) Module + func (m Min) GetValue(x, y, z float64) float64 + func (m Min) SetSourceModule(index int, source Module) + type Module interface + GetSourceModule func(index int) Module + GetValue func(x, y, z float64) float64 + SetSourceModule func(index int, sourceModule Module) + type Multiply struct + SourceModule []Module + func (m Multiply) GetSourceModule(index int) Module + func (m Multiply) GetValue(x, y, z float64) float64 + func (m Multiply) SetSourceModule(index int, source Module) + type Perlin struct + Frequency float64 + Lacunarity float64 + OctaveCount int + Persistence float64 + Quality int + Seed int + func DefaultPerlin() Perlin + func (p *Perlin) SetOctaveCount(octave int) + func (p Perlin) GetSourceModule(index int) Module + func (p Perlin) GetValue(x, y, z float64) float64 + func (p Perlin) SetSourceModule(index int, source Module) + type Power struct + SourceModule []Module + func (m Power) GetSourceModule(index int) Module + func (m Power) GetValue(x, y, z float64) float64 + func (m Power) SetSourceModule(index int, source Module) + type RenderImage struct + BackgroundImage image.RGBA + CosAzimuth float64 + CosElev float64 + DestinationImage image.RGBA + Gradient GradientColor + LightAzimuth float64 + LightBrightness float64 + LightColor color.RGBA + LightContrast float64 + LightElev float64 + LightEnabled bool + LightIntensity float64 + NoiseMap [][]float64 + RecalculateLight bool + SinAzimuth float64 + SinElev float64 + WrapEnabled bool + func (r *RenderImage) BuildGrayscaleGradient() + func (r *RenderImage) BuildTerrainGradient() + func (r *RenderImage) Render() + func (r *RenderImage) RenderFile(filename string) + func (r *RenderImage) SetLightAzimuth(azimuth float64) + func (r *RenderImage) SetLightBrightness(brightness float64) + func (r *RenderImage) SetLightContrast(contrast float64) + func (r *RenderImage) SetLightElev(elev float64) + func (r *RenderImage) SetLightIntensity(intensity float64) + type Ridgedmulti struct + Frequency float64 + Gain float64 + Lacunarity float64 + OctaveCount int + Offset float64 + Quality int + Seed int + SpectralWeight float64 + SpectralWeights []float64 + func DefaultRidgedmulti() Ridgedmulti + func (r *Ridgedmulti) SetOctaveCount(octave int) + func (r Ridgedmulti) CalcSpectralWeights() + func (r Ridgedmulti) GetSourceModule(index int) Module + func (r Ridgedmulti) GetValue(x, y, z float64) float64 + func (r Ridgedmulti) SetSourceModule(index int, source Module) + type Rotatepoint struct + SourceModule []Module + X1Matrix float64 + X2Matrix float64 + X3Matrix float64 + XAngle float64 + Y1Matrix float64 + Y2Matrix float64 + Y3Matrix float64 + YAngle float64 + Z1Matrix float64 + Z2Matrix float64 + Z3Matrix float64 + ZAngle float64 + func DefaultRotatepoint() Rotatepoint + func (r *Rotatepoint) SetAngles(xAngle, yAngle, zAngle float64) + func (r *Rotatepoint) SetXAngle(xAngle float64) + func (r *Rotatepoint) SetYAngle(yAngle float64) + func (r *Rotatepoint) SetZAngle(zAngle float64) + func (r Rotatepoint) GetSourceModule(index int) Module + func (r Rotatepoint) GetValue(x, y, z float64) float64 + func (r Rotatepoint) SetSourceModule(index int, source Module) + type ScaleBias struct + Bias float64 + Scale float64 + SourceModule []Module + func DefaultScaleBias() ScaleBias + func (a ScaleBias) GetSourceModule(index int) Module + func (a ScaleBias) GetValue(x, y, z float64) float64 + func (a ScaleBias) SetSourceModule(index int, source Module) + type ScalePoint struct + SourceModule []Module + XScale float64 + YScale float64 + ZScale float64 + func DefaultScalePoint() ScalePoint + func (a ScalePoint) GetSourceModule(index int) Module + func (a ScalePoint) GetValue(x, y, z float64) float64 + func (a ScalePoint) SetSourceModule(index int, source Module) + type Select struct + EdgeFalloff float64 + LowerBound float64 + SourceModule []Module + UpperBound float64 + func DefaultSelect() Select + func (s *Select) SetBounds(lowerBound, upperBound float64) + func (s *Select) SetEdgeFalloff(edgeFalloff float64) + func (s Select) GetSourceModule(index int) Module + func (s Select) GetValue(x, y, z float64) float64 + func (s Select) SetSourceModule(index int, source Module) + type Spheres struct + Frequency float64 + func DefaultSpheres() Spheres + func (s Spheres) GetSourceModule(index int) Module + func (s Spheres) GetValue(x, y, z float64) float64 + func (s Spheres) SetSourceModule(index int, source Module) + type Terrace struct + ControlPoints []float64 + InvertTerraces bool + SourceModule []Module + func DefaultTerrace() Terrace + func (t Terrace) AddControlPoint(value float64) + func (t Terrace) ClearAllControlPoints() + func (t Terrace) GetSourceModule(index int) Module + func (t Terrace) GetValue(x, y, z float64) float64 + func (t Terrace) MakeControlPoints(count int) + func (t Terrace) SetSourceModule(index int, source Module) + type TranslatePoint struct + SourceModule []Module + XTranslate float64 + YTranslate float64 + ZTranslate float64 + func (t *TranslatePoint) SetTranslatePoints(x, y, z float64) + func (t TranslatePoint) GetSourceModule(index int) Module + func (t TranslatePoint) GetValue(x, y, z float64) float64 + func (t TranslatePoint) SetSourceModule(index int, source Module) + type Turbulence struct + Power float64 + SourceModules []Module + XDistortModule Perlin + YDistortModule Perlin + ZDistortModule Perlin + func DefaultTurbulence() Turbulence + func (t *Turbulence) SetFrequency(frequency float64) + func (t *Turbulence) SetRoughness(roughness int) + func (t *Turbulence) SetSeed(seed int) + func (t Turbulence) GetSourceModule(index int) Module + func (t Turbulence) GetValue(x, y, z float64) float64 + func (t Turbulence) SetSourceModule(index int, source Module) + type Voronoi struct + Displacement float64 + EnableDistance bool + Frequency float64 + Seed int + func DefaultVoronoi() Voronoi + func (v Voronoi) GetSourceModule(index int) Module + func (v Voronoi) GetValue(x, y, z float64) float64 + func (v Voronoi) SetSourceModule(index int, source Module)