Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function love.load() -- do global variables get declared here?
- windowwidth = 1000
- windowheight = 1000
- sucess = love.window.setMode(windowwidth, windowheight)
- end
- function plot(x, Xmin, Xmax, Ymin, Ymax)
- for i = Xmin, Xmax do
- love.graphics.line(i, -i^2, i+1, -(i+1)^2)
- end
- end
- function love.draw() -- render to window
- x = -windowwidth
- love.graphics.setColor(200/255, 215/255, 0/255)
- love.graphics.translate(windowwidth/2, windowheight/2)
- love.graphics.setLineWidth(0.1)
- plot(2, -10, 10, -10, 10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement