Advertisement
joseleeph

Untitled

Apr 18th, 2021
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. function love.load() -- do global variables get declared here?
  2. windowwidth = 1000
  3. windowheight = 1000
  4. sucess = love.window.setMode(windowwidth, windowheight)
  5. end
  6.  
  7. function plot(x, Xmin, Xmax, Ymin, Ymax)
  8. for i = Xmin, Xmax do
  9. love.graphics.line(i, -i^2, i+1, -(i+1)^2)
  10. end
  11. end
  12.  
  13. function love.draw() -- render to window
  14. x = -windowwidth
  15. love.graphics.setColor(200/255, 215/255, 0/255)
  16. love.graphics.translate(windowwidth/2, windowheight/2)
  17. love.graphics.setLineWidth(0.1)
  18. plot(2, -10, 10, -10, 10)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement