MCPcopy Index your code
hub / github.com/fogleman/ln / Paths

Method Paths

ln/function.go:66–85  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64}
65
66func (f *Function) Paths() Paths {
67 var paths Paths
68 fine := 1.0 / 256
69 for a := 0; a < 360; a += 5 {
70 var path Path
71 for r := 0.0; r <= 8.0; r += fine {
72 x := math.Cos(Radians(float64(a))) * r
73 y := math.Sin(Radians(float64(a))) * r
74 z := f.Function(x, y)
75 o := -math.Pow(-z, 1.4)
76 x = math.Cos(Radians(float64(a))-o) * r
77 y = math.Sin(Radians(float64(a))-o) * r
78 z = math.Min(z, f.Box.Max.Z)
79 z = math.Max(z, f.Box.Min.Z)
80 path = append(path, Vector{x, y, z})
81 }
82 paths = append(paths, path)
83 }
84 return paths
85}
86
87func (f *Function) Paths1() Paths {
88 var paths Paths

Callers

nothing calls this directly

Calls 3

RadiansFunction · 0.85
MinMethod · 0.45
MaxMethod · 0.45

Tested by

no test coverage detected