MCPcopy
hub / github.com/fogleman/ln / main

Function main

examples/mountain.go:30–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func main() {
31 blocks := load("examples/mountain.csv")
32 fmt.Println(len(blocks))
33 scene := ln.Scene{}
34 size := ln.Vector{0.5, 0.5, 0.5}
35 for _, v := range blocks {
36 scene.Add(ln.NewCube(v.Sub(size), v.Add(size)))
37 }
38 eye := ln.Vector{90, -90, 70}
39 center := ln.Vector{0, 0, -15}
40 up := ln.Vector{0, 0, 1}
41 width := 1920.0
42 height := 1080.0
43 paths := scene.Render(eye, center, up, width, height, 50, 0.1, 1000, 0.1)
44 paths.WriteToPNG("out.png", width, height)
45 // paths.Print()
46}

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
RenderMethod · 0.95
loadFunction · 0.85
SubMethod · 0.80
WriteToPNGMethod · 0.80

Tested by

no test coverage detected