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

Function Render

examples/earth.go:63–73  ·  view source on GitHub ↗
(lines ln.Paths, matrix ln.Matrix)

Source from the content-addressed store, hash-verified

61}
62
63func Render(lines ln.Paths, matrix ln.Matrix) ln.Paths {
64 scene := ln.Scene{}
65 sphere := ln.NewSphere(ln.Vector{}, 1)
66 earth := Earth{sphere, lines}
67 shape := ln.NewTransformedShape(&earth, matrix)
68 scene.Add(shape)
69 eye := ln.LatLngToXYZ(35.7806, -78.6389, 1).Normalize().MulScalar(2.46)
70 center := ln.Vector{}
71 up := ln.Vector{0, 0, 1}
72 return scene.Render(eye, center, up, 60, 1, 0.1, 100, 0.01)
73}
74
75func Circle(r float64) ln.Path {
76 var result ln.Path

Callers 1

mainFunction · 0.85

Calls 4

AddMethod · 0.95
RenderMethod · 0.95
MulScalarMethod · 0.80
NormalizeMethod · 0.80

Tested by

no test coverage detected