Skip to content

Instantly share code, notes, and snippets.

@floogulinc
Created September 18, 2016 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floogulinc/dc0664f45a2998d3f38d058a58bd852e to your computer and use it in GitHub Desktop.
Save floogulinc/dc0664f45a2998d3f38d058a58bd852e to your computer and use it in GitHub Desktop.
;; 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