Thirty-One Honeybees

Some of the source code

; Fun with insectile font.
; Quick and dirty.  Don't look here for good style.

(define (insects)
  (draw-to-file "G:/temp/insects.ps"
		(center-on-page
		 (insects-box 180 31 honeybee))))

(define (insects-png)
  (draw-to-file-for-png "insects1"
			(insects-box 180 31 honeybee)))

(define (insects-box r n bug)
  (let* ((dtheta (/ (* 2 pi) n))
	 (end (- (* 2 pi) (/ dtheta 2))))
    (do ((theta 0 (+ theta dtheta))
	 (box null-box
	      (overlay box
		       (at (* r (cos theta))
			   (* r (sin theta))
			   (bug (vec (- 0 (sin theta))
				     (cos theta)))))))
	((> theta end) box))))


; Replaces (segment v)

(define (ant v) (insect "A" v))
(define (honeybee v) (insect "H" v))

(define (insect string v)
  (rotate-box (- (radians->degrees (atan (vec-y v) (vec-x v))) 90)
	      (text-box .5 string)))

(define font-family-name "Insectile")
(define font-size 24)			;height in points

Generated with much assistance from Scheme 48 and Aladdin ghostscript.

Insectile font copyright 1995 P22 type foundry.