No banners, make a banners thread

/g/ - Technolo/g/y

No encryption or P2P talk


New Reply on thread #165
X
Max 20 files0 B total
[New Reply]

Index | Catalog | Banners | Logs
Posting mode: Reply [Return]


thumbnail of 6a00d8341d3df553ef016763543dd6970b.png
thumbnail of 6a00d8341d3df553ef016763543dd6970b.png
6a00d8341d3df553ef016... png
(2.43 MB, 4400x2479)
 >>/165/

               ⣀⣤⣾⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀
             ⠐⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⡟⣿⣿⣶⣄⡀
             ⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣸⣿⣇⣿⣿⣿⣿⣿⣆
             ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣻⣿⡄
            ⢸⣿⣿⣿⣿⣿⣿⣿⣿⡿⠍⠙⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡇
            ⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⣱⣾⠟ ⢠⠉⠉⠉⠻⣿⣿⡇
            ⣽⣿⣿⣿⣿⣿⡿⠛⣡⣶⣿⣧⣤⠸⡟⠂   ⢹⣿⡇
           ⢀⣾⣿⣿⣿⣿⠇ ⢈⣥⣿⣿⣿⣿⣿⣷⣆⢰⣆ ⢸⡏
           ⣸⣿⣿⣏⣿⡏ ⣾⣾⣿⣿⣿⣿⣿⣿⣿⣿⢻⣿⣷⣾⡃
           ⠹⣿⣿⣿⣿⣷⡄⠘⠹⢿⣿⣍⠉⢛⣿⣿⣿⠸⣿⣿⠿⠁   .``````.
            ⢹⢿⣿⣿⣿⣿⣦⣀⣿⣿⣿⣶⣾⣿⣿⣿⡇⠁⠈⡄    : That's not much. :
            ⡟⢺⣿⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟ ⡺⠁   ...................
           ⢸ ⢸⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣏⣻⡶⠁  .'
          ⢀⡿ ⣿⡏⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣬⣿⠇ -'
⣤⣶⣶⣿⣿⡛⠻⠿⣿⡿⠛⠁⢰⣿⣿⠃⢘⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏
⣿⣿⣅⠄⢉⣙⣿⣿⡟   ⠘⣿⡇  ⣿⣦⣿⣿⣿⣿⣿⣿⣿⣟⣻⠇
⣿⣿⣿⣿⣿⣿⣿⠇ ⣸ ⡇⢠⣿⣧ ⢠⣿⡿⢿⠿⠋⠙⠛⠛⠛⠛⠋⢀
⣿⣿⠏⣸⣿⣿⣿⣧   ⣷⠸⣿⠃⣴⣿⡟⠙⠁     ⣾⣄⣀⡀⠉⠢⣀
⣿⣿⣶⣬⣿⣿⣿⣿⣦⡄⣀⡿ ⣿⣿⣇⠹⣷⣤⣾⠇   ⣰⣿⣿⣿⣿⣆ ⠈⠳⡀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ ⢰⣿⣿⡿⢶⣿⣿⡟⢀⣤ ⣰⣿⣿⣿⣿⡿⣭⣷⣄⡀⠘⢄
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⣼⣿⣿⣧⣾⣿⢿⡷⠟⠉ ⠹⠟⠛⢉⠁⡀⠈⠉⠉⠑⢦⡈⠳⡀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠙⢿⣿⣿⣿⣿⠉ ⢀⡉⡦⠄    ⣿ ⠠⠄    ⠑⠠⠉⠒⢄⡀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⢘⣿⣿⢋⠍⢿⣶⣽⣿⡿⢿⡄  ⣸⡯⡄           ⠙
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣾⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣷⣶⣾⣿⣤⣷⣶⣄⣰⣤⣀⣀⣀⣀⣀⣀⣀⣀



thumbnail of j4.gif
thumbnail of j4.gif
j4 gif
(22.88 KB, 300x200)
thumbnail of j8.gif
thumbnail of j8.gif
j8 gif
(46.96 KB, 300x200)
Making gifs with Racket

#lang racket
(require 2htdp/image)
(require lang/posn)

;; Convert degrees to radians
(define (radians degree)
  (* degree (/ pi 180)))

;; https://www.mathsisfun.com/polar-cartesian-coordinates.html
(define (coord length degree)
  (list (* length (cos (radians degree)))
        (* length (sin (radians degree)))))

;; algorithmically generate
(define (rays [count 4] [length 100])
  (let* ([width (/ 360 (* 2 count))]
         [initial (- 0 (/ width 2))])
    (for/fold ([posns '()])
              ([i (range count)])
      (append posns (list (list 0 0)
                          (coord length (- (* (* 2 i) width) (/ width 2)))
                          (coord length (+ (* (* 2 i) width) (/ width 2))))))))

;; https://www.crwflags.com/fotw/flags/jp%5E.html
(define (japan-naval #:width [width 300]
                     #:turn  [turn 0]
                     #:fg    [fg (make-color 188 0 45)]
                     #:bg    [bg "white"])
  (let* ([height (/ width 3/2)]
         [radius (/ height 4)]
         [offset (- radius (/ radius 3))]
         [uncropped (overlay/offset
                     (overlay
                      (circle radius "solid" fg)
                      (rotate turn
                              (polygon
                               (map (lambda (xy) (apply make-posn xy))
                                    (rays 16 width)) "solid" fg)))
                     ;; move rectangle $offset pixels to the right
                     offset 0 
                     (rectangle width height "solid" bg))]
         [x (- (/ (image-width  uncropped) 2) (/ width  2) (- offset))]
         [y (- (/ (image-height uncropped) 2) (/ height 2))]
         [cropped (crop x y width height uncropped)])
    cropped))


To generate frames:

(require racket/format)
(for ([i (range 8)]) (save-image (japan-naval #:turn (* 45/16 i)) (string-join (list "j" (~a i #:align 'right #:width 2 #:pad-string "0") ".png") "")))


I then used gimp to load each image into a layer and export an animated gif.



Post(s) action:


Moderation Help
Scope:
Duration: Days

Ban Type:


0 replies | 0 file
New Reply on thread #165
Max 20 files0 B total