> ºÇ¶á¿ô³ØI¤ËÆþ¤ê¤Þ¤·¤¿¡£
¿ô³ØI¤Î¼¡¤Ï¿ô³ØA¤ËÆþ¤ë¤È»×¤¤¤Þ¤¹¡£
Wikipedia¤Î¡Ö¿ô³Ø (¶µ²Ê)¡×¤Î¹àÌܤò¸«¤Ê¤ª¤·¤Æ¤ß¤¿¤ó¤Ç¤¹¤¬¡¢¿ô³ØI¡Ö¿Þ·Á¤È·×Î̡פǤâ³Ø¤Ö¤è¤¦¤Ç¤¹¡£
¿ô³ØI¤Î¶µ²Ê½ñ¤ÎÌܼ¡¤Ë»°³ÑÈæ¤È¤«Àµ¸¹¤È¤«¤¢¤ë¤È»×¤¤¤Þ¤¹¡£
ÆþÌç·Ï¥µ¥¤¥È¤È¶µ²Ê½ñ¤ÈξÊý»È¤¨¤Ð¤¹¤°¤Ë¥²¡¼¥à¤Ë»È¤¨¤ëÄøÅÙ¤ÎÍý²ò¤ÏÆÀ¤é¤ì¤ë¤È¤ª¤â¤¤¤Þ¤¹¡£
¶ñÂÎŪ»ÈÍÑÎã½ñ¤¤¤Æ¤ß¤¿¤Î¤Ç¤³¤ì¤â»²¹Í¤Ë¤É¤¦¤¾¡£
;³ÑÅÙ½é´üÃÍ[ÅÙ]
deg = 0.0
;¥¦¥£¥ó¥É¥¦Ãæ¿´ºÂɸ
ctx = ginfo_winx/2
cty = ginfo_winy/2
;µ°Æ»¤ÎȾ·Â
rx = 100.0
ry = 50.0
;ÉÁ²è¤¹¤ë¿Þ·Á¤ÎȾ·ÂÀ£Ë¡
r = 10
*main
redraw 1 : await 16 : redraw 0 : color 255, 255, 255 : boxf : color : pos 0,0
; µ÷Î¥¤È³ÑÅÙ¤«¤éɽ¼¨°ÌÃÖ¤ò·×»»
;xÊý¸þȾ·Ârx¡¢yÊý¸þȾ·Âry¤ÎÂʱߵ°Æ»
x = rx * sin(deg2rad(deg))
y = ry * cos(deg2rad(deg))
;ÅÙ¢ª¥é¥¸¥¢¥ó¤ÎÊÑ´¹¥µ¥ó¥×¥ë
;mes "" + deg + "[ÅÙ] = " + deg2rad(deg) + "[rad]"
;mes "" + deg + "[ÅÙ] = " + (deg*M_PI/180) + "[rad]" ;deg2rad¤ÎÃæ¿È¤Ï¤³¤ó¤Ê¼°
;¿¿¤óÃæ¤ËÊ¿¹Ô°ÜÆ°
x += ctx
y += cty
; µ°Æ»
circle ctx - rx, cty - ry, ctx + rx, cty + ry, 0
; ºÂɸ¡Êx,y¡Ë¤Ë¿Þ·Á¤òÉÁ²è
circle x-r, y-r, x+r, y+r
; ¼¡¤Î³ÑÅ٤˰ÜÆ°
deg += 1.0
goto *main
¤½¤¦¤Ç¤·¤¿¡££±¤ÄÀâÌÀ¤¬É¬ÍפÊÅÀ¤¬¤¢¤ê¤Þ¤·¤¿¡£
sinÌ¿ÎáÅù¤Ç¤Ï³ÑÅ٤ϡ֥饸¥¢¥ó(rad)¡×¤È¤¤¤¦Ã±°Ì¤Ç»ØÄꤷ¤Þ¤¹¡£¡ÖÅ١פǤϤʤ¤¤Î¤ÇÃí°Õ¤Ç¤¹¡£
ÊÑ´¹¤Ï´Êñ¤Ç¡¢deg2rad´Ø¿ô¤Ë¡ÖÅ١פοôÃͤòÆþ¤ì¤ì¤Ð¡Ö¥é¥¸¥¢¥ó¡×¤ÇÊÖ¤·¤Æ¤¯¤ì¤Þ¤¹¡£
¤Ê¤Î¤Ç»È¤¦¤È¤¤Ï¡Ösin(deg2rad(ÅÙ))¡×¤È¤¤¤¦¤è¤¦¤Ë»È¤¤¤Þ¤¹¡£
¿ô³Ø¤Î³Ø½¬ÆâÍƤò¤Þ¤¸¤Þ¤¸¤Èį¤á¤Æ¤¤¤¿¤Î¤Ç¤¹¤¬¡¢¿ô³Ø¤Ã¤Æ¥²¡¼¥à¤Ë»È¤¨¤ëÆâÍƤФ䫤ê¤Ç¤¹¤Í¡£
¤É¤Î¹àÌܸ«¤Æ¤â¥²¡¼¥à¤Ë»È¤¤¤¦¤ë¤â¤Î¤Ð¤«¤ê¤Ç¤¤¤Þ¤µ¤é¤Ê¤¬¤é¤Ó¤Ã¤¯¤ê¤Ç¤¹¡£