Created
September 18, 2016 21:50
-
-
Save floogulinc/dc0664f45a2998d3f38d058a58bd852e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; The first three lines of this file were inserted by DrRacket. They record metadata | |
;; about the language level of this file in a form that our tools can easily process. | |
#reader(lib "htdp-beginner-reader.ss" "lang")((modname |random cat slideshow|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp")) #f))) | |
(define width 1024) | |
(define height 768) | |
(define half-h (/ height 2)) | |
(define half-w (/ width 2)) | |
(define blank-scene (empty-scene width height)) | |
(define (random-cat w h) (bitmap/url (string-append "http://theoldreader.com/kittens/" (number->string w) "/" (number->string h) "/"))) | |
(define (animation f) | |
(place-image (random-cat width height) half-w half-h blank-scene)) | |
(animate animation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment