Advertisement
linesguy

Image scaling test

Mar 3rd, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. 0 rem note: this program slows down the bigger the image is.
  2.  
  3. 1 rem setup:
  4. 2 hgr2
  5.  
  6. 10 rem initial values:
  7. 20 K$ = "11111111111111111111111111111111001111111111001111111111000111110011111000111111000001111000011110000011100000001110000111000000011000000000000000000000000100000000000000000000000000000000000000000000000000001000000000000000000000000110000110001000010001100001110011111111001111111100111110011111110011111110011111111111111111111111111111"
  8. 30 s = 0.3 : rem speed of scaling, lower values looks smoother.
  9. 40 z = 2 : rem multiplier for maximum image size
  10. 50 n = 3
  11.  
  12. 200 rem rendering engine loop:
  13. 210 Poke 230,32 : gosub 300 : Poke 49236,0 : poke 230,64 : gosub 300 : poke 49237,0 : goto 210
  14.  
  15. 300 rem index:
  16. 310 hcolor = 0 : gosub 1000 : rem clear screen
  17. 320 hcolor = 3 : gosub 2000 : rem image scaling test
  18.  
  19. 900 return
  20.  
  21. 1000 hplot 0,0 : call -3082 : return
  22.  
  23. 2000 for y1 = 1 to 13 : for x1 = 1 to 26 : x = x + (sin(n)+1)*z : q = q + 1 : hcolor = val(mid$(K$,q,1))*3 : for x2 = x to x+(sin(n)+1)*z : for y2 = y to y+(sin(n)+1)*z : hplot x2,y2 : next : next
  24. 2010 next : x = 0 : y = y + (sin(n)+1)*z : next : n = n + s : q = 0 : x = 0 : y = 0 : return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement