()
| 47 | } |
| 48 | |
| 49 | func (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 | |
| 66 | func (f *Function) Paths() Paths { |
| 67 | var paths Paths |