[ 01 敘利亞大馬士革清真寺-幾何圖樣-程式說明 ]
        
      
        
  679
 
  
  0
   
      
      
        ·
      
      
        2019/10/04
      
      
        ·
      
      
        2 mins read
      
      
        ☕
      
    WriterShelf™ is a unique multiple pen name blogging and forum platform. Protect relationships and your privacy. Take your writing in new directions. ** Join WriterShelf**
      
        WriterShelf™ is an open writing platform. The views, information and opinions in this article are those of the author.
      
  
          Article info
        
        
    This article is part of:
  
    
              Categories:
            
            
                    
⟩
⟩
                  
                  
                    
⟩
⟩
                  
                  
                    
⟩
⟩
                  
            
              Tags:
            
            
              Date:
            
            
              Published: 2019/10/04 - Updated: 2021/01/25
            
          
              Total: 405 words
          
      
              Like
              
              or Dislike
              
            
          About the Author
          幾何觀世界,中心定元圓
        More to explore
      
      


[ SVG animation for SYR0130 IGP ]
duration : 40 seconds
http://syr0130-great-mosque-damascus--p3artschool.repl.co/
任意一個以 (0, 0) 為圓心, r0 為半徑之圓形, 其內接正六邊形的單邊長等於 r0,
如以 r1 = r0/6 為小正六邊形的單邊長, 我們可以推導得到上面的圖形,
並求出各個小正六邊形的中心點坐標。
#
紅色正六邊形可編序為
RU -- 右上
LU -- 左上
L -- 左
LD -- 左下
LR -- 右下
R -- 右
函數 getHexCornerXY(p1, r1, cornor) 可求得以p1為中心點, 單邊長為 r1 的正六邊形任一角點的坐標值, cornor 值為 0,1,2,3,4,5 分別表示 Hex[0], Hex[1], Hex[2], Hex[3], Hex[4], Hex[5]
所以可推導得到新中心點
函數 drawHex_by_width(p1, r1, 線顏色, 線寬) 可繪製以p1為中心點, 單邊長為 r1 的正六邊形
千辛萬苦, 先求紅色正六邊形的中心點, 再求相對角點的坐標值,
以此相對角點的坐標值為新中心點, 繪出綠色正六邊形。
(待續 . . . )