Versions in this module Expand all Collapse all v0 v0.5.2 Aug 9, 2025 v0.5.0 Aug 8, 2025 Changes in this version + var FontArcade = FontType + var FontAsteroid = FontType + func ApplyFogAndWaterLevel(objectY, objectZ float64) + func CirclePath(radius float64, res int) (PointList, []*Segment) + func GetRGB() (float64, float64, float64) + func InitWorld(context Context, cx, cy, cz float64) + func LabelPoints(b bool) + func SetCenter(x, y, z float64) + func SetClipping(near, far float64) + func SetFog(active bool, near, far float64) + func SetFont(font FontType, size, spacing float64) + func SetFontSize(size float64) + func SetFontSpacing(spacing float64) + func SetFontType(font FontType) + func SetPerspective(fl float64) + func SetRGB(r, g, b float64) + func SetWaterLevel(active bool, top, bottom float64) + type Context interface + ClosePath func() + FillCircle func(float64, float64, float64) + FillTextAny func(text any, x, y float64) + GetLineWidth func() float64 + GetSourceRGB func() (float64, float64, float64) + LineTo func(float64, float64) + MoveTo func(float64, float64) + Restore func() + Save func() + SetLineWidth func(float64) + SetSourceColor func(blcolor.Color) + Stroke func() + StrokePath func(geom.PointList, bool) + type FontType = struct + type Lure3d interface + Center3d func() (float64, float64, float64) + GetScale func() float64 + InitVals3d func() (float64, float64, float64) + Iterate func(x, y, z float64) (float64, float64, float64) + type Point struct + Px float64 + Py float64 + Scaling float64 + X float64 + Y float64 + Z float64 + func LerpPoint(t float64, p0, p1 *Point) *Point + func NewPoint(x, y, z float64) *Point + func RandomPointInBox(w, h, d float64) *Point + func RandomPointInCircle(radius float64) *Point + func RandomPointInCylinder(height, radius float64) *Point + func RandomPointInRectangle(w, d float64) *Point + func RandomPointInSphere(radius float64) *Point + func RandomPointInSphereDist(radius, dist float64) *Point + func RandomPointInTorus(radius1, radius2, arc float64) *Point + func RandomPointOnBox(w, h, d float64) *Point + func RandomPointOnCylinder(height, radius float64, includeCaps bool) *Point + func RandomPointOnSphere(radius float64) *Point + func RandomPointOnTorus(radius1, radius2, arc float64) *Point + func (p *Point) Clone() *Point + func (p *Point) Distance(other *Point) float64 + func (p *Point) Lerp(t float64, p1 *Point) + func (p *Point) Magnitude() float64 + func (p *Point) Normalize() + func (p *Point) Normalized() *Point + func (p *Point) Project() + func (p *Point) Randomize(amount float64) + func (p *Point) RandomizeX(amount float64) + func (p *Point) RandomizeY(amount float64) + func (p *Point) RandomizeZ(amount float64) + func (p *Point) Randomized(amount float64) *Point + func (p *Point) RandomizedX(amount float64) *Point + func (p *Point) RandomizedY(amount float64) *Point + func (p *Point) RandomizedZ(amount float64) *Point + func (p *Point) Rotate(rx, ry, rz float64) + func (p *Point) RotateX(angle float64) + func (p *Point) RotateY(angle float64) + func (p *Point) RotateZ(angle float64) + func (p *Point) Rotated(rx, ry, rz float64) *Point + func (p *Point) RotatedX(angle float64) *Point + func (p *Point) RotatedY(angle float64) *Point + func (p *Point) RotatedZ(angle float64) *Point + func (p *Point) Scale(sx, sy, sz float64) + func (p *Point) ScaleX(scale float64) + func (p *Point) ScaleY(scale float64) + func (p *Point) ScaleZ(scale float64) + func (p *Point) Scaled(sx, sy, sz float64) *Point + func (p *Point) ScaledX(scale float64) *Point + func (p *Point) ScaledY(scale float64) *Point + func (p *Point) ScaledZ(scale float64) *Point + func (p *Point) Translate(tx, ty, tz float64) + func (p *Point) TranslateX(tx float64) + func (p *Point) TranslateY(ty float64) + func (p *Point) TranslateZ(tz float64) + func (p *Point) Translated(tx, ty, tz float64) *Point + func (p *Point) TranslatedX(tx float64) *Point + func (p *Point) TranslatedY(ty float64) *Point + func (p *Point) TranslatedZ(tz float64) *Point + func (p *Point) UniScale(scale float64) + func (p *Point) UniScaled(scale float64) *Point + func (p *Point) Visible() bool + type PointList []*Point + func NewPointList() PointList + func (p *PointList) Add(point *Point) + func (p *PointList) AddRandomPointInBox(w, h, d float64) + func (p *PointList) AddRandomPointInCylinder(height, radius float64) + func (p *PointList) AddRandomPointInSphere(radius float64) + func (p *PointList) AddRandomPointInTorus(radius1, radius2 float64) + func (p *PointList) AddRandomPointOnBox(w, h, d float64) + func (p *PointList) AddRandomPointOnCylinder(height, radius float64, includeCaps bool) + func (p *PointList) AddRandomPointOnSphere(radius float64) + func (p *PointList) AddRandomPointOnTorus(radius1, radius2 float64) + func (p *PointList) AddXYZ(x, y, z float64) + func (p *PointList) Cull(cullFunc func(*Point) bool) + func (p *PointList) CullBox(minX, minY, minZ, maxX, maxY, maxZ float64) + func (p *PointList) SortX(ascending bool) + func (p *PointList) SortY(ascending bool) + func (p *PointList) SortZ(ascending bool) + func (p *PointList) TranslatedX(tx float64) PointList + func (p *PointList) TranslatedY(ty float64) PointList + func (p *PointList) TranslatedZ(tz float64) PointList + func (p PointList) Center() + func (p PointList) Clone() PointList + func (p PointList) Culled(cullFunc func(*Point) bool) PointList + func (p PointList) First() *Point + func (p PointList) Get(index int) *Point + func (p PointList) GetSize() (float64, float64, float64) + func (p PointList) Last() *Point + func (p PointList) Lerp(t float64, other PointList) + func (p PointList) Noisify(origin *Point, scale, offset float64) + func (p PointList) Normalize() + func (p PointList) Normalized() PointList + func (p PointList) Project() + func (p PointList) Push(pusher *Point, radius float64) + func (p PointList) Randomize(amount float64) + func (p PointList) RandomizeX(amount float64) + func (p PointList) RandomizeY(amount float64) + func (p PointList) RandomizeZ(amount float64) + func (p PointList) Randomized(amount float64) PointList + func (p PointList) RandomizedX(amount float64) PointList + func (p PointList) RandomizedY(amount float64) PointList + func (p PointList) RandomizedZ(amount float64) PointList + func (p PointList) RenderPoints(radius float64) + func (p PointList) Rotate(rx, ry, rz float64) + func (p PointList) RotateX(angle float64) + func (p PointList) RotateY(angle float64) + func (p PointList) RotateZ(angle float64) + func (p PointList) Rotated(rx, ry, rz float64) PointList + func (p PointList) RotatedX(angle float64) PointList + func (p PointList) RotatedY(angle float64) PointList + func (p PointList) RotatedZ(angle float64) PointList + func (p PointList) Scale(sx, sy, sz float64) + func (p PointList) ScaleX(scale float64) + func (p PointList) ScaleY(scale float64) + func (p PointList) ScaleZ(scale float64) + func (p PointList) Scaled(sx, sy, sz float64) PointList + func (p PointList) ScaledX(scale float64) PointList + func (p PointList) ScaledY(scale float64) PointList + func (p PointList) ScaledZ(scale float64) PointList + func (p PointList) Translate(tx, ty, tz float64) + func (p PointList) TranslateX(tx float64) + func (p PointList) TranslateY(ty float64) + func (p PointList) TranslateZ(tz float64) + func (p PointList) Translated(tx, ty, tz float64) PointList + func (p PointList) TwistX(angle float64) + func (p PointList) TwistY(angle float64) + func (p PointList) TwistZ(angle float64) + func (p PointList) UniScale(scale float64) + func (p PointList) UniScaled(scale float64) PointList + func (p PointList) WrapCylinderWithArc(arc float64) + func (p PointList) WrapCylinderWithRadius(radius float64) + func (p PointList) WrapCylinderWithRadiusAndArc(radius, arc float64) + type Segment struct + PointA *Point + PointB *Point + func NewSegment(a, b *Point) *Segment + func (s *Segment) Length() float64 + func (s *Segment) Stroke(width float64) + type Shape struct + Points PointList + Segments []*Segment + func Box(w, h, d float64) *Shape + func Circle(radius float64, res int) *Shape + func Cone(height, radius0, radius1 float64, slices, res int, showSlices, showLong bool) *Shape + func Cube(size float64) *Shape + func Cylinder(height, radius float64, slices, res int, showSlices, showLong bool) *Shape + func Dodecahedron(size float64) *Shape + func GridBox(w, h, d float64, xCount, yCount, zCount int, inner bool) *Shape + func GridPlane(w, d float64, rows, cols int) *Shape + func Icosahedron(size float64) *Shape + func LoadShape(fileName string) (*Shape, error) + func NewShape() *Shape + func Octahedron(size float64) *Shape + func ParseChar(char string, fontData FontType) *Shape + func Pyramid(height, baseRadius float64, sides int) *Shape + func RandomInnerBox(w, h, d float64, count int) *Shape + func RandomInnerCylinder(height, radius float64, count int) *Shape + func RandomInnerSphere(radius float64, count int) *Shape + func RandomInnerTorus(radius1, radius2, arc float64, count int) *Shape + func RandomSurfaceBox(w, h, d float64, count int) *Shape + func RandomSurfaceCylinder(height, radius float64, count int, includeCaps bool) *Shape + func RandomSurfaceSphere(radius float64, count int) *Shape + func RandomSurfaceTorus(radius1, radius2, arc float64, count int) *Shape + func ShapeFrom2dPath(path geom.PointList, closed bool) *Shape + func ShapeFromLure(lure Lure3d, count int) *Shape + func ShapeFromXYZ(fileName string) *Shape + func Sphere(radius float64, long, lat int, showLong, showLat bool) *Shape + func Spring(height, r0, r1, turns, res float64) *Shape + func Tetrahedron(size float64) *Shape + func Torus(r1, r2, arc float64, slices, res int, showSlices, showLong bool) *Shape + func TorusKnot(p, q, r1, r2, res float64) *Shape + func (s *Shape) AddPoint(point *Point) + func (s *Shape) AddRandomPointInBox(w, h, d float64) + func (s *Shape) AddRandomPointInCylinder(height, radius float64) + func (s *Shape) AddRandomPointInSphere(radius float64) + func (s *Shape) AddRandomPointInTorus(radius1, radius2, arc float64) + func (s *Shape) AddRandomPointOnBox(w, h, d float64) + func (s *Shape) AddRandomPointOnCylinder(height, radius float64, includeCaps bool) + func (s *Shape) AddRandomPointOnSphere(radius float64) + func (s *Shape) AddRandomPointOnTorus(radius1, radius2, arc float64) + func (s *Shape) AddSegment(seg *Segment) + func (s *Shape) AddSegmentByIndex(a, b int) + func (s *Shape) AddSegmentByPoints(a, b *Point) + func (s *Shape) AddShape(shape *Shape) + func (s *Shape) AddXYZ(x, y, z float64) + func (s *Shape) Center() + func (s *Shape) Clone() *Shape + func (s *Shape) ConvexHull3d(dy float64) *Shape + func (s *Shape) Cull(cullFunc func(*Point) bool) + func (s *Shape) CullBox(minX, minY, minZ, maxX, maxY, maxZ float64) + func (s *Shape) Culled(cullFunc func(*Point) bool) *Shape + func (s *Shape) GetSize() (float64, float64, float64) + func (s *Shape) Randomize(amount float64) + func (s *Shape) RandomizeX(amount float64) + func (s *Shape) RandomizeY(amount float64) + func (s *Shape) RandomizeZ(amount float64) + func (s *Shape) Randomized(amount float64) *Shape + func (s *Shape) RandomizedX(amount float64) *Shape + func (s *Shape) RandomizedY(amount float64) *Shape + func (s *Shape) RandomizedZ(amount float64) *Shape + func (s *Shape) RemoveSegment(seg *Segment) + func (s *Shape) RenderPoints(radius float64) + func (s *Shape) Rotate(rx, ry, rz float64) + func (s *Shape) RotateX(angle float64) + func (s *Shape) RotateY(angle float64) + func (s *Shape) RotateZ(angle float64) + func (s *Shape) Rotated(rx, ry, rz float64) *Shape + func (s *Shape) RotatedX(angle float64) *Shape + func (s *Shape) RotatedY(angle float64) *Shape + func (s *Shape) RotatedZ(angle float64) *Shape + func (s *Shape) Save(fileName string) + func (s *Shape) Scale(sx, sy, sz float64) + func (s *Shape) ScaleX(scale float64) + func (s *Shape) ScaleY(scale float64) + func (s *Shape) ScaleZ(scale float64) + func (s *Shape) Scaled(sx, sy, sz float64) *Shape + func (s *Shape) ScaledX(scale float64) *Shape + func (s *Shape) ScaledY(scale float64) *Shape + func (s *Shape) ScaledZ(scale float64) *Shape + func (s *Shape) Split(split func(p *Point) bool) *Shape + func (s *Shape) Stroke(width float64) + func (s *Shape) Subdivide(maxDist float64) + func (s *Shape) ThinPoints(take, skip int) + func (s *Shape) Translate(tx, ty, tz float64) + func (s *Shape) TranslateX(tx float64) + func (s *Shape) TranslateY(ty float64) + func (s *Shape) TranslateZ(tz float64) + func (s *Shape) Translated(tx, ty, tz float64) *Shape + func (s *Shape) TranslatedX(tx float64) *Shape + func (s *Shape) TranslatedY(ty float64) *Shape + func (s *Shape) TranslatedZ(tz float64) *Shape + func (s *Shape) TwistX(amt float64) + func (s *Shape) TwistY(amt float64) + func (s *Shape) TwistZ(amt float64) + func (s *Shape) UniScale(scale float64) + func (s *Shape) UniScaled(scale float64) *Shape + func (s *Shape) WrapCylinderWithArc(arc float64) + func (s *Shape) WrapCylinderWithRadius(radius float64) + func (s *Shape) WrapCylinderWithRadiusAndArc(radius, arc float64) + type String struct + AspectRatio float64 + Letters []*Shape + Orig string + func NewString(str string) *String + func (s *String) AsCylinder(radius float64) *Shape + func (s *String) AsLine() *Shape + func (s *String) AsVCylinder(radius float64) *Shape + func (s *String) AsVLine() *Shape