¼öÇÐ :: °î¼± :: Hilbert.Èú¹öÆ® °ø°£ ÃæÀü °î¼±ÀÇ Perl ±¸Çö | |
Áö±Ý ´Ù¿î·Îµå |
¼öÇÐ :: °î¼± :: Hilbert. ¼øÀ§ ¹× ¿ä¾à
±¤°í
- ƯÇã:
- Perl Artistic License
- °¡°Ý:
- FREE
- °Ô½ÃÀÚ À̸§:
- Aaron James Trevena
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~teejay/
¼öÇÐ :: °î¼± :: Hilbert. ű×
¼öÇÐ :: °î¼± :: Hilbert. ¼³¸í
Èú¹öÃ÷ °ø°£ ÃæÀü °î¼±ÀÇ ÆÞ¹ö½º ±¸Çö Math :: Curve :: Hilbert´Â Hilberts Space-Filling Curve¸¦ »ç¿ëÇÏ¿© À¯¿ëÇÑ ±â´ÉÀ» Á¦°øÇÏ´Â Perl ¸ðµâÀÔ´Ï´Ù. ÀÌ°ÍÀº µð´õ¸µ°ú °°Àº °Íµé¿¡ ´ëÇØ Æí¸®ÇÕ´Ï´Ù. °¢°¢ 2-D, 3-D ¶Ç´Â ND °ø°£ÀÇ ÇÏÀÌÆÛ º¼·ý, °¢ Á¡Àº ÇÑ ¹ø¸¸ ¹æ¹®Çϸç ÇÑ ¹ø¸¸ ¹æ¹®ÇÕ´Ï´Ù (°î¼±Àº ±³Â÷ÇÏÁö ¾ÊÀ½). °ø°£ ÃæÀü °î¼±. " °ø°£ µ¥ÀÌÅͺ£À̽ºÀÇ ¿©·¯ ¹üÀ§ Äõ¸® ÃÖÀûÈ, Apostolos N. Papadopoulos ¹× Yannis Manolopoulosother Space Filling Curves¿¡´Â Peano ¹× Morton ¶Ç´Â Z-Order Curves°¡ ÀÖ½À´Ï´Ù. 'u'¸ð¾çÀÌ ¾Æ´Ñ 's'¸ð¾çÀÌÀÖ´Â Èú¹öÆ® II °î¼±µµ ÀÖ½À´Ï´Ù. Hilbert °î¼±Àº 3 Â÷¿ø¿¡µµ Àû¿ëµÉ ¼ö ÀÖÁö¸¸ÀÌ ¸ðµâÀº 2 Â÷¿ø¸¸À» Áö¿øÇÕ´Ï´Ù. ´ëºÎºÐÀÇ °ø°£ ÃæÀü °î¼±À» Áö¿øÇÕ´Ï´Ù.ÀÌ ¿µ¿ªÀº 8, 16, 32 µî°ú °°Àº N ºÎºÐÀÇ ÈûÀ¸·Î 2·Î ³ª´©¾î¾ßÇÕ´Ï´Ù. ¼öÇÐ :: °î¼± :: Hilbert; # 10 ´Ü°è (Áï, 80x80 Çȼ¿ ±×¸®±â)·Î 8x8 °î¼±À» ³ªÅ¸³»´Â °³Ã¼ °¡Á® ¿À±â My $ hilbert = math :: °î¼± :: hilbert-> new (direction => 'up', max => 3, ½Ã°è ¹æÇâ => 1, ´Ü°è => 10); # ÁÂÇ¥¿¡¼ $ Point = $ Hilbert-> PointFromCoordinates (20,60) ÁÂÇ¥¿¡¼ Á¡À» ¾ò½À´Ï´Ù. # ³» ($ x, $ y) = $ hilbert-> coordinatesFrompoint ($ point)¿¡¼ ÁÂÇ¥¸¦ ¾òÀ¸½Ê½Ã¿À. # Box¿¡¼ @ranges = $ hilbert-> rangeFromCoordinates ($ x1, $ y1, $ x2, $ y2); # # °î¼±À» ³ªÅ¸³»´Â À̹ÌÁö ±×¸®±â GD; # »õ À̹ÌÁö ¸¸µé±â My $ IM = »õ GD :: À̹ÌÁö (300,300); ³» $ BLACK = $ IM-> colorAllocate (0,0,0); MY $ BLUE = $ IM-> ColorAllocate (0,0,255); ³» $ count = 0; MY ($ x1, $ y1) = $ hilbert-> coordinatessfrompoint ($ count ++); while (($ hilbert-> coordinatesFrompoint ($ count)) ) {my ($ x2, $ y2) = $ hilbert-> coordinatesFrompoint ($ count ++); $ IM-> ¼± ($ x1, $ y1, $ x2, $ y2, $ black); ($ x1, $ y1) = ($ x2, $ y2); } ¿ä±¸ »çÇ× : ¡¤ Perl.
¼öÇÐ :: °î¼± :: Hilbert. °ü·Ã ¼ÒÇÁÆ®¿þ¾î