#lang racket
(require 2htdp/universe 2htdp/image lang/posn)
(struct world (posn1 posn2 posn3 posn4))
(define *hoshida* .)
(define *background* (empty-scene 480 480))
(define (place-hoshida w)
(place-images (make-list 4 *hoshida*)
`(,(world-posn1 w) ,(world-posn2 w) ,(world-posn3 w) ,(world-posn4 w))
*background*))
(define (place-hoshida-on-tick w)
(let
((matrix `
((,(cos 1/28) ,((compose
- sin) 1/28)) (posns `(,(world-posn1 w) ,(world-posn2 w) ,(world-posn3 w),(world-posn4 w))))
(apply world
(map (lambda (k)
(apply make-posn k))
(map (lambda (i)
(let ((x (posn-x i)) (y (posn-y i)))
(map (lambda (j)
(+ (* (car j) (- x 240)) (* (cadr j) (- y 240)) 240))
matrix))) posns)))))
(big-bang (world (make-posn 360 240) ;; 座標初期値
(make-posn 240 360)
(make-posn 120 240)
(make-posn 240 120))
(on-tick place-hoshida-on-tick) ;; ここで単位時間毎に座標データを更新する
(to-draw place-hoshida))
I2xhbmcgcmFja2V0CgoocmVxdWlyZSAyaHRkcC91bml2ZXJzZSAyaHRkcC9pbWFnZSBsYW5nL3Bvc24pCgooc3RydWN0IHdvcmxkIChwb3NuMSBwb3NuMiBwb3NuMyBwb3NuNCkpCgooZGVmaW5lICpob3NoaWRhKiAuKQoKKGRlZmluZSAqYmFja2dyb3VuZCogKGVtcHR5LXNjZW5lIDQ4MCA0ODApKQoKKGRlZmluZSAocGxhY2UtaG9zaGlkYSB3KQogIChwbGFjZS1pbWFnZXMgKG1ha2UtbGlzdCA0ICpob3NoaWRhKikKICAgICAgICAgICAgICAgIGAoLCh3b3JsZC1wb3NuMSB3KSAsKHdvcmxkLXBvc24yIHcpICwod29ybGQtcG9zbjMgdykgLCh3b3JsZC1wb3NuNCB3KSkKICAgICAgICAgICAgICAgICpiYWNrZ3JvdW5kKikpCgooZGVmaW5lIChwbGFjZS1ob3NoaWRhLW9uLXRpY2sgdykKICAobGV0ICgobWF0cml4IGAoKCwoY29zIDEvMjgpICwoKGNvbXBvc2UgLSBzaW4pIDEvMjgpKQogICAgICAgICAgICAgICAgICAoLChzaW4gMS8yOCkgLChjb3MgMS8yOCkpKSkKICAgICAgICAocG9zbnMgYCgsKHdvcmxkLXBvc24xIHcpICwod29ybGQtcG9zbjIgdykgLCh3b3JsZC1wb3NuMyB3KSwod29ybGQtcG9zbjQgdykpKSkKICAgIChhcHBseSB3b3JsZAogICAgICAgICAgIChtYXAgKGxhbWJkYSAoaykKICAgICAgICAgICAgICAgICAgKGFwcGx5IG1ha2UtcG9zbiBrKSkKICAgICAgICAgICAgICAgIChtYXAgKGxhbWJkYSAoaSkKICAgICAgICAgICAgICAgICAgICAgICAobGV0ICgoeCAocG9zbi14IGkpKSAoeSAocG9zbi15IGkpKSkKICAgICAgICAgICAgICAgICAgICAgICAgIChtYXAgKGxhbWJkYSAoaikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKyAoKiAoY2FyIGopICgtIHggMjQwKSkgKCogKGNhZHIgaikgKC0geSAyNDApKSAyNDApKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRyaXgpKSkgcG9zbnMpKSkpKQoKKGJpZy1iYW5nICh3b3JsZCAobWFrZS1wb3NuIDM2MCAyNDApIDs7IOW6p+aomeWIneacn+WApAogICAgICAgICAgICAgICAgIChtYWtlLXBvc24gMjQwIDM2MCkKICAgICAgICAgICAgICAgICAobWFrZS1wb3NuIDEyMCAyNDApCiAgICAgICAgICAgICAgICAgKG1ha2UtcG9zbiAyNDAgMTIwKSkKICAob24tdGljayBwbGFjZS1ob3NoaWRhLW9uLXRpY2spIDs7IOOBk+OBk+OBp+WNmOS9jeaZgumWk+avjuOBq+W6p+aomeODh+ODvOOCv+OCkuabtOaWsOOBmeOCiwogICh0by1kcmF3IHBsYWNlLWhvc2hpZGEpKQ==