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

Function main

examples/function.go:10–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8}
9
10func main() {
11 scene := ln.Scene{}
12 box := ln.Box{ln.Vector{-2, -2, -4}, ln.Vector{2, 2, 2}}
13 scene.Add(ln.NewFunction(function, box, ln.Below))
14 eye := ln.Vector{3, 0, 3}
15 center := ln.Vector{1.1, 0, 0}
16 up := ln.Vector{0, 0, 1}
17 width := 1024.0
18 height := 1024.0
19 paths := scene.Render(eye, center, up, width, height, 50, 0.1, 100, 0.01)
20 paths.WriteToPNG("out.png", width, height)
21 paths.WriteToSVG("out.svg", width, height)
22 // paths.Print()
23}

Callers

nothing calls this directly

Calls 4

AddMethod · 0.95
RenderMethod · 0.95
WriteToPNGMethod · 0.80
WriteToSVGMethod · 0.80

Tested by

no test coverage detected