PasteRack.org
Paste # 69200
2021-03-02 21:46:07

Fork as a new paste.

Paste viewed 128 times.


Embed:

Threefold Symmetry II

  1. #lang htdp/bsl
  2. (require picturing-programs)
  3.  
  4. (define pt (right-triangle 100 50 "solid" "purple"))
  5. (define pti (right-triangle 100 50 "solid" "transparent"))
  6. (define step1 (rotate 27 pt))
  7. (define step2 (flip-vertical step1))
  8. (define gap (square 5 "solid" "transparent"))
  9.  
  10. (define triangle-assembly (rotate -90 (above step2 gap step1)))
  11.  
  12. (define base-1 (circle 90 "solid" "lightgreen"))
  13. (define words (text "base" 48 "gray"))
  14. (define base-2 (overlay words base-1))
  15.  
  16. (define base-3
  17.   (crop-top  base-2 15))
  18. (define base-4
  19.   (rotate 120 (crop-top (rotate -120 base-3)
  20.                         15)))
  21. (define base-5
  22.   (rotate -120 (crop-top (rotate 120 base-4)
  23.                          15)))
  24.  
  25. (define step3
  26.   (above triangle-assembly
  27.          gap gap gap
  28.          base-5))
  29.  
  30. (define step4a (rotate 120 step3))
  31. (define step4b (above triangle-assembly
  32.                       gap gap gap
  33.                       step4a))
  34. (define step5a (rotate 120 step4b))
  35. (define step5b (above triangle-assembly
  36.                       gap gap gap
  37.                       step5a))
  38.  
  39. "This is a picture of what you could reasonably do."
  40. "Notice the triangle placements are not perfect."
  41. (rotate 120 step5b)
  42.  
  43. ;; BOSS method
  44. ;; Put the first triangle assembly the way we did in class.
  45. ;; but put another invisible shape the same size on the other size of the circle to keep it balanced.
  46. ;; Measure the height of that to make an invisible circle to guide the placement of the other parts.
  47.  
  48. "This method shows what you can do if you really think about it."
  49.  
  50. (define step1i (rotate 27 pti))
  51. (define step2i (flip-vertical step1i))
  52. (define invisible-triangle-assembly (rotate-ccw (above step2i gap step1i)))
  53.  
  54. (define step3i
  55.   (above triangle-assembly
  56.          gap gap gap
  57.          base-5
  58.          gap gap gap
  59.          invisible-triangle-assembly))
  60.  
  61. (define boss (circle (* 1/2 (image-height step3i)) "solid" "transparent"))
  62. (define step3-boss (overlay step3i boss))
  63.  
  64.  
  65. (define b4a (rotate 120 step3-boss))
  66. (define b4b (overlay/align "middle" "top" triangle-assembly b4a))
  67.  
  68. (define b5a (rotate 120 b4b))
  69. (define b5b (overlay/align "middle" "top" triangle-assembly b5a))
  70.  
  71. (rotate 120 b5b)
  72.  

=>