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

Method Paths3

ln/function.go:49–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49func (f *Function) Paths3() Paths {
50 var path Path
51 n := 10000
52 for i := 0; i < n; i++ {
53 t := float64(i) / float64(n)
54 r := 8 - math.Pow(t, 0.1)*8
55 x := math.Cos(Radians(t*2*math.Pi*3000)) * r
56 y := math.Sin(Radians(t*2*math.Pi*3000)) * r
57 z := f.Function(x, y)
58 z = math.Min(z, f.Box.Max.Z)
59 z = math.Max(z, f.Box.Min.Z)
60 path = append(path, Vector{x, y, z})
61 }
62 // return append(f.Paths2(), path)
63 return Paths{path}
64}
65
66func (f *Function) Paths() Paths {
67 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