func Draw(ind *node.Node, img *imgut.Image) { // We have to compile the nodes exec := node.CompileTree(ind).(*binary.Primitive) // Apply the function // exec(0 0, float64(img.W), float64(img.H), img) var call imgut.PixelFunc = func(x, y float64) float64 { return float64(exec.Eval(binary.NumericIn(x), binary.NumericIn(y))) } img.FillMathBounds(call) }
func Draw(ind *node.Node, img *imgut.Image) { // We have to compile the nodes exec := node.CompileTree(ind).(vhs.Terminal) // Apply the function exec(0, 0, float64(img.W), float64(img.H), img) }
func Draw(ind *node.Node, img *imgut.Image) { // We have to compile the nodes renderer := node.CompileTree(ind).(*rr.Primitive) // Apply the function renderer.Render(0, 0, float64(img.W), float64(img.H), img) }