¼öÇÐ :: zap :: Triangle2.

¼öÇÐ :: ZAP :: TRIANGLE2 - 2D °ø°£ÀÇ »ï°¢Çü.
Áö±Ý ´Ù¿î·Îµå

¼öÇÐ :: zap :: Triangle2. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Philip R. Brenan
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://search.cpan.org/~prbrenan/Math-Zap-1.07/lib/Math/Zap/Triangle2.pm

¼öÇÐ :: zap :: Triangle2. ű×


¼öÇÐ :: zap :: Triangle2. ¼³¸í

¼öÇÐ :: ½á :: Triangle2 - 2D °ø°£¿¡¼­ »ï°¢Çü. ¼öÇÐ :: ½á :: Triangle2 - 2D space.SynopsisExample¿¡¼­ »ï°¢Çü t / triangle2.t #_ »ï°¢Çü ___________________________________________________________ # Å×½ºÆ® 2D »ï°¢Çü # philiprbrenan@yahoo.com 2004, ÆÞ ¶óÀ̼¾½º #______________________________________________________________________ »ç¿ë ¼öÇÐ :: ½á :: Triangle2; »ç¿ë ¼öÇÐ :: ½á :: Vector2; »ç¿ë Å×½ºÆ® :: °£´ÜÇÑ Å×½ºÆ® => 27; A = $ triangle2 (vector2 (0, 0), vector2 (2, 0), vector2 (0, 2)); triangle2 = $ B (vector2 (0, 0), vector2 (4, 0), vector2 (0, 4)); $ C = triangle2 (vector2 (0, 0), vector2 (-4, 0) vector2 (0, -4)); $ D´Â B = $ - vector2 (1,1); $ E = $ C vector2 + (1,1); #print "A = $ ANB = $ BNC = $ CND = $ DNE = $ ¾û"; È®ÀÎ ($ A-> containsPoint (vector2 (1, 1))); È®ÀÎ ($ A-> containsPoint (vector2 (1, 1))); È®ÀÎ ($ B-> containsPoint (vector2 (2, 0))); È®ÀÎ ($ B-> containsPoint (vector2 (1, 0))); OK ($ C-> containsPoint (vector2 (-1, 0))); È®ÀÎ ($ C -> containsPoint (vector2 (-2, 0))); OK ($ D-> containsPoint (vector2 (1, -1))); È®ÀÎ ($ A-> containsPoint (vector2 (9, 1))!); È®ÀÎ ($ A-> containsPoint (vector2 (1, 9))!); È®ÀÎ ($ B-> containsPoint (vector2 (2, 9))!); È®ÀÎ ($ B-> containsPoint (vector2 (9, 0))!); È®ÀÎ ($ C -> containsPoint (vector2 (-9, 0))!); È®ÀÎ ($ C -> containsPoint (vector2 (-2, 9))!); È®ÀÎ (! $ D-> containsPoint (vector2 (9, -1))); È®ÀÎ ($ A-> containsPoint (vector2 (0.5, 0.5))); È®ÀÎ (! $ A-> containsPoint (vector2 (-1, -1))); È®ÀÎ (vector2 (1,2) -> rightAngle == vector2 (-2, 1)); È®ÀÎ (vector2 (1,0) -> rightAngle vector2 == (0, 1)); OK ($ A-> ¿µ¿ª == 2); OK ($ C-> ¿µ¿ª == 8); Æò°¡ {triangle2 (vector2 (0, 0), vector2 (3, -3), vector2 (-3, 6))}; È®ÀÎ ($ @ = ~ / ^ Á¼Àº triangle2 /, 'Á¼Àº »ï°¢Çü'); t = $ triangle2 (vector2 (0,0), vector2 (0,10) vector2 (10,0)); T = $ triangle2 (vector2 (0,0), vector2 (0,10) vector2 (-10,10)) + vector2 (5, -2); @p = $ T-> °í¸® ($ T); #print (@p)¿¡ ´ëÇÑ "$ _n"; OKÀÇ ($ P == vector2 (0, 8), "¸µ 0"); OKÀÇ ($ P == vector2 (2, 8), '¹ÝÁö 1'); OKÀÇ ($ P == vector2 (5, 5) ', ¸µ (2')); OKÀÇ ($ P == vector2 (5, 0), "¸µ 3 '); OKÀÇ ($ P == vector2 (3, 0) "¸µ (4 ')); OK ($ ÇÇ == vector2 (0, 3), '¸µ (5)') ¿ä±¸ ¡¤ ÆÞ


¼öÇÐ :: zap :: Triangle2. °ü·Ã ¼ÒÇÁÆ®¿þ¾î