|
| ̤²ò·è |
| ²ò·è |
| Ää»ß |
| ºï½üÍ×ÀÁ |
|
2024/4/14(Sun) 13:13:08|NO.101521
[gppraytest]¥Ø¥ë¥×¤Î²òÀâ¤Ë¤¢¤ë¤è¤¦¤Ë¡¢[getwork]¤ÇÆÀ¤é¤ì¤¿Ãͤϡ¢¾×ÆͺÂɸ¤Ç¤¢¤ê¡¢
¤Þ¤¿¡¢[getwork2]¤Î¼èÆÀÃͤϡ¢[getwork]¤Î¼èÆÀºÂɸ¤«¤é¤ÎË¡Àþ¥Ù¥¯¥È¥ë¤Ç¤¢¤ë¤³¤È¤âʬ¤«¤ê¤Þ¤¹¡£
¤¿¤À¡¢¤³¤Î[getwork2]¤Î¼èÆÀÃͤò³ÑÅÙÃͤȤ·¤ÆÍøÍѤǤ¤ë¤Î¤Ç¤Ï¤Ê¤¤¤«¤È¤â»×¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
½é¿´¼ÔƱÁ³¤Î»ä¤Ï¡¢¡Ö¥Ù¥¯¥È¥ë¡×¤Î³µÇ°¤È¡Ö³ÑÅ١פγµÇ°¤Î´Ø·¸¤¬¤è¤¯Íý²ò¤Ç¤¤Æ¤¤¤Ê¤¤¤Þ¤Þ¡¢
°ÊÁ°¡¢¤³¤Î[getwork2]¤Î¼èÆÀÃͤò³ÑÅ٤Τ褦¤Ë´ª°ã¤¤¤·¤Æ¤¤¤Þ¤·¤¿¡£
¤½¤·¤Æ¡¢º£¼è¤êÁȤó¤Ç¤¤¤ë¥²¡¼¥à¥×¥í¥°¥é¥à¤Ë³ÑÅÙÃͤȤ·¤ÆÍøÍѱþÍѤ·¤¿¤È¤³¤í¡¢
¼ÂºÝ¤Ê¤ó¤È¤«¤Ê¤Ã¤Æ¡¢½ÐÍè¤Æ¤·¤Þ¤Ã¤¿¤«¤é¤Ç¤¹¡£
¶ñÂÎŪ¤Ë¸À¤¤¤Þ¤¹¡£
¡ÖY->X->Z¤Î½çÈÖ¡×ÀßÄê¤Î [setangy]¤Ç¤Ê¤é¤Ð¡¢¤½¤Î£Ù¼´¤Î¸þ¤¤Ç¤Î£Ø,£Ú¼´²óž¤ÎÀßÄê¤Ë¤Ê¤ë¤Ï¤º¤À¤«¤é¡¢
°ìö¡¢[getwork2] ¤ÎÃͤò¡¢[setangy] ¤Ç¡¢¤½¤Î½çÈÖ¤ÇÀßÄꤷ¤Þ¤¹¡£
> getwork2 id_null, vector_x,vector_y,vector_z
> setangy obj_model, vector_x,vector_y,vector_z
¤³¤¦¤ä¤Ã¤Æ²óž¤µ¤»¤¿¸å¡¢[addang] ¤Ç¡¢£Ù¼´¤À¤±¤½¤Îʬ [¡¼] ¤·¤Æ¸µ¤ËÌᤷ¤Æ¤ä¤ê¤Þ¤¹¡£
> addang obj_model, 0.0, -vector_y, 0.0
¤³¤ì¤Ç¡¢¡Öobj_model¡×¤Ë¤Ï¡¢£Ø¼´¤È£Ú¼´¤À¤±¤Î²óž¤¬»Ä¤ê¤Þ¤¹¡£¤½¤·¤Æ¡¢¤½¤Î¾å¤Ç¡¢
[¢«,¢ª]Åù¤Î¥¡¼Áàºî¤Ë¤è¤ë¡Öobj_model¡×¤Î²óž³ÑÅÙ(£Ù_ang)¤ò£Ù¼´¤Ë [¡Ü] ¤·¤Æ¤ä¤ë¤Î¤Ç¤¹¡£
> addang obj_model, 0.0, (£Ù_ang), 0.0
¤³¤¦¤¹¤ë¤³¤È¤Ç¡¢¥Ç¥³¥Ü¥³¤ÊÃÏÌ̤Ρ¢¤¢¤ëÃÏÅÀ¤ÎÁ°¸åº¸±¦¤Î·¹¤¤ò¼èÆÀºÆ¸½ÍøÍѤǤ¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¡£
¤³¤ì¤¬¡¢¥Ç¥³¥Ü¥³ÃÏÌÌÁö¹Ô»þ¤Î¼Ö¤Î·¹¤ºÆ¸½¤Ë¤Ê¤ë¤Î¤Ç¤¹¡£
»î¹Ôºø¸í¤Î²Ì¤Æ¤Ë¡¢¶öÁ³(¡©)¤É¤¦¤Ë¤«¤Ê¤Ã¤¿¤â¤Î¤Ê¤Î¤Ç¡¢¤³¤ÎÊýË¡¤¬¹Í¤¨¤È¤·¤Æ¤â¹ç¤Ã¤Æ¤¤¤ë¤Î¤«¡¢
¶µ¤¨¤Æ¤¤¤¿¤À¤±¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£
½ÐÍè¤ì¤Ð¡¢¡Ö¥Ù¥¯¥È¥ë¡×¤È¡Ö³ÑÅ١פγµÇ°¤«¤é¡¢ÀâÌÀ¤·¤Æ失¤ë¤È¡¢¤¢¤ê¤¬¤¿¤¤¤Ç¤¹¡£
| |
|
2024/4/14(Sun) 13:20:53|NO.101523
¸À¤¤Ëº¤ì¤Þ¤·¤¿¡£
¤³¤Î[getwork2]¤Ï¡¢¿¿²¼¸þ¤¤Î[id_null]¤Ç[gppraytest]¤·¤¿¤â¤Î¤Ç¤¹¡£
|
|
2024/4/15(Mon) 18:14:22|NO.101528
¡¡¤³¤ó¤Ë¤Á¤ï
¡¡¾Ü¤·¤¤¿ô³Ø¤Î¤³¤È¤ÏÀµÄ¾Ê¬¤«¤ê¤Þ¤»¤ó¡£
¡¡Ë¡Àþ¥Ù¥¯¥È¥ë¤È¤¤¤¦¤Î¤Ï¡¢Ì̤θþ¤¤¤Æ¤¤¤ëÊý¸þ¤òɽ¤¹xyz¤Ç¡¢³ÑÅ٤ǤϤʤ¯¡¢Ä¹¤µ1¤ÎÌð°õ¤¬»Ø¤·¼¨¤¹¥ï¡¼¥ë¥ÉxyzºÂɸ¤À¤Èǧ¼±¤·¤Æ¤¤¤Þ¤¹¡£
¡¡¥Ý¥ê¥´¥ó¤ÎÌ̤Ϥ¢¤é¤æ¤ëÊý¸þ¤ò¸þ¤¯²ÄǽÀ¤¬¤¢¤ê¤Þ¤¹¤¬¡¢Ä¹¤µ1¡ÊÀµµ¬²½¡Ë¤µ¤ì¤¿ºÂɸ¤Ê¤Î¤Ç¡¢¸¶ÅÀ¤¬¥¼¥í¤Ç¡¢È¾·Â1¤ÎµåÂΤÎɽÌ̤òɬ¤º¼¨¤¹xyzºÂɸ¤Ë¤Ê¤ë¤«¤Ê¤È¡£
¡¡¡Ê°ã¤Ã¤¿¤é¤¹¤¤¤Þ¤»¤ó¡Ë
¡¡Àµµ¬²½¤·¤Æ¤¤¤Ê¤¤¥Ù¥¯¥È¥ë¤Ï¡¢Ã±¤Ê¤ëºÂɸ¤ò¼¨¤¹¡Ê¤È¤¤¤¦¤Î¤ÏÀµ¤·¤¯¤Ê¤¤¤È»×¤¤¤Þ¤¹¤¬¡¢¤Þ¤¡¤¤¤¤¤ä¡£¡Ë
¡¡
¡¡¤¢¤ë¥Ù¥¯¥È¥ëA¤È¥Ù¥¯¥È¥ëB¤Î³°ÀѤò·×»»¤¹¤ë¡Êfvouter¡Ë¢ÍA¤ÈB¤Ëľ¸ò¤¹¤ë¥Ù¥¯¥È¥ëC¤¬ÆÀ¤é¤ì¤ë¡Ê3¤Ä¤ÎÃÍ¡¢xyz¤¬ÆÀ¤é¤ì¤ë¡£)
¡¡¤¢¤ë¥Ù¥¯¥È¥ëA¤È¥Ù¥¯¥È¥ëB¤ÎÆâÀѤò·×»»¤¹¤ë¡Êfvinner¡Ë¢Í¥Ù¥¯¥È¥ëC¤ò²óž¼´¤È¤·¤¿¾ì¹ç¤ÎA¤«¤éB¤Ø¤Î³ÑÅÙ¡Ê1¤Ä¤ÎÃͦȤ¬ÆÀ¤é¤ì¤ë¡£¡Ë
¡¡
¡¡----¤Ç¡¢¥Ç¥³¥Ü¥³¤ÎÃÏÌ̤ÎË¡Àþ¥Ù¥¯¥È¥ë¤Ë¤·¤¿¤¬¤Ã¤Æ¡¢¥â¥Ç¥ë¤Î³ÑÅÙ¤òÊѹ¹¤·¤¿¤¤-----
¡¡gppraytest¤ÇË¡Àþ¥Ù¥¯¥È¥ë¤ò¼èÆÀ¡£
¡¡
¡¡¥Ù¥¯¥È¥ëA¡Ê0,1,0¡Ë;¿¿¾å¤Î¥Ù¥¯¥È¥ë¡ÊY_UP)
¡¡¥Ù¥¯¥È¥ëB¡ÊË¡Àþ¥Ù¥¯¥È¥ë¡Ë¡¨raytest¤«¤é¼èÆÀ
¡¡A¤ÈB¤Î³°ÀÑ¡¡¥Ù¥¯¥È¥ëC¤òÆÀ¤ë¡£
¡¡A¤ÈB¤ÎÆâÀÑ¡¡³ÑÅ٦ȤòÆÀ¤ë
¡¡¥Ù¥¯¥È¥ëC¤È¤¤¤¦¼´¤Ç¦ÈÅٲ󞤷¤¿¥¯¥ª¡¼¥¿¥Ë¥ª¥óQ¤òÆÀ¤ë¡Ê¥æ¡¼¥¶¡¼´Ø¿ô¡Ë
¡¡¡Ê»ä¤Ç¤Ï¡¢¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤ò»È¤ï¤º¤ËǤ°Õ¼´²óž¤¬»×¤¤¤Ä¤¤Þ¤»¤ó¤Ç¤·¤¿¡Ë
¡¡¥¯¥ª¡¼¥¿¥Ë¥ª¥óQ¤Ë¸µ¡¹¤Î¥â¥Ç¥ë¤Î¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤ò¾è»»¡Ê¥æ¡¼¥¶¡¼´Ø¿ô¡Ë
¡¡·ë²Ì¤ò¥â¥Ç¥ë¤Ësetquat¤¹¤ë¡£¡£¡£
¡¡----
¡¡¤È¤¤¤¦¼ê½ç¤Ç¼Â¸½¤Ï¤Ç¤¤Þ¤·¤¿¤¬¡¢»ä¤Ë¤Ï¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤Î¥¹¥¯¥ê¥×¥È¤¬¤É¤¦¤·¤Æ¤âɬÍפǤ·¤¿¡£
¡¡¤³¤Î¤¢¤¿¤ê¤Î¿ô³ØŪÀâÌÀ¤Ï¤³¤ì°Ê¾å¤Ç¤¤Þ¤»¤ó¤¬¡¢¤È¤ê¤¢¤¨¤º²Äǽ¤Ç¤¹¡ÊÀâÌÀ¤Ë¤Ê¤Ã¤Æ¤Ê¤¤¤Ç¤¹¤Í¡£¤¹¤¤¤Þ¤»¤ó¡Ë
¡¡HSP¤Îɸ½àÌ¿Îá¤À¤±¤Ç¼Â¸½¤¹¤ë¤Ë¤Ï¡¢¤É¤Ê¤¿¤«¤Î¤ªÃηäòÇÒ¼Ú¤¹¤ë¤·¤«¡£¡¡
¡¡»²¹ÍÄøÅ٤ˤʤì¤Ð¤¤¤¤¤Î¤Ç¤¹¤¬¡£
¡¡ https://youtu.be/fBMef3dQP_U
¡¡¡Ê¤¬¤¯¤¬¤¯ÃÏÌ̤˱ƶÁ¤ò¼õ¤±¤Þ¤¹¡£Æ°²è¤Ï¤¤¤¤Ê¤ê³ÑÅÙ¤¬ÊѤï¤é¤Ê¤¤¤è¤¦¤ËÊä´°¤·¤Ê¤¬¤éÃÏÌ̤γÑÅÙ¤òŬÍѤ·¤Æ¤¤¤Þ¤¹¡£
;=============================================================================
;¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤Î¾è»»
;=============================================================================
#deffunc QuatMul array _q3,double x,double y,double z,double w,double x2,double y2,double z2,double w2
q1(0)=x
q1(1)=y
q1(2)=z
q1(3)=w
q2(0)=x2
q2(1)=y2
q2(2)=z2
q2(3)=w2
_q3(0)=0.0f
_q3(1)=0.0f
_q3(2)=0.0f
_q3(3)=0.0f
_q3(3)= q1(3) * q2(3) - q1(0) * q2(0) - q1(1) * q2(1) - q1(2) * q2(2)
_q3(0)= q1(1) * q2(2) - q1(2) * q2(1) + q1(3) * q2(0) + q1(0) * q2(3)
_q3(1)= q1(2) * q2(0) - q1(0) * q2(2) + q1(3) * q2(1) + q1(1) * q2(3)
_q3(2)= q1(0) * q2(1) - q1(1) * q2(0) + q1(3) * q2(2) + q1(2) * q2(3)
return
;=============================================================================
;¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤Î¼´²óž¡ÊÅÙ¿ô»ØÄê¡Ë
;=============================================================================
#define PI 3.14159265358979
#deffunc QuatRotate array v,double r
rad=0.0f
s=0.0f
rad = r * (PI / 180.0) / 2.0;
s = sin(rad);
;logmes cos(rad)
;logmes v(3)
v(0) = double(v(0)) * s
v(1) = v(1) * s
v(2) = v(2) * s
v(3) = cos(rad)
return
| |
|
2024/4/15(Mon) 19:13:34|NO.101529
¤³¤ó¤Ë¤Á¤ï
>¤³¤ÎÊýË¡¤¬¹Í¤¨¤È¤·¤Æ¤â¹ç¤Ã¤Æ¤¤¤ë¤Î¤«¡¢¶µ¤¨¤Æ¤¤¤¿¤À¤±¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£
¤´¼«¿È¤Î¥×¥í¥°¥é¥à¤ÇÍýÁÛ¤¬Ëþ¤¿¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤ÐÌäÂê̵¤¤¤È»×¤¤¤Þ¤¹¤¬¡¢
¤ª¤½¤é¤¯¡¢·¹¼Ð¤¬¥¥Ä¤¯¤Ê¤ë¤ÈËþ¤¿¤µ¤ì¤Ê¤¯¤Ê¤ë¤Î¤Ç¤Ï¤È»×¤ï¤ì¤Þ¤¹¡£
¡Ê¤¿¤Þ¤¿¤Þ¡¢ÍøÍѤ·¤Æ¤¤¤¿ÈϰϤǤ½¤ì¤Ã¤Ý¤¯Æ°¤¤¤Æ¤¤¤¿¡Ë
¥Ù¥¯¥È¥ë¤È³ÑÅ٤ϰ㤦¤â¤Î¤Ê¤Î¤Ç¡¢»È¤¤Êý¤ä¹Í¤¨Êý¤È¤·¤Æ¤Ï´Ö°ã¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤·¤¿¡£
°ÊÁ°¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤Î²óž¤òÀâÌÀ¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤·¤¿¤Î¤Ç¡¢
¤½¤Á¤é¤ò»È¤Ã¤¿Êý¤¬¤è¤í¤·¤¤¤«¤È»×¤¤¤Þ¤·¤¿¡£
¡Ê¤ä¤ê¤¿¤¤»ö¤ÎÍýÁÛ¤¬¥ª¥¤¥é¡¼³Ñ¤Çɽ¸½¤·¤ä¤¹¤¤»ö¤òĶ¤¨¤Æ¤¤Æ¤Þ¤¹¤Î¤Ç¡Ë
#include "hspmath.as"
#include "hgimg4.as"
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
; ¥«¥á¥é
setpos GPOBJ_CAMERA, 10,10,10
gplookat GPOBJ_CAMERA, 0,0,0
; ¼´ (±¦¼êºÂɸ Y UP)
gpbox id_axis_x, 0.1, $FF0000 : setpos id_axis_x, 5 : setscale id_axis_x, 100,1,1
gpbox id_axis_y, 0.1, $00FF00 : setpos id_axis_y, ,5 : setscale id_axis_y, 1,100,1
gpbox id_axis_z, 0.1, $0000FF : setpos id_axis_z, ,,5 : setscale id_axis_z, 1,1,100
; ¾²
gpbox id_floor, 1, $00FFFF : setpos id_floor, 0,-1 : setscale id_floor, 10, 0.1, 10
; ¡ú¤³¤³¤òÊѤ¨¤Æ¤ß¤Æ¡ú
setangr id_floor, 32, 0, 32
;setangr id_floor, 64, 0,-16
; ¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú
gppbind id_floor, 0
; ¥â¥Ç¥ë
gpload id_model,"res/tamane2"
setscale id_model, 0.01,0.01,0.01
; º£²ó¤Ï¾²¤·¤«¤Ê¤¤¤Î¤Ç¡¢¥«¥á¥é¤«¤é¥¥ã¥¹¥È¡Ê¾²¤ÎË¡Àþ¤È¤ì¤ì¤Ð¤è¤¤¤Î¤Ç)
gppraytest id, GPOBJ_CAMERA, 100
getwork2 GPOBJ_CAMERA, norm.0, norm.1, norm.2
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤òÍÑ°Õ (ñ°Ì¥Ù¥¯¥È¥ë)
fvset vec_up, 0.0, 1.0, 0.0
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤ÈË¡Àþ¤È¤Î³°ÀѤò·×»»¢Í¼´¤òµá¤á¤ë¡£(Àµµ¬²½ºÑ¡Ë
fvset vec_axis, vec_up.0, vec_up.1, vec_up.2
fvouter vec_axis, norm.0, norm.1, norm.2
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤È¼´¤ÇÆâÀѤò·×»»¢Ícos¦È¡¢¢ÍµÕ´Ø¿ô¤Ç³ÑÅÙ¤òµá¤á¤ë
fvset dot, vec_up.0, vec_up.1, vec_up.2
fvinner dot, norm.0, norm.1, norm.2
ang_rad = acos(dot.0)
; ¼´¤È³ÑÅ٤ǥ¯¥©¡¼¥¿¥Ë¥ª¥ó¤ò¥»¥Ã¥È¥¢¥Ã¥×
half_theta = ang_rad / 2.0 : s = sin(half_theta)
qua.0 = vec_axis.0 * s, vec_axis.1 * s, vec_axis.2 * s, cos(half_theta)
; ¥â¥Ç¥ë¤ËÀßÄê
setquat id_model, qua.0, qua.1, qua.2, qua.3
; ¤´Ä󼨤µ¤ì¤¿ÊýË¡¤À¤È¹ç¤ï¤Ê¤¤¡£
;setangy id_model, norm.0, norm.1, norm.2
;addang id_model, 0.0, -norm.1, 0.0
redraw 0 ; ÉÁ²è³«»Ï
gpdraw ; ¥·¡¼¥ó¤ÎÉÁ²è
color 255,255,255 : pos 0,0
mes strf("Ë¡Àþ:%3.2f, %3.2f, %3.2f", norm.0, norm.1, norm.2)
redraw 1 ; ÉÁ²è½ªÎ»
| |
|
2024/4/16(Tue) 05:15:45|NO.101533
buhio¤µ¤ó¡¢usagi¤µ¤ó¡¢¤¤¤Ä¤â¤¤¤Ä¤â¡¢¤ªÀ¤ÏäˤʤäƤª¤ê¤Þ¤¹¡£
¤´ÊÖÅú¤¤¤¿¤À¤¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
>buhio¤µ¤ó
¡Ö¥Ù¥¯¥È¥ë¡×¤È¡Ö³ÑÅ١פγµÇ°¡¢ÃúÇ«¤Ê¤´ÀâÌÀ¡¢¤È¤Æ¤â½õ¤«¤ê¤Þ¤·¤¿¡£
¹â¹»¤Î¿ô³Ø¤Î¼ø¶È¡¢¥Á¥ó¥×¥ó¥«¥ó¥×¥ó¤Ç¡¢Ì»ҤΤª¤¤¤Æ¤±¤Ü¤ê¤À¤Ã¤¿¿È¤Ë¤Ï¡¢
ÁêÊѤï¤é¤º¡¢¡Ö¥¯¥©¡¼¥¿¥Ë¥ª¥ó¡×¤Èʹ¤¤¤¿¤À¤±¤Ç¡¢µñÀäÈ¿±þ¤òµ¯¤³¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¤¬......¡£
>usagi¤µ¤ó
>¤¿¤Þ¤¿¤Þ¡¢ÍøÍѤ·¤Æ¤¤¤¿ÈϰϤǤ½¤ì¤Ã¤Ý¤¯Æ°¤¤¤Æ¤¤¤¿
>¥Ù¥¯¥È¥ë¤È³ÑÅ٤ϰ㤦¤â¤Î¤Ê¤Î¤Ç¡¢»È¤¤Êý¤ä¹Í¤¨Êý¤È¤·¤Æ¤Ï´Ö°ã¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤·¤¿¡£
¤½¤ÎÄ̤ê¤À¤È¡¢¼«Ê¬¤Ç¤âÍý²ò¤·¤Æ¤¤¤Þ¤¹¤¬¡¢¤½¤ì¤Ç¤â¡¢²¿¸Î¤½¤ì¤Ã¤Ý¤¯¤Ç¤¤Æ¤·¤Þ¤Ã¤¿¤Î¤«¡¢
¶öÁ³¤À¤È¤·¤Æ¤â¡¢¶öÁ³¤Ë»×¤¨¤Ê¤¤²¿¤«¤¬¤¢¤ë¤è¤¦¤Ë´¶¤¸¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
¤½¤ÎÊդ꤬ʬ¤«¤ì¤Ð¡¢¾¯¤·¤Ï¥¹¥Ã¥¥ê¤¹¤ë¤Î¤Ç¤¹¤¬¡£
¸æÆóÊý¤Ë¤Ï¡¢ËÜÅö¤ËËè²ó¡¢¤ªÎÏź¤¨Äº¤¤¤Æ¡¢½õ¤«¤Ã¤Æ¤ª¤ê¤Þ¤¹¡£
£·£°ºÍ¡¢Ç§Ãξɤ˶á¤Å¤¤¤Æ¤¤¤ëƬ¤Ë¤Ï¡¢¤Ê¤«¤Ê¤«¤Ë¸·¤·¤¤ÆâÍƤǤ¹¤¬¡¢
¸æÆóÊý¤Î¤´Ä󼨤¯¤À¤µ¤Ã¤¿¤â¤Î¤òÌÔÊÙ¶¯¤·¤Æ¤¤¤ë¤È¤³¤í¤Ç¤¹¡£
²ò·è¤È¤Ï¤»¤º¤Ë¡¢¾¯¤·¤ª»þ´Ö¤ò夤¿¤¤¤È»×¤¤¤Þ¤¹¡£
|
|
2024/4/16(Tue) 12:40:10|NO.101534
¤´Íý²ò¤µ¤ì¤Æ¤¤¤¿¤Î¤Ç¤¹¤Í¡£¼ºÎ餤¤¿¤·¤Þ¤·¤¿¡£
>¶öÁ³¤À¤È¤·¤Æ¤â¡¢¶öÁ³¤Ë»×¤¨¤Ê¤¤²¿¤«¤¬¤¢¤ë¤è¤¦¤Ë´¶¤¸¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
µ¿»÷Áê´Ø¤ß¤¿¤¤¤Ê»ö¤Ç¤·¤ç¤¦¤«¡£
¾å¼ê¤¯¤¤¤Ã¤¿Íýͳ¤Ï¤É¤³¤«¤Ë¤¢¤ë¤Î¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢ÆÃÄê¾ò·ï²¼¤À¤È¤Ï¹Í¤¨¤Æ¤Þ¤¹¡£
¥¹¥¯¥ê¥×¥È¤ò¸«¤Ê¤¤¤Èʬ¤«¤ê¤Þ¤»¤ó¤¬¡¢¤ª¤½¤é¤¯¡£¡£¡£
Ë¡ÀþÊý¸þ¤¬¾å¤Ê¤é[0,1,0]¤Ç¡¢±¦¤Ê¤é[1,0,0]¤À¤È»×¤¤¤Þ¤¹¤¬¡¢
¤³¤Î¤Þ¤ÞXZÊ¿Ì̾å¤Ç90Åٲ󤷤Ƥߤë¤ÈÊý¸þ¥Ù¥¯¥È¥ë¡Êñ°Ì¥Ù¥¯¥È¥ë¡Ë¤ÎÀäÂÐÃͤϣ±¤Ç¤¹¤«¤é
[1,0,0]¢Í[0,0,1]¢Í[-1,0,0]¢Í[0,0,-1]¢Í[1,0,0]
¤È½Û´Ä¤·¤Þ¤¹¡£
¤³¤ì¤Ã¤Æ±ß±¿Æ°¤Ç¤¹¤è¤Í¡£
³ÑÅ٤ϥ饸¥¢¥ó¤Ê¤Î¤Ç1¤ÏÂçÂÎ60ÅÙ¤¯¤é¤¤¤Ë¤Ê¤ê¤Þ¤¹¡£
Ê¿Ì̤˶á¤Å¤¯¤È[0.7, 0.7, 0]¤Ç¤¹¤¬Y¤Ï̵»ë¤¹¤ëºî¤ê¤Ê¤Î¤Ç¡¢0.7rad¤Ï40ÅÙ¤¯¤é¤¤¡£
Ʊ¤¸¤è¤¦¤Ë´°Á´¤Ë¾å¤À¤È[0,1,0]¤Ç¤¹¤«¤é0Å٤Ǥ¹¤è¤Í¡£
¼è¤ì¤ëÃͤȤ·¤Æ0¡Á60ÅÙ¤¯¤é¤¤¤ÎÈϰϤǤ½¤Î¾¥¹¥¯¥ê¥×¥È(»î¹Ôºø¸í)¤È¾å¼ê¤¤»ö¤«¤ß¹ç¤Ã¤Æ¡¢
¸«¤«¤±¾å¡¢¾å¼ê¤¯¤¤¤Ã¤Æ¤¤¤ë¤è¤¦¤Ë¸«¤¨¤¿¤Î¤Ç¤Ï¤È»×¤¤¤Þ¤·¤¿¡£
¥¥ã¥é¥¯¥¿¡¼¤Î¸µ¤«¤éƬ¤Þ¤Ç¤Î¡É¥Ù¥¯¥È¥ë¤ÈË¡Àþ¤ÏËÜÅö¤Ë°ìÃפ·¤Æ¤¤¤ë¤Î¤«¡É
¤¬µ¤¤Ë¤Ê¤ê¤Þ¤·¤¿¤Î¤Ç¡¢¥Ç¥Ð¥Ã¥¯É½¼¨¤·¤Æ¤ß¤ë¤ÈÎɤ¤¤«¤È»×¤¤¤Þ¤·¤¿¡£
¥¹¥Ã¥¥ê¤·¤Þ¤¹¤«¤Í¤§¡£¡£¡£
>¥Ç¥³¥Ü¥³ÃÏÌÌÁö¹Ô»þ¤Î¼Ö¤Î·¹¤ºÆ¸½
¤È¤¤¤¦¤ï¤±¤Ç¡¢¤É¤ó¤ÊË¡Àþ¤Ç¤âËþ¤¿¤¹¤Î¤«³Îǧ¤·¤Æ¤ß¤Æ失¤ë¤È
¶öÁ³¤Ê¤Î¤«¤É¤¦¤«Ê¬¤«¤ë¤«¤È»×¤¤¤Þ¤·¤¿¡£
¡Ê¤¿¤È¤¨¤ÐË¡Àþ[0,-1,0]¤ÎÍͤÊÅ·°æ¤ËǦ¼Ô¤ÎÍͤËΩ¤Ä·Á¤òºÆ¸½¤Ç¤¤ë¤Î¤«¡£¡Ë
>¥¯¥©¡¼¥¿¥Ë¥ª¥ó¡×¤Èʹ¤¤¤¿¤À¤±¤Ç¡¢
¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤ÏÆ»¶ñ¤È¤·¤Æ»È¤¦¤À¤±¤Ê¤é¡¢Ãæ¿È¤Î¿ô³ØŪÍý²ò¤Ï¤¹¤ëɬÍפÏ̵¤¤¤Î¤Ç¡¢
"gpload"¤ÎÃæ¿È¤òÍý²ò¤»¤º»È¤¦¤¯¤é¤¤¤Ê´¶¤¸¤Ç¥Á¥ã¥ì¥ó¥¸¤·¤Æ¤ß¤Æ¤âÎɤ¤¤«¤â¤Ç¤¹¤Í¡£
¡Ê¤È¤Ï¸À¤¨Éßµï¤Ï¹â¤¤¤«¤â¤Ç¤¹¤¬¸½Âå3D¤Ç¤Ïɬ¿Ü¤Ê¤Î¤Ç¡£¡£¡£¡Ë
µÕ¤Ë»È¤ï¤º¤Ë"¥í¥É¥ê¥²¥¹¤Î²óž¸ø¼°"¤Ê¤É¤Ç²óž¹ÔÎó¤òµá¤á¤Æ¤â¤¤¤¤¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢
¤â¤Ã¤ÈµñÀäÈ¿±þ¤ò¼¨¤¹¤«¤â¤·¤ì¤Þ¤»¤ó¡£
Æñ¤·¤¤ÊýË¡¤È¤¤¤¦¤è¤ê¡¢¤è¤ê´Êñ¤ÊÊýË¡¤òÄ󼨤·¤Æ¤¤¤ë¤Ä¤â¤ê¤Ç¤Ï¤¢¤ë¤Î¤Ç¤¹¤¬¡£¡£¡£
3D¤ÏÆñ¤·¤¤¤Ç¤¹¤è¤Í¡£
°ìÈÖñ½ã¤Ê¤Î¤ÏË¡Àþ¤ËΩ¤Ä¤À¤±¤Ê¤é¥â¥Ç¥ë¤òZ¼´¤Ç¤Ï¤Ê¤¯Y¼´ÀµÌ̤Ȥ·¤Æºî¤Ã¤Æ¤ª¤¤¤Æ
Ë¡ÀþÊý¸þ¤Ë"gplookat"¤¹¤ë¤Î¤¬¥·¥ó¥×¥ë¤«¤È»×¤¤¤Þ¤·¤¿¡£
¢¨¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤Î·×»»¤ÏÃæ¿È¤Ç¾¡¼ê¤Ë¤ª¤³¤Ê¤Ã¤Æ¤¯¤ì¤Þ¤¹¤«¤é¸«¤¿Ìܾ她¥¯¥ê¥×¥È¤Ç¤Î»ÈÍѤò²óÈò¤Ç¤¤ë
¢¨XYZ¼´¤Î¥Ü¡¼¥ó¤ÎÆþ¤Ã¤¿¥À¥ß¡¼¥â¥Ç¥ëÍÑ°Õ¤·¤ÆË¡Àþ¤Ëgplookat,¡ÝY¼´¤Ëgplookat¤Ç¤â¥¤¥±¤ë¤«¤â¡©
| |
|
2024/4/16(Tue) 13:09:07|NO.101535
ÁÇÀ²¤é¤·¤¤¸¡¾Ú¥¹¥¯¥ê¥×¥È¤òÇÒ¸«¤·¡¢¼«Ê¬¤Ê¤ê¤Ë»Õ¾¢¤Î¥¹¥¯¥ê¥×¥È¤Î·×»»·ë²Ì¤È¼«Ê¬¤Î¥¹¥¯¥ê¥×¥È¤¬¹çÃפ¹¤ë¤«¥Æ¥¹¥È¤·¤Þ¤·¤¿¡£
°ìÅÀ¡¢¡³°ÀѤò¤È¤Ã¤¿¥Ù¥¯¥È¥ë¤ò°ìöÀµµ¬²½¤¹¤ë¤È¡¢¤Ô¤¿¤Ã¤ÈÈĤËÄ¥¤êÉÕ¤¤Þ¤¹¡£¤³¤³¤Ç°ã¤¤¤¬¤¢¤ê¤Þ¤·¤¿¡£
¤Þ¤¿¡¢¼«Ê¬Åª¤Ë¸«¤ä¤¹¤¯Æ°¤¤òÉÕ¤±¤Æ¤ß¤Þ¤·¤¿¡£
¥ï¥¿¥¯¥·¤âHSP¤«¤é¿ô³Ø¤ËÌá¤Ã¤¿¥¯¥Á¤Ç¤¹¤¬¡¢¡Öʸ·Ï¤Ç¤â¤ï¤«¤ë¹â¹»¿ô³Ø¡×¤Ê¤É¡¢¥Ö¥¿¤Ç¤â¤ï¤«¤ë¤è¤¦¤Ë½ñ¤¤¤Æ¤¯¤À¤¹¤Ã¤¿ËܤȤˤé¤á¤Ã¤³¤·¤¿¤ê¤·¤Æ¤¤¤Þ¤¹¡£
¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤Ë´Ø¤·¤Æ¤Ï¡¢´Êñ¤ÊËܤȤ¤¤¦¤Î¤¬¸«¤Ä¤«¤é¤Ê¤¤¤Î¤Ç¤¹¤¬¡¢ https://hakuhin.jp/as/quaternion.html#QUAT_03¡¡¤È¤¤¤¦¤è¤¦¤Ê¥µ¥¤¥È¤Î¥³¡¼¥É¤òHSP¤Ë°Ü¿¢¤·¤Æ¤ß¤¿¤ê¡¢
¤¤¤í¤ó¤ÊÊý¡ÊGENKI¤µ¤ó¡¦hashikemu¤µ¤ó¡Ë¤Î½ñ¤¤¤¿¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤ÎÌ¿Îá¤ò»È¤Ã¤Æ¤ß¤ë¤³¤È¤Ç¡¢»ÅÁȤߤϤ狼¤é¤ó¤Ç¤â¡¢»×¤Ã¤¿Ä̤ê¤Ë¤Ê¤ó¤È¤«Æ°¤¯¤È¤¤¤¦´¶¤¸¤Þ¤ÇÍè¤ì¤Þ¤·¤¿¡£
ÍפÏÆ°¤±¤Ð¤¤¤¤¤ï¤±¤Ç¡¢¤½¤ó¤Ê¤â¤ó¤È»×¤Ã¤Æ¤ª¤ê¤Þ¤¹¡£
¡Ê¿ô¼°¤Ï¡¢È¾Ç¯¤¯¤é¤¤Ä¯¤á¤Æ¤¿¤é¤Ê¤ó¤«¸«¤¨¤ë»þ¤¬¤¢¤ë¡¢¡¢¡¢¡Ë
ɸ½à¤ÎHGIMG4¤ÎÌ¿Îá¤À¤±¤Ç¤ä¤ë¤Î¤Ï¡¢»ä¤Ï¤â¤¦¤·¤ó¤É¤¤¤Ç¤¹¡£¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤È¥Þ¥È¥ê¥Ã¥¯¥¹·×»»¤ò¥µ¥Ý¡¼¥È¤·¤ÆÍߤ·¤¤¡Á¤È»×¤¤¤Þ¤¹¡£
#include "hspmath.as"
#include "hgimg4.as"
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
; ¥«¥á¥é
setpos GPOBJ_CAMERA, 0,10,10 ;🐽Êѹ¹
gplookat GPOBJ_CAMERA, 0,0,0
; ¼´ (±¦¼êºÂɸ Y UP)
gpbox id_axis_x, 0.1, $FF0000 : setpos id_axis_x, 5 : setscale id_axis_x, 100,1,1
gpbox id_axis_y, 0.1, $00FF00 : setpos id_axis_y, ,5 : setscale id_axis_y, 1,100,1
gpbox id_axis_z, 0.1, $0000FF : setpos id_axis_z, ,,5 : setscale id_axis_z, 1,1,100
; ¾²
gpbox id_floor, 1, $00FFFF : setpos id_floor, 0,0 : setscale id_floor, 10, 0.1, 10
; ¡ú¤³¤³¤òÊѤ¨¤Æ¤ß¤Æ¡ú
setangr id_floor, 0, 0, 0 ;🐽Êѹ¹
;setangr id_floor, 64, 0,-16
; ¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú¡ú
gppbind id_floor, 1 ¡¡;🐽½Å¤µ1¤ËÊѹ¹¡Ê½Å¤µ¤¬0¤À¤ÈKINEMATIC¤¬¸ú¤«¤Ê¤¤)
gppset id_floor,GPPSET_KINEMATIC,1;🐽ÄɲáÊÆ°¤«¤»¤ë¤è¤¦¤Ë¡Ë
; ¥â¥Ç¥ë
gpload id_model,"res/tamane2"
setscale id_model, 0.01,0.01,0.01
r=0.0f ;🐽ÄɲÃ
i=1.0f ;🐽ÄɲÃ
*main ;🐽ÄɲÃ
if r>1.4{i=-1}:if r<=-1.4{i=1}:r+=(0.01f*i):setang id_floor,0,0,r;🐽¾²¤Îº¸±¦²óžÄɲÃ
; º£²ó¤Ï¾²¤·¤«¤Ê¤¤¤Î¤Ç¡¢¥«¥á¥é¤«¤é¥¥ã¥¹¥È¡Ê¾²¤ÎË¡Àþ¤È¤ì¤ì¤Ð¤è¤¤¤Î¤Ç)
gppraytest id, GPOBJ_CAMERA, 100
getwork2 GPOBJ_CAMERA, norm.0, norm.1, norm.2
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤òÍÑ°Õ (ñ°Ì¥Ù¥¯¥È¥ë)
fvset vec_up, 0.0, 1.0, 0.0
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤ÈË¡Àþ¤È¤Î³°ÀѤò·×»»¢Í¼´¤òµá¤á¤ë¡£(Àµµ¬²½ºÑ¡Ë
fvset vec_axis, vec_up.0, vec_up.1, vec_up.2
fvouter vec_axis, norm.0, norm.1, norm.2
fvunit vec_axis ;¢«¢«¡🐽Àµµ¬²½ÄɲÃ(¤Ï¤º¤¹¤È¾¯¤·ÊѤï¤ë)
; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤È¼´¤ÇÆâÀѤò·×»»¢Ícos¦È¡¢¢ÍµÕ´Ø¿ô¤Ç³ÑÅÙ¤òµá¤á¤ë
fvset dot, vec_up.0, vec_up.1, vec_up.2
fvinner dot, norm.0, norm.1, norm.2
ang_rad = acos(dot.0)
; ¼´¤È³ÑÅ٤ǥ¯¥©¡¼¥¿¥Ë¥ª¥ó¤ò¥»¥Ã¥È¥¢¥Ã¥×
half_theta = ang_rad / 2.0 : s = sin(half_theta)
qua.0 = vec_axis.0 * s, vec_axis.1 * s, vec_axis.2 * s, cos(half_theta)
; ¥â¥Ç¥ë¤ËÀßÄê
setquat id_model, qua.0, qua.1, qua.2, qua.3
; ¤´Ä󼨤µ¤ì¤¿ÊýË¡¤À¤È¹ç¤ï¤Ê¤¤¡£
;setangy id_model, norm.0, norm.1, norm.2
;addang id_model, 0.0, -norm.1, 0.0
redraw 0 ; ÉÁ²è³«»Ï
gpdraw ; ¥·¡¼¥ó¤ÎÉÁ²è
color 255,255,255 : pos 0,0
mes strf("Ë¡Àþ:%3.2f, %3.2f, %3.2f", norm.0, norm.1, norm.2)
redraw 1; ÉÁ²è½ªÎ»
await 1000/60;🐽ÄɲÃ
goto *main;🐽ÄɲÃ
| |
|
2024/4/16(Tue) 22:55:54|NO.101541
>buhio¤µ¤ó
¤ï¤¡¡¢ÁÇÀ²¤é¤·¤¤¡£Æ°¤¯¤È¤È¤Æ¤â¸«¤ä¤¹¤¤¤Ç¤¹¤Í¡£
Àµµ¬²½¤ÏÆþ¤ì˺¤ì¤Æ¤Þ¤·¤¿¡£¤¹¤ß¤Þ¤»¤ó¡£
¥µ¥ó¥×¥ë¼Â¹Ô¤Î¸«±É¤¨¤È¤¤¤¦¤â¤Î¤Ï°Õ¼±¤·¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¢
»ä¤Î¤Ïľ´¶Åª¤Ç¤Ï¤Ê¤«¤Ã¤¿¤Ç¤¹¤Í¡£¾²¤òÆ°¤«¤·¤¿»ö¤¬¤È¤Æ¤âÎɤ¤¤È»×¤¤¤Þ¤·¤¿¡£
>¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó
ÄɲäÇgplookat¤Ç¥¤¥±¤ë¤«¤â¤È½ñ¤¤Þ¤·¤¿¤¬¡¢¾¯¤·ÌÌÅݤ½¤¦¤Ç¤¹¤Í¡£
¥ª¥¤¥é¡¼³ÑÆÃͤθþ¤¤¬Ê¬¤«¤é¤Ê¤¯¤Ê¤Ã¤Æ¤·¤Þ¤¦ÌäÂê¡Ê¥Õ¥ê¥Ã¥×¡Ë¤âȯÀ¸¤·¤Þ¤¹¤·¡¢
¾ì¹çʬ¤±¤Ê¤É¤Ç¡¢¤«¤¨¤Ã¤ÆµºÜÎ̤⿤¯¤Ê¤Ã¤Æ¤·¤Þ¤¤¤¢¤¤é¤á¤Þ¤·¤¿¡£
Ǥ°Õ¤Î¼´¡ÊË¡Àþ¡Ë¤Ç¡£¡£¡£¤È¤¤¤¦»ö¤ò¹Í¤¨¤ë¤È¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤¬°ìÈÖ³Ú¤«¤â¤·¤ì¤Þ¤»¤ó¡£
¡Ê¤½¤ì¤ò´Êñ¡¢²óÈò¤Ë¤¹¤ë°Ù¤ËƳÆþ¤µ¤ì¤¿»ö¤â¤¢¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¡Ë
buhio¤µ¤ó¤¬Ä󼨤µ¤ì¤¿¾è»»¤È²óž¤ò¤´ÍøÍѤ·¤Æ¤â¿§¡¹½ÐÍè¤Þ¤¹¤·¡¢
ÊØÍøÌ¿Îá¤ò¤Þ¤È¤á¤Æ²¼¤µ¤Ã¤Æ¤¤¤ëÊý¤â¤¤¤é¤Ã¤·¤ã¤ë¤Î¤Ç¡¢
À§Èó¤È¤â¥Á¥ã¥ì¥ó¥¸¤·¤Æ¤ß¤Æ夤¿¤Î¤Ç¤¹¤¬¡¢
º£¼è¤êÁȤó¤Ç¤¤¤ë¥²¡¼¥à¥×¥í¥°¥é¥à¤Ç¤Ê¤ó¤È¤«¤Ê¤Ã¤Æ¤¤¤ë
¤È¤Î»ö¤Ê¤Î¤Ç¡¢¤½¤Î¤Þ¤Þ¤Ç¤âÎɤ¤Íͤʵ¤¤â¤·¤Þ¤·¤¿¡£
¢¨²áµî¥í¥° NO.93927, NO.93930 ¤Ë»ä¤¬´Ø¿ô²½¤·¤¿¥µ¥ó¥×¥ë¤â¤¢¤ë¤Î¤Ç¡¢
¡¡¤â¤·¤´»²¹Í¤Ë¤Ê¤ì¤Ð¤É¤¦¤¾¡£¡Ê·Ç¼¨ÈĤɤ¦¤ä¤Ã¤Æ¸¡º÷¤¹¤ë¤ó¤À¤í¤¦¡Ë
¡¡¥¯¥©¡¼¥¿¥Ë¥ª¥ó¼«¿È¤ÎÃͤ˴ؤ·¤Æ¤Ï¿Í´Ö¤¬Íý²ò¤¹¤ëɬÍפϤʤ¯¡¢
¡¡Â»»¤ä³Ý»»¤ò¤¹¤ë¤è¤¦¤Ë"¤É¤ÎÍͤÊÁàºî¤ò¤·¤¿¤«"¤È¤¤¤¦»ö¤¬½ÅÍפ«¤È»×¤¤¤Þ¤¹¡£
¡¡¡Ê4¼¡¸µ¤Ï»ä¤¿¤Á3¼¡¸µ¤Îʪ¤«¤é¤¹¤ë¤È¥¤¥á¡¼¥¸¤·¤Ë¤¯¤¤¤Î¤Çľ´¶Åª¤Ê¿ô»ú¤Ë¤Ï¤Ê¤é¤Ê¤¤¤Î¤Ç¡Ë
°Ê¾å¡¢Ä¹¡¹¤È¤·¤Ä¤ì¤¤¤¤¤¿¤·¤Þ¤·¤¿¡£
| |
|
2024/4/17(Wed) 05:08:10|NO.101543
buhio¤µ¤ó¡¢usagi¤µ¤ó¡¢¹¹¤Ê¤ë¤´ÊÖÅú¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
²¿¤«¡¢¤ªÆó¿Í¤Î´Ö¤Ç¤Ï¡¢²ò·è¤·¤Æ¤¤¤ë¤è¤¦¤Ê......¡£
»ä¤Ï¡¢¤Þ¤ÀÍý²ò¤ÎÆþ¸ý¤ËΩ¤Ã¤¿¤Ð¤«¤ê¤Ç¤¹¡£
>µ¿»÷Áê´Ø¤ß¤¿¤¤¤Ê»ö¤Ç¤·¤ç¤¦¤«¡£¡Êusagi¤µ¤ó¡Ë
¼«Ê¬¤â¤½¤¦»×¤¤¡¢usagi¤µ¤óƱÍͤˡ¢
>³ÑÅ٤ϥ饸¥¢¥ó¤Ê¤Î¤Ç1¤ÏÂçÂÎ60ÅÙ¤¯¤é¤¤¤Ë¤Ê¤ê¤Þ¤¹¡£
>Ê¿Ì̤˶á¤Å¤¯¤È[0.7, 0.7, 0]¤Ç¤¹¤¬Y¤Ï̵»ë¤¹¤ëºî¤ê¤Ê¤Î¤Ç¡¢0.7rad¤Ï40ÅÙ¤¯¤é¤¤¡£
¤³¤Î¤³¤È¤ò¹Í¤¨¤Æ¤¤¤Þ¤·¤¿¡£
>¤É¤ó¤ÊË¡Àþ¤Ç¤âËþ¤¿¤¹¤Î¤«³Îǧ¤·¤Æ¤ß¤Æ
¤È¤¤¤¦¤³¤È¤Ç¡¢º£¸¡¾ÚÍÑ¤Î¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤¤¤ë¤È¤³¤í¤Ç¤¹¡£
¤³¤ì¤¬¤É¤¦¤Ë¤«ºî¤ì¤Æ¡¢¼«Ê¬¤Ê¤ê¤Ë¡¢¡Ö¾¯¤·¤Ï¥¹¥Ã¥¥ê¡×¤·¤¿¤é¡¢
¡Ö²ò·è¡×¤È¤·¤¿¤¤¤È»×¤¤¤Þ¤¹¤Î¤Ç¡¢¤â¤¦¾¯¤·¤ª»þ´Ö¤ò¡£
buhio¤µ¤ó¤Î¡Ö¾è»»¡×¤È¡Ö²óž¡×¤â»È¤ï¤»¤Æĺ¤³¤¦¤È»×¤¤¤Þ¤¹¡£
¤¿¤À¡¢[#deffunc]¤Ë´·¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢¤³¤Á¤é¤â»þ´Ö¤¬¡£
>¡Ê·Ç¼¨ÈĤɤ¦¤ä¤Ã¤Æ¸¡º÷¤¹¤ë¤ó¤À¤í¤¦¡Ë
¡Öusagi ¥¯¥©¡¼¥¿¥Ë¥ª¥ó¡×¤Ç¡¢²áµî¥í¥°¸¡º÷¤Ç¤¤Þ¤·¤¿¡£
ËÜÅö¤Ë¡¢¤ªÆó¿Í¤Ë¤Ï¡¢Æ¬¤¬¾å¤¬¤ê¤Þ¤»¤ó¡£
|
|
2024/4/17(Wed) 05:46:21|NO.101544
¸À¤¤Ëº¤ì¤Þ¤·¤¿¡£
buhio¤µ¤ó¤Î¤â¤Î¡¢Ä¾´¶Åª¤ËÄϤá¤Æ¡¢¤è¤«¤Ã¤¿¤Ç¤¹¡£
¡Ö¥¯¥©¡¼¥¿¥Ë¥ª¥ó¡×ÌÓ·ù¤¤¤»¤º¡¢¤É¤ó¤É¤ó»È¤Ã¤Æ¡¢»È¤¤´·¤ì¤Æ¤·¤Þ¤¨¤Ð¤¤¤¤¤Î¤«¡¢¤È¤â¡£
usagi¤µ¤ó¤Î¡Ö¤É¤ó¤ÊË¡Àþ¤Ç¤âËþ¤¿¤¹¤Î¤«¡×¤Î°ìÎã¤È¤·¤Æ¤´Ä󼨤µ¤ì¤¿¡ÖÅ·°æ¤ËǦ¼Ô¤ÎÍͤËΩ¤Ä·Á¡×
ÍȤ²Â¼è¤ê¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¿½¤·Ìõ¤Ê¤¤¤Ç¤¹¤¬¡¢¤³¤ì¤Ï³Î¤«¤Ë¸¡¾Ú¤ËɬÍפʤ³¤È¤ÈÍý²ò¤Ï¤·¤Æ¤ª¤ê¤Þ¤¹¤¬¡¢
»ä¤Î¡Ö¥Ç¥³¥Ü¥³ÃÏÌÌÁö¹Ô»þ¤Î¼Ö¤Î·¹¤ºÆ¸½¡×¤Ë¤Ï¡¢¤Þ¤º¤¢¤ê¤¨¤Ê¤¤¤³¤È¤Ê¤Î¤Ç¡¢
¡ÖÃÏÌÌÁö¹Ô¡×¤È¤¤¤¦¤Î¤¬¡¢usagi¤µ¤ó¤Î¤ª¤Ã¤·¤ã¤ë¡ÖÆÃÄê¾ò·ï²¼¡×¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ë»×¤¤¤Þ¤¹¡£
(¡ÖÃÏÌÌÁö¹Ô¡×¤ò³°¤¹¼ÂÎã¤È¤·¤Æ¤Ï¡¢±²´¬¤ÃèÊ֤ꤹ¤ë¥¸¥§¥Ã¥È¥³¡¼¥¹¥¿¡¼¤Ç¤¹¤«¡£)
¡ÖÃÏÌÌÁö¹Ô¡×¤È¤¤¤¦¡ÖÆÃÄê¾ò·ï²¼¡×¤Ç¤Î¡Öµ¿»÷Áê´Ø¡×......¡©
|
|
2024/4/17(Wed) 11:27:38|NO.101546
º®Í𤵤»¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤Í¡£¤¹¤ß¤Þ¤»¤ó¡£
>²ò·è¤·¤Æ¤¤¤ë¤è¤¦¤Ê......¡£
¤¤¤¨¡¢Á´Á³²ò·è¤·¤Æ¤ª¤é¤º¤º¤Ã¤È¹Í¤¨¤Æ¤Þ¤¹¤è¡£
¤É¤¦¤ä¤Ã¤Æ¼Â¸½¤·¤¿¤Î¤«¡¢Á´¤¯¤â¤Ã¤Æʬ¤«¤Ã¤Æ¤Ê¤¤¤Ç¤¹¤·¡¢
»ä¤Î¥Æ¥¹¥È¤À¤È¤´Ä󼨤ÎÊýË¡¤Ï¾å¼ê¤¯¤¤¤¤Þ¤»¤ó¤Ç¤·¤¿¡£
Á°¤â½ñ¤¤Þ¤·¤¿¤¬¡¢¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó¤ÎÌä¤Ï¤¤¤Ä¤âÆñ°×ÅÙ¤¬¹â¤¯¡¢
¿äÍý¾®Àâ¤ò²ò¤¯¤«¤Î¤è¤¦¤Ë³Ú¤·¤ó¤Ç¤Þ¤¹¡£¡Ê»ä¡¢²áµî°ìÅÙ¤âÀµ²ò¤·¤Æ¤Þ¤»¤ó¤¬µã¡Ë
¡Ö¹ç¤Ã¤Æ¤¤¤ë¤«¡©¡×¤È¤¤¤¦¾ÚÌÀ¤Ï¤¹¤´¤¯Æñ¤·¤¤¤Ç¤¹¤è¤Í¡£
ÈϰϤ¬¹¤¹¤®¤Þ¤¹¤Î¤Ç¡¢¾ò·ï¤ò¹Ê¤ë·Á¤Ç¥¹¥Ã¥¥ê¤Ë¤â¤Ã¤Æ¤¤¤±¤¿¤é¤È¹Í¤¨¤Æ¤Þ¤·¤¿¡£
¡Ö¥Ù¥¯¥È¥ë¡×¡Ö³ÑÅ١פιͤ¨Êý¤È¤·¤Æ¤Ï´Ö°ã¤Ã¤Æ¤¤¤Æ¡¢¡Ê³Ø½¬Åª¤Ê°ÕÌ£¤È¤·¤Æ¡Ë
¾ò·ï¤ò¹Ê¤Ã¤¿¥¦¥éµ»¤È¤·¤Æ¤Ï¹ç¤Ã¤Æ¤¤¤ë²ÄǽÀ¤¬¤¢¤ë¤Î¤Ç¤Ï¹Í¤¨¤Æ¤Þ¤¹¡£¡Ê»ä¤ÏÆ°ºî̤³Îǧ¡Ë
>¤È¤¤¤¦¤³¤È¤Ç¡¢º£¸¡¾ÚÍÑ¤Î¥×¥í¥°¥é¥à¤òºî¤Ã¤Æ¤¤¤ë¤È¤³¤í¤Ç¤¹¡£
¤¹¤´¤¯¡¢³Ú¤·¤ß¤Ë¤·¤Æ¤Þ¤¹¡ª
>ÍȤ²Â¼è¤ê¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¿½¤·Ìõ¤Ê¤¤¤Ç¤¹¤¬¡¢
>»ä¤Î¡Ö¥Ç¥³¥Ü¥³ÃÏÌÌÁö¹Ô»þ¤Î¼Ö¤Î·¹¤ºÆ¸½¡×¤Ë¤Ï¡¢¤Þ¤º¤¢¤ê¤¨¤Ê¤¤¤³¤È¤Ê¤Î¤Ç
Á´Á³¡¢ÍȤ²Â¤È¤Ï»×¤Ã¤Æ¤Ê¤¤¤Ç¤¹¤è¡£
ÃÏÌ̤Ȥ¤¤¦¤Î¤Ïµå¾õÃϵå¤Ç¤Ï¤Ê¤¯¤Æ¡¢Ê¿ÌÌÃϵå¤ß¤¿¤¤¤Ê»ö¤Ç¤¹¤è¤Í¡©¡ÊÈ¢ÄíŪ¤Ê¡Ë
»ä¤â·¹¼Ð¤¬¤¤Ä¤¯¤Ê¤ë¤ÈÀ®Î©¤·¤Ê¤¤¤Î¤Ç¤Ï¤È»×¤Ã¤Æ¤¿¤Î¤Ç¡¢
¾¯¤·Æ̱ú¤ÊÊ¿Ì̤Ǥ¢¤ì¤Ð¥¬¥¿¥¬¥¿Æ°¤¤¤ÆÊ·°Ïµ¤¤Ï½Ð¤½¤¦¤Ê¤¤¬¤·¤Þ¤·¤¿¡£
ʪÍý±é»»¤Î»þ¤Ë¤ªÏä·¤·¤¿¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¢
»ä¤Ï¥²¡¼¥à¤Ë´Ø¤·¤Æ¤ÏÍýÏÀ¤è¤ê·ë²ÌÇɤʤΤǡ¢
¾ò·ï¤ò¹Ê¤Ã¤ÆºÇŬ²½¤ò¤¹¤ë»ö¤â¿¤¤¤Ç¤¹¤«¤é¡¢
¤¢¤ê¤¨¤ë¾ò·ï¤Ç¡¢ÍýÁۤηë²Ì¤¬Ëþ¤¿¤µ¤ì¤Æ¤¤¤ì¤Ð¤è¤í¤·¤¤¤«¤È¹Í¤¨¤Æ¤Þ¤¹¡£
¢¨Í¾ÃÌ¢¨
ÀèÆüOBSLive¤ÇµÈ¼¤³¤È¤ê¤µ¤ó¤¬¥²¥¹¥È»²²Ã¤µ¤ì¤Æ¤Þ¤·¤¿¤¬¡¢
8bit¥Ñ¥½¥³¥ó¤Ç3D¤Ë±¢±ÆÉÕ¤±¤Æ¤¿¤ó¤Ç¤¹¤è¤Í¡£
¡Ö¤¹¤´¤¤¡ª¡×¤È»×¤Ã¤Æ¤¿¤é¡¢¤¹¤«¤µ¤º¤ª¤Ë¤¿¤Þ¤µ¤ó¤¬¡ÖÆâÀѤȤäƤë¡×¤È¥Ä¥Ã¥³¥ßÆþ¤ì¤Æ¤Æ
¤³¤È¤ê¤µ¤ó¤¬¡ÖÆâÀѤȤäƤޤ¹¡£¥«¥á¥é¤¬°ìÊý¸þ¤Ê¤Î¤Ç¥·¥Õ¥È¤Ç¤¤¤±¤ë¡£¡£¡£¡×
¤ß¤¿¤¤¤Ê»ö¤ò¤ªÏä·¤µ¤ì¤Æ¤¤¤Æ¡Êµ²±¤Á¤¬¤Ã¤Æ¤¿¤é¤¹¤ß¤Þ¤»¤ó¡Ë
¤³¤ì¤â¾ò·ï¤ò¹Ê¤Ã¤¿ºÇŬ²½¤À¤È»×¤Ã¤Æ¤Þ¤¹¡£
| |
|
2024/4/17(Wed) 19:19:20|NO.101547
usagi¤µ¤ó¤Î¤â¤Î¤Ï¡¢¡ÖY¤Ï̵»ë¤¹¤ëºî¤ê¡×¤È¤Î¤³¤È¡£
buhio¤µ¤ó¤Î¤â¤Î¤Ï¡¢
>; ¾åÊý¸þ¥Ù¥¯¥È¥ë¤òÍÑ°Õ (ñ°Ì¥Ù¥¯¥È¥ë)
>fvset vec_up, 0.0, 1.0, 0.0
¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£
¤³¤Î¤Þ¤Þ¤Î·Á¤Ç¤Ï¡¢¥â¥Ç¥ë¤òY¼´²óž¤µ¤»¤Æ¤¤¤ë»ä¤Î¥×¥í¥°¥é¥àÍѤθ¡¾Ú¤Ï¡¢¤Ç¤¤½¤¦¤Ë¤¢¤ê¤Þ¤»¤ó¡£
buhio¤µ¤ó¤Î¤â¤Î¤Î¡¢¾åÊý¸þ¤Îñ°Ì¥Ù¥¯¥È¥ë¤ò
[¢«,¢ª]Åù¤Î²óžÁàºî¥¡¼¤Ç²óž¤µ¤»¤¿¥â¥Ç¥ë¤Î¥Ù¥¯¥È¥ë¤ËÊѤ¨¤ë¤Ë¤Ï
¤É¤¦¤·¤¿¤é¤¤¤¤¤Î¤«¡¢¤ä¤êÊý¤¬Ê¬¤«¤ê¤Þ¤»¤ó¡£
|
|
2024/4/17(Wed) 19:38:11|NO.101548
[chdir dir_exe+"\\sample\\hgimg4"]¤Ç¥¹¥¯¥ê¥×¥È¤¬ÁȤá¤ì¤Ð¤¤¤¤¤Î¤Ç¤¹¤¬¡¢Æñ¤·¤¤¤Î¤Ç¡¢
¤Á¤ç¤Ã¤ÈŤ¯¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¤¬¡£¤È¤ê¤¢¤¨¤º¡¢
#include "hgimg4.as"
gpreset
setcls CLSMODE_SOLID, $404040
test=0 //0//1
; ¼´ (±¦¼êºÂɸ Y UP)
gpbox id_axis_x, 0.5, $FF0000 : setpos id_axis_x, 25 : setscale id_axis_x, 100,1,1
gpbox id_axis_y, 0.5, $00FF00 : setpos id_axis_y, ,25 : setscale id_axis_y, 1,100,1
gpbox id_axis_z, 0.5, $0000FF : setpos id_axis_z, ,,25 : setscale id_axis_z, 1,1,100
;------------------------------------------------------------------------------
gpbox id_floor, 25, $ffaaff
setscale id_floor, 1.0, 0.01, 1.0 ; ¾²(È¢)¥Î¡¼¥É¤òÄɲÃ
gppbind id_floor, 0, ; ¾²¥³¥ê¥¸¥ç¥ó¤È¤·¤Æ
gpload id_ball,"res/ball" ; »³(µåÂÎ)¥Î¡¼¥ÉÆɤ߹þ¤ß
setscale id_ball, 0.8,0.8,0.8
if test=0 : setpos id_ball, 0.0, -5.0, 0.0
if test=1 : setpos id_ball, 0.0, 0.0, 0.0
gppbind id_ball, 0, , GPPBIND_MESH ; ʪÍýÀßÄê (¥³¥ê¥¸¥ç¥ó¤È¤·¤Æ¥Î¡¼¥É¤Î¥â¥Ç¥ë¤òÈ¿±Ç)
;------------------------------------------------------------------------------
gpload id_chara,"res/jeep0" ; ¼Ö¥â¥Ç¥ëÆɤ߹þ¤ß
setscale id_chara, 0.01,0.01,0.01//,0.015,0.015,0.015
setpos id_chara, -10.0, 0.0, 0.0
setalpha id_chara, 192
; ------------------------------------------------------------------------------
gpbox id_model_board, 1, 0x00ff00 ; Îп§ÈÄ¥â¥Ç¥ëÆɤ߹þ¤ß
setscale id_model_board, 1.0, 8.0, 0.25
setpos id_model_board, -10.0, 0.0, 0.0
setalpha id_model_board, 192
; ------------------------------------------------------------------------------
gpbox id_null, 0.5, 0xffff00 ; ¹âÅÙ¼èÆÀÍѡᲫ¿§
setpos id_null, 0, 5.0, 0 ; [5.0]¾å¤Ë
setang id_null, -M_PI/2.0, 0, 0 ; M_PI ±ß¼þΨ
; ------------------------------------------------------------------------------
gpbox id_null_0, 0.3, 0xff0000 ; ¾×ÆÍÃÏÅÀÍÑ¡áÀÖ¿§
gpbox id_null_1, 0.3, 0x00ffff ; Ë¡Àþ½ªÅÀÍÑ¡á¿å¿§
; ------------------------------------------------------------------------------
; ¥«¥á¥é°ÌÃÖ¤òÀßÄê
if test=0 : setpos GPOBJ_CAMERA, 0.0,5.0,30.0
if test=1 : setpos GPOBJ_CAMERA, 0.0,10.0,30.0
; ------------------------------------------------------------------------------
speed = 0.05
;¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£
*main_loop
stick key,15
if key&128 : end
;¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®
;¥«¥á¥é°ÌÃÖ¤òÆ°¤«¤¹//96¡Á105 : [0]¡Á[9]¡Ê¥Æ¥ó¥¡¼¡Ë
getkey k, 100 : if k : addpos GPOBJ_CAMERA, -0.2, 0, 0 ; ¢£¢£ [4]¥¡¼
getkey k, 102 : if k : addpos GPOBJ_CAMERA, 0.2, 0, 0 ; ¢£¢£ [6]¥¡¼
getkey k, 104 : if k : addpos GPOBJ_CAMERA, 0, 0,-0.2 ; ¢£¢£ [8]¥¡¼
getkey k, 98 : if k : addpos GPOBJ_CAMERA, 0, 0, 0.2 ; ¢£¢£ [2]¥¡¼
getkey k, 101 : if k : addpos GPOBJ_CAMERA, 0, 0.2, 0 ; ¢£¢£ [5]¥¡¼
getkey k, 96 : if k : addpos GPOBJ_CAMERA, 0,-0.2, 0 ; ¢£¢£ [0]¥¡¼
gplookat GPOBJ_CAMERA, 0,5,0 ; ¥«¥á¥é¤«¤é»ØÄꤷ¤¿ºÂɸ¤ò¸«¤ë
;¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®
; ¥«¡¼¥½¥ë¥¡¼¤Ç¥¥ã¥é¥¯¥¿¡¼¤òÆ°¤«¤¹
fvset fv_vel, 0, 0, 0 ; ¿Ê¹ÔÊý¸þ¥Ù¥¯¥È¥ë
if key&1 { ; ¢£¢£ [¢«]¥¡¼ ¢«º¸²óž
addang_cnt+
addang id_chara, 0, 0.01, 0 ; ¼î²»¥â¥Ç¥ë
addang id_model_board, 0, 0.01, 0 ; Îп§ÈÄ¥â¥Ç¥ë
if (0.01*addang_cnt > M_PI*2) : addang_cnt=0
}
if key&4 { ; ¢£¢£ [¢ª]¥¡¼ ¢ª±¦²óž
addang_cnt-
addang id_chara, 0, -0.01, 0 ; ¼î²»¥â¥Ç¥ë
addang id_model_board, 0, -0.01, 0 ; Îп§ÈÄ¥â¥Ç¥ë
if (-0.01*addang_cnt > M_PI*2) : addang_cnt=0
}
if key&2 { ; ¢£¢£ [¢¬]¥¡¼
fvset fv_vel, 0, 0, speed
}
gosub *move_model
;¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®¢®
redraw 0 ; ÉÁ²è³«»Ï
gpdraw ; ¥·¡¼¥ó¤ÎÉÁ²è
color 0,0,0 : boxf 0,0, ginfo(10),80
getpos id_null, nx, ny, nz
getpos id_null_0, n0x, n0y, n0z
getpos id_null_1, n1x, n1y, n1z
;------------------------------------------------------------------------------
gpcnvaxis var_x,var_y,var_z, nx,ny,nz, 0 ; 3DºÂɸ¤ò 2DºÂɸ¤ØÊÑ´¹
// pos var_x,var_y //¹âÅÙ¼èÆÀÍѡᲫ¿§
;------------------------------------------------------------------------------
gpcnvaxis var0_x,var0_y,var0_z, n0x,n0y,n0z, 0 ; 3DºÂɸ¤ò 2DºÂɸ¤ØÊÑ´¹
// pos var0_x,var0_y //¾×ÆÍÃÏÅÀÍÑ¡áÀÖ¿§
;------------------------------------------------------------------------------
gpcnvaxis var1_x,var1_y,var1_z, n1x,n1y,n1z, 0 ; 3DºÂɸ¤ò 2DºÂɸ¤ØÊÑ´¹
// pos var1_x,var1_y //Ë¡Àþ½ªÅÀÍÑ¡áÀÄ¿§
;------------------------------------------------------------------------------
color 255,255,0
line var0_x,var0_y, var_x,var_y //¹âÅÙ¼èÆÀÍÑ¥Ù¥¯¥È¥ëÀþʬ
color 0,255,255
line var0_x,var0_y, var1_x,var1_y //Ë¡Àþ¥Ù¥¯¥È¥ëÀþʬ
;------------------------------------------------------------------------------
pos 100,5
color 255,255, 0 : mes "¹âÅÙ¼èÆÀÍÑ = "+nx+" / "+ny+" / "+nz+" ¢¡ ¹âÅÙ¼èÆÀÍÑ¥Ù¥¯¥È¥ëÀþʬ"
color 255, 0, 0 : mes "¾×ÆÍÃÏÅÀÍÑ = "+n0x+" / "+n0y+" / "+n0z
color 0,255,255 : mes "Ë¡Àþ½ªÅÀÍÑ = "+n1x+" / "+n1y+" / "+n1z+" ¢¡ Ë¡Àþ¥Ù¥¯¥È¥ëÀþʬ"
color 0,255, 0 : mes "ÂåÍѥ饸¥¢¥ó = "+vector_x+" / "+vector_y+" / "+vector_z+" ¢¡ ¥â¥Ç¥ëÀßÄê³ÑÅÙÍÑ"
redraw 1 ; ÉÁ²è½ªÎ»
await 1000/60 ; ÂÔ¤Á»þ´Ö
goto *main_loop
;¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£
*move_model
;[id_chara] ¥¡¼ÆþÎϤˤè¤ë°ÜÆ°(fv_vel)¤È¥¸¥ã¥ó¥×(fv_jump)
; [id_chara](¥Î¡¼¥É)¤Î¸þ¤¤ò ½é´üÃ;õÂÖ¤ËÈæ¤Ù¤Æ¤É¤Î¤¯¤é¤¤¤Î³ÑÅÙ¤ò¸þ¤¤¤Æ¤¤¤ë¤«¤Ç¼èÆÀ
getang id_chara, xr, yr, zr
fvset fvr, xr, yr, zr
; ¿Ê¹ÔÊý¸þ¥Ù¥¯¥È¥ë¤ò¸½ºß¤Î[id_chara](¥Î¡¼¥É)¤Î¸þ¤¤Ë²óž
;¢£ ¥Ù¥¯¥È¥ë¾è»»
fvmul fvr, -1,-1,-1 ;¢¡¢¡¢¡¢¡¢¡ fvdir ¤Î¥Ð¥°Âкö ¢¡¢¡¢¡¢¡¢¡
;¢£ ¥Ù¥¯¥È¥ë²óž ;¢£ [if key&2] ¥¡¼Áàºî¤Ë¤è¤ë²óž
fvdir fvr, fv_vel(0), fv_vel(1), fv_vel(2)
; ¸½ºß¤Î¸þ¤¤Ë¹ç¤ï¤»¤¿¿Ê¹ÔÊý¸þ¥Ù¥¯¥È¥ë¤ò¸½ºßÃͤ˲û»
addpos id_chara, fvr(0), fvr(1), fvr(2) ; ¼î²»¥â¥Ç¥ë
addpos id_model_board, fvr(0), fvr(1), fvr(2) ; Îп§ÈÄ¥â¥Ç¥ë
; [id_chara]¤Î°ÌÃÖ¤ò¥Ì¥ë¥Î¡¼¥É¤Ë¥»¥Ã¥È
getpos id_chara, px, py, pz
setpos id_null_0, px, py, pz
setpos id_null, px, py+5.0, pz
; ÃÏÌ̤ȤÎÀÜ¿¨¤¬¤¢¤ë¾ì¹ç¤Ï¡¢¼î²»¤Î¹â¤µ¤òÃÏÌ̤˹ç¤ï¤»¤ë¡£
gppraytest objid, id_null, 10.0
if (objid > 0) {
getwork id_null, wx, height, wz
gosub *work2
}
; ¥¸¥ã¥ó¥×
if flgJump = 1 {
; ¥¸¥ã¥ó¥×Ãæ¡Ê¶õÃæ¡Ë
; ½ÅÎϲîÅÙ¤Îʬ¤À¤±¥¸¥ã¥ó¥×®ÅÙ¤ò¸ºÂ®
addpos id_chara, fv_jump(0), fv_jump(1), fv_jump(2)
fvsub fv_jump, 0, 9.8/60, 0
; ¥¸¥ã¥ó¥×½ªÎ»¾ò·ï
getpos id_chara, px, py, pz
if py < height {
setpos id_chara, px, height, pz
fvset fv_jump, 0,0,0
flgJump = 0
}
} else {
; [id_chara]¤Î°ÌÃÖ¤òÃÏÌ̹⤵¤Ë°ÜÆ°¤¹¤ë¡£
getpos id_chara, px, py, pz
setpos id_chara, px, height, pz ; ¼î²»¥â¥Ç¥ë
setpos id_model_board, px, height, pz ; Îп§ÈÄ¥â¥Ç¥ë
}
return
;¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£¢£
*work2
; £Ù¼´²óž¤òºÇ½é¤ËÀßÄê¤Î [setangy](Y->X->Z¤Î½çÈÖ) ¤Ç¤Ê¤é¤Ð¡¢
; ¤½¤Î¸þ¤¤Ç¤Î£Ø,£Ú¼´²óž¤ÎÀßÄê¤Ë¤Ê¤ë¤À¤í¤¦¤«¤é¡¢
; °ìö¡¢[getwork2] ¤ÇÆÀ¤¿Ãͤò¡¢[setangy] ¤Ç¡¢¤½¤Î½çÈÖ¤ÇÀßÄꤷ¡¢
; [addang] ¤Ç¡¢£Ù¼´¤À¤±¤½¤Îʬ [¡¼] ¤·¤Æ¸µ¤ËÌᤷ¤Æ¤ä¤ë¡£
; ¤½¤Î¾å¤Ç¡¢¥¡¼Áàºî¤Ë¤è¤ë²óžÊý¸þ³ÑÅÙ¤ò£Ù¼´¤Ë [¡Ü] ¤·¤Æ¤ä¤ë¡£
getwork2 id_null,vector_x,vector_y,vector_z
; ¼î²»¥â¥Ç¥ë
setangy id_chara, vector_x,vector_y,vector_z
addang id_chara, 0.0, -vector_y, 0.0
addang id_chara, 0.0, (0.01*addang_cnt), 0.0
; Îп§ÈÄ¥â¥Ç¥ë
setangy id_model_board, vector_x,vector_y,vector_z
addang id_model_board, 0.0, -vector_y, 0.0
addang id_model_board, 0.0, (0.01*addang_cnt), 0.0
getpos id_chara, px, py, pz
getwork2 id_null,vector_x,vector_y,vector_z
setpos id_null_1,px+vector_x*4.5, py+vector_y*4.5, pz+vector_z*4.5
return
ʬ¤«¤ê¤Å¤é¤¤¤È»×¤¦¤Î¤Ç¡¢¶²½Ì¤Ç¤¹¤¬¡¢»ä¤Î¡Ø£Ø¡Ù¤ò¸«¤Æ¤¤¤¿¤À¤±¤ë¤È¤¢¤ê¤¬¤¿¤¤¤Ç¤¹¡£
¼è¤ê¤¢¤¨¤º¡¢²èÁü¤Ç¤¹¡£¡Ê¤Î¤Á¤ËÆ°²è¤â¡Ë
¤Þ¤¿¡¢ÀëÅÁ¤«¡¢¤È¸À¤ï¤ì¤½¤¦¤Ç¤¹¤¬¡£
https://twitter.com/akiakinohiroro/status/1780544895041798172
| |
|
2024/4/17(Wed) 21:11:47|NO.101550
º£ºî¤Ã¤Æ¤¤¤ë¡Ø¥Ç¥³¥Ü¥³¥ì¡¼¥¹¡Ù¤È¤¤¤¦¥²¡¼¥à¡¢
https://twitter.com/akiakinohiroro/status/1758662501242429737
https://twitter.com/akiakinohiroro/status/1764151399456338311
ÃÏÌ̤Υǥ³¥Ü¥³ÅÙ¤ò¶Ëü¤Ë¤â¤Ã¤È¾å¤²¤Æ¡¢ÀÚ¤êΩ¤Ã¤¿³³¤Î¤è¤¦¤ÊÃÏ·Á¤Ë¤·¤Æ¤â¡¢
¥²¡¼¥à¤È¤·¤Æ¤Ï¡¢¸½¾õ¡¢¤½¤ì¤Ê¤ê¤Ë¸«¤é¤ì¤ë(¥´¥Þ¥«¥·¤¬¸ú¤¯)ÄøÅ٤˼ý¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£
¤â¤Á¤í¤ó¡¢È¿Å¾¤·¤Æ¤¤¤ë¤è¤¦¤Ê³³¤Ï¡¢É¸¹â¤òµá¤á¤ë¡Ö¥Ì¥ë¡×¤ÎÀßÄ꤬ÉÔÅÔ¹ç¤Ë¤Ê¤ë¤Î¤Ç¡¢
¤½¤³¤Þ¤Ç¤Î¥Ç¥³¥Ü¥³Å٤ǤϤ¢¤ê¤Þ¤»¤ó¤¬¡£
¤Þ¤¿¤Þ¤¿¡¢¡Ø£Ø¡Ù¤ò»ý¤Á½Ð¤·¤Æ¤¹¤¤¤Þ¤»¤ó¡£
£³£Ä¤Ï¡¢¤É¤¦¤·¤Æ¤â¤³¤¦¤Ê¤ê¤¬¤Á¤Ê¤Î¤ò¤´Íý²ò²¼¤µ¤¤¡£
¸¡¾Ú¤ÎÆ°²è¡¢¤ªÂÔ¤Á¤¯¤À¤µ¤¤¡£¡ÊÂԤäƤʤ¤¤«¡Ë
¤Ê¤ª¡¢¸¡¾Ú¥¹¥¯¥ê¥×¥È¤Î¡¢[id_chara](¼î²»¤Ç¤Ê¤¯¼Ö)¤Ï¸þ¤¤¬¤ï¤«¤ë¤è¤¦¤Ë¤·¤¿[box]¤Ë¡¢
¤½¤·¤Æ¡¢»³ÂåÍѤÎ[id_ball]¤âŬÅö¤Ê¤â¤Î¤ËÃÖ¤´¹¤¨¤Æ¡¢¼Â¹Ô¤·¤Æ¤ß¤Æ失¤ë¤È¡¢¤¢¤ê¤¬¤¿¤¤¤Ç¤¹¡£
|
|
2024/4/17(Wed) 21:51:49|NO.101551
¤ï¤©¡¢ÌÌÇò¤½¤¦¤Ç¤¹¤Í¡£
>usagi¤µ¤ó¤Î¤â¤Î¤Ï¡¢¡ÖY¤Ï̵»ë¤¹¤ëºî¤ê¡×¤È¤Î¤³¤È¡£
¤Þ¤¿ÀâÌÀ¤¬Â¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡¢¤´Ä󼨤µ¤ì¤¿ÊýË¡¤¬
Ë¡Àþ¤ËÂФ·¤ÆY¼´¤ò+-ÂǤÁ¾Ã¤¹ºî¤ê¤ÎÍͤ˸«¤¨¤¿¤Î¤Ç¡¢
0¡Á60ÅÙ¤¯¤é¤¤¤Ç¡¢»î¹Ôºø¸í¤È¤¢¤¤¤Þ¤Ã¤Æ¤¤¤¤´¶¤¸¤Ë¥¬¥¿¥¬¥¿Æ°¤¤¤Æ¤¤¤ë¤Î¤Ç¤Ï¡©
¤È¤¤¤¦¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó¤Î¤ª»ý¤Á¤Î¥¹¥¯¥ê¥×¥È¤ËÂФ¹¤ëÁÛÁü¤Ç¤·¤¿¡£
¡ÊË¡Àþ¥Ù¥¯¥È¥ë¤ò³ÑÅÙÃͤˤϤ½¤Î¤Þ¤ÞÍøÍѤǤ¤Ê¤¤¤Ç¤¹¤è¤È¤¤¤¦°ÕÌ£¹ç¤¤¡Ë
»ä¤Î¥µ¥ó¥×¥ë¤Ë´Ø¤·¤Æ¤ÏË¡Àþ¤ËΩ¤Ä¤À¤±¤ÇY¼´²óž¤Ï¤·¤Æ¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢
ÀâÌÀ¤È¥µ¥ó¥×¥ë¤¬Æ±¤¸»ö¤Èº®Æ±¤µ¤»¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¡£
¿½¤·Ìõ¤´¤¶¤¤¤Þ¤»¤ó¡£
Ë¡ÀþÊý¸þ¤ËΩ¤Ã¤Æ¤¤¤ì¤Ð¸å¤Ï¤½¤ì¤ò¼´¤Ë¤·¤Æ²ó¤¹¤À¤±¤Ê¤Î¤Ç¡¢
´Êñ¤ËÂбþ¤Ç¤¤Þ¤¹¤«¤é¾¯¡¹¤ªÂÔ¤Á¤¯¤À¤µ¤¤¤Þ¤»¡£
¥²¡¼¥àÆ°²è¤âÇÒ¸«¤·¤Þ¤·¤¿¡£Ê·°Ïµ¤¥¤¥¤´¶¤¸¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£
¥²¡¼¥àÀ¤âÌÌÇò¤¤¤Ç¤¹¤Í¡£
µÕ¤Ë¤·¤Ã¤«¤êË¡Àþ¤ËΩ¤Ä¤È¼Ö¤Î¥µ¥¹¤òºÆ¸½¤äÊä´Ö¤·¤Ê¤¤¤È¾å¼ê¤¯
¿¶Æ°´¶¤¬½Ð¤Ê¤¤¤È¤â»×¤¤¤Þ¤¹¤Î¤Ç¡¢¡Ê̤Íè¤Î¼ÖŪ¤Ê¡Ë
²Ä°¦¤é¤·¤¤Ê·°Ïµ¤¤È¤â¤¢¤¤¤Þ¤Ã¤Æ¡¢ÌÌÇò¤¤Æ°¤¤Ë¤Ê¤Ã¤Æ¤Þ¤¹¡£
¹Í¤¨¤¬¹ç¤Ã¤Æ¤ë¤«¤É¤¦¤«¤Î¤´¼ÁÌä¤Ç¸À¤¦¤È´Ö°ã¤Ã¤Æ¤¤¤ë¤È»×¤¦¤Î¤Ç¤¹¤¬¡¢
¡ÊX¤Î¥¹¥¯¥·¥ç¤ÎË¡Àþ¤È¤â¥º¥ì¤Æ¤¤¤ë¤Î¤Ç¡Ë
½½Ê¬Ê·°Ïµ¤¤¬½Ð¤Æ¤¤¤Æ¡¢»ä¤Ï¤è¤í¤·¤¤¤Î¤Ç¤Ï¤È»×¤¤¤Þ¤·¤¿¡£
| |
|
2024/4/17(Wed) 22:23:24|NO.101552
¤É¤¦¤¾¡ª (¥é¥¸¥ª¥³¥ó°ÜÆ°¤Ë¤ÏÂбþ¤·¤Æ¤Þ¤»¤ó)
#include "hspmath.as"
#include "hgimg4.as"
; ¡ú·Ç¼¨ÈÄNO.93927¤«¤é¤Î¥³¥Ô¥Ú¡ÊÃæ¿È¤ÏÍý²ò¤¹¤ëɬÍפÏ̵¤¤¡Ë
#module
#deffunc qtset array a_qt, double a_x, double a_y, double a_z, double a_w
_r = a_w / 2 : _sin = sin(_r)
a_qt.0 = a_x * _sin : a_qt.1 = a_y * _sin : a_qt.2 = a_z * _sin
a_qt.3 = cos(_r)
return
#deffunc qtmul array a_qt, array a_q1, array a_q2
a_qt.0 = a_q1.3*a_q2.0 + a_q2.3*a_q1.0 + a_q1.1*a_q2.2 - a_q1.2*a_q2.1
a_qt.1 = a_q1.3*a_q2.1 + a_q2.3*a_q1.1 - a_q1.0*a_q2.2 + a_q1.2*a_q2.0
a_qt.2 = a_q1.3*a_q2.2 + a_q2.3*a_q1.2 + a_q1.0*a_q2.1 - a_q1.1*a_q2.0
a_qt.3 = a_q1.3*a_q2.3 - a_q1.0*a_q2.0 - a_q1.1*a_q2.1 - a_q1.2*a_q2.2
return
#global
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
; ¥«¥á¥é
setpos GPOBJ_CAMERA, 0,10,10 : gplookat GPOBJ_CAMERA, 0,0,0
; ¼´ (±¦¼êºÂɸ Y UP)
gpbox id_axis_x, 0.1, $FF0000 : setpos id_axis_x, 5 : setscale id_axis_x, 100,1,1
gpbox id_axis_y, 0.1, $00FF00 : setpos id_axis_y, ,5 : setscale id_axis_y, 1,100,1
gpbox id_axis_z, 0.1, $0000FF : setpos id_axis_z, ,,5 : setscale id_axis_z, 1,1,100
; ¾²
gpbox id_floor, 1, $00FFFF : setpos id_floor, 0,0 : setscale id_floor, 10, 0.1, 10
gppbind id_floor, 1
gppset id_floor,GPPSET_KINEMATIC,1
; ¥â¥Ç¥ë
gpload id_model,"res/tamane2"
setscale id_model, 0.01,0.01,0.01
r=0.0f : i=1.0f
*main
if r>1.4{i=-1}:if r<=-1.4{i=1}:r+=(0.01f*i):setang id_floor,0,0,r
gppraytest id, GPOBJ_CAMERA, 100
getwork GPOBJ_CAMERA, loc.0, loc.1, loc.2
getwork2 GPOBJ_CAMERA, norm.0, norm.1, norm.2
; Ë¡ÀþÊý¸þ¤ËΩ¤Ä¡ÊÁ°²ó¤Î¥µ¥ó¥×¥ë¡Ë
fvset vec_up, 0.0, 1.0, 0.0
fvset vec_axis, vec_up.0, vec_up.1, vec_up.2
fvouter vec_axis, norm.0, norm.1, norm.2 : fvunit vec_axis
fvset dot, vec_up.0, vec_up.1, vec_up.2
fvinner dot, norm.0, norm.1, norm.2
ang_rad = acos(dot.0)
qtset qua, vec_axis.0, vec_axis.1, vec_axis.2, ang_rad
; ¡ú¡ú¤³¤³¤«¤éÄɲáú¡ú
; ¥¡¼ÆþÎÏ
getkey ¢«, 37 : getkey ¢ª, 39
if ¢« : ang_model = 0.1 + ang_model
if ¢ª : ang_model = -0.1 + ang_model
; 1)Ë¡Àþ¤Î¼´¤ËÂФ·¤Æ²óž¤µ¤»¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤òºîÀ®
qtset qua2, norm.0, norm.1, norm.2, ang_model
; 2)¼´¤ËΩ¤Ã¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤È¼´¤Ë²óž¤µ¤»¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤ò¹çÀ®
qtmul qua3, qua2, qua
; 3)¥â¥Ç¥ë¤Ë¥»¥Ã¥È
setquat id_model, qua3.0, qua3.1, qua3.2, qua3.3
; ¡ú¡ú¤³¤³¤Þ¤Ç¡ú¡ú
redraw 0
gpdraw
color 255,255,255 : pos 0,0
mes strf("Ë¡Àþ:%3.2f, %3.2f, %3.2f", norm.0, norm.1, norm.2)
mes strf("¢«¢ª¥¡¼¤Ç¸þ¤:%3.2f", rad2deg(ang_model))
redraw 1
await 1000/60
goto *main
| |
|
2024/4/18(Thu) 01:19:35|NO.101553
ɬ»à¤Ç¤Ä¤¤¤Æ¤¤¤¤Þ¤¹¡ª¡ª¡Ê¥é¥¸¥³¥óÁàºîÂбþ)
>>¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó
¥²¡¼¥à²èÌ̤òÇÒ¸«¤·¤Þ¤·¤¿¡£
¥¢¥Ê¥í¥°¤Ê¥¿¥³¥á¡¼¥¿¡¼É½¼¨¤ä¡¢¥¢¥Ë¥Þ¥ë¤ò¥¬¥ó¥¬¥óíतޤ¯¤ë¤Î¤¬Îɤ¤¤Ç¤¹¡£
¥¹¥«¥¤¥Ü¥Ã¥¯¥¹¤¬¤¹¤´¤¤¤¤ì¤¤¡£¤É¤¦¤ä¤Ã¤Æ¤ë¤ó¤Ç¤·¤ç¤¦¤«¡£¡£¤¢¤ó¤Ê¤Ë¤¤ì¤¤¤Ê±À¤Ë¤Ç¤¤Ê¤¤¤ó¤Ç¤¹¤è¤Í¡£
¡¦¡¦¡¦¤ª¤ä¤¹¤ß¤Ê¤µ¤¤
#include "hspmath.as"
#include "hgimg4.as"
; ¡ú·Ç¼¨ÈÄNO.93927¤«¤é¤Î¥³¥Ô¥Ú¡ÊÃæ¿È¤ÏÍý²ò¤¹¤ëɬÍפÏ̵¤¤¡Ë
#module
#deffunc qtset array a_qt, double a_x, double a_y, double a_z, double a_w
_r = a_w / 2 : _sin = sin(_r)
a_qt.0 = a_x * _sin : a_qt.1 = a_y * _sin : a_qt.2 = a_z * _sin
a_qt.3 = cos(_r)
return
#deffunc qtmul array a_qt, array a_q1, array a_q2
a_qt.0 = a_q1.3*a_q2.0 + a_q2.3*a_q1.0 + a_q1.1*a_q2.2 - a_q1.2*a_q2.1
a_qt.1 = a_q1.3*a_q2.1 + a_q2.3*a_q1.1 - a_q1.0*a_q2.2 + a_q1.2*a_q2.0
a_qt.2 = a_q1.3*a_q2.2 + a_q2.3*a_q1.2 + a_q1.0*a_q2.1 - a_q1.1*a_q2.0
a_qt.3 = a_q1.3*a_q2.3 - a_q1.0*a_q2.0 - a_q1.1*a_q2.1 - a_q1.2*a_q2.2
return
#global
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
; ¥«¥á¥é
setpos GPOBJ_CAMERA, 0,10,10 : gplookat GPOBJ_CAMERA, 0,0,0
; ¼´ (±¦¼êºÂɸ Y UP)
gpbox id_axis_x, 0.1, $FF0000 : setpos id_axis_x, 5 : setscale id_axis_x, 100,1,1
gpbox id_axis_y, 0.1, $00FF00 : setpos id_axis_y, ,5 : setscale id_axis_y, 1,100,1
gpbox id_axis_z, 0.1, $0000FF : setpos id_axis_z, ,,5 : setscale id_axis_z, 1,1,100
; ¾²
gpbox id_floor, 1, $00FFFF : setpos id_floor, 0,0 : setscale id_floor, 10, 0.1, 10
gppbind id_floor, 1
gppset id_floor,GPPSET_KINEMATIC,1
; ¥â¥Ç¥ë
gpload id_model,"res/tamane2"
setscale id_model, 0.01,0.01,0.01
r=0.0f : i=1.0f
;¡ü¥ì¥¤¥Æ¥¹¥ÈÍѥܥ寥¹
gpbox id_box,0.5
*main
if r>1.4{i=-1}:if r<=-1.4{i=1}:r+=(0.01f*i):setang id_floor,0,0,r
gppraytest id, GPOBJ_CAMERA, 100
getwork GPOBJ_CAMERA, loc.0, loc.1, loc.2
getwork2 GPOBJ_CAMERA, norm.0, norm.1, norm.2
; Ë¡ÀþÊý¸þ¤ËΩ¤Ä¡ÊÁ°²ó¤Î¥µ¥ó¥×¥ë¡Ë
fvset vec_up, 0.0, 1.0, 0.0
fvset vec_axis, vec_up.0, vec_up.1, vec_up.2
fvouter vec_axis, norm.0, norm.1, norm.2 : fvunit vec_axis
fvset dot, vec_up.0, vec_up.1, vec_up.2
fvinner dot, norm.0, norm.1, norm.2
ang_rad = acos(dot.0)
qtset qua, vec_axis.0, vec_axis.1, vec_axis.2, ang_rad
; ¡ú¡ú¤³¤³¤«¤éÄɲáú¡ú
; ¥¡¼ÆþÎÏ
getkey ¢«, 37 : getkey ¢ª, 39
getkey ¢¬, 38 : getkey ¢, 40
if ¢« : ang_model = 0.1 + ang_model
if ¢ª : ang_model = -0.1 + ang_model
; 1)Ë¡Àþ¤Î¼´¤ËÂФ·¤Æ²óž¤µ¤»¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤òºîÀ®
qtset qua2, norm.0, norm.1, norm.2, ang_model
; 2)¼´¤ËΩ¤Ã¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤È¼´¤Ë²óž¤µ¤»¤¿¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤ò¹çÀ®
qtmul qua3, qua2, qua
; 3)¥â¥Ç¥ë¤Ë¥»¥Ã¥È
setquat id_model, qua3.0, qua3.1, qua3.2, qua3.3
; ¡ú¡ú¤³¤³¤Þ¤Ç¡ú¡ú
;=====¡üÄɲÃ
if ¢¬ : addfwd id_model, 0.1,0,0,1
if ¢ : addfwd id_model,-0.1,0,0,1
getpos id_model,x,y,z:getquat id_model ,qx,qy,qz,qw
setpos id_box ,x,y,z:setquat id_box ,qx,qy,qz,qw
addfwd id_box ,5,0,1,0
gplookat id_box,x,y,z
gppraytest var,id_box,100
if var>0{
getwork id_box ,wx,wy,wz
setpos id_model,wx,wy,wz
}
;=====¡ü¤³¤³¤Þ¤Ç
redraw 0
gpdraw
color 255,255,255 : pos 0,0
mes strf("Ë¡Àþ:%3.2f, %3.2f, %3.2f", norm.0, norm.1, norm.2)
mes strf("¢«¢ª¥¡¼¤Ç¸þ¤:%3.2f", rad2deg(ang_model))
mes "¢¬¢¥¡¼¤ÇÁ°¿Ê¸åÂà"
redraw 1
await 1000/60
goto *main
;=============================================================================
;XYZ¼´¤Ø¤ÎÁ°¿Ê(forword)¤ò¹Ô¤¦¥¯¥ª¡¼¥¿¥Ë¥ª¥ó¤òÀ¸À®¤¹¤ë;¥í¡¼¥«¥ëºÂɸ¤Î·×»»¤Î¥·¥ç¡¼¥È¥«¥Ã¥ÈÌ¿Îá
;_speedÊÑ¿ô¤¬Â®ÅÙ¡¢_sx,_sy,_sz¤ò¤½¤ì¤¾¤ì1¤Ë¤¹¤ë¤È¤½¤ÎÊý¸þ¤Ø¿Ê¤à
#deffunc addfwd int _id_model,double _speed,double _sx,double _sy,double _sz
sx=_sx*_speed;¢«1¤Ë¤¹¤ë¤Èx¼´¤Ø¤ÎÁ°¿Ê
sy=_sy*_speed;¢«1¤Ë¤¹¤ë¤Èy¼´¤Ø¤ÎÁ°¿Ê
sz=_sz*_speed;¢«1¤Ë¤¹¤ë¤Èz¼´¤Ø¤ÎÁ°¿Ê
sw=0f
getquat _id_model,qx,qy,qz,qw
vec4_a=qx,qy,qz,qw ;¸½ºß¥¯¥ª¡¼¥¿¥Ë¥ª¥ó
vec4_b=sx,sy,sz,sw ;¥í¡¼¥«¥ë°ÌÃÖ
vec4_c=-qx,-qy,-qz,qw;¶¦Ìò¥¯¥ª¡¼¥¿¥Ë¥ª¥ó
qtmul vec4_d,vec4_a,vec4_b
qtmul vec4_e,vec4_d,vec4_c
getpos _id_model,px,py,pz
setpos _id_model,vec4_e(0)+px,vec4_e(1)+py,vec4_e(2)+pz;¿·°ÌÃÖ¡á·ë²Ì+µì°ÌÃÖ
return
| |
|
2024/4/18(Thu) 05:01:18|NO.101554
>buhio¤µ¤ó
¤¹¤´¤Ã¡ª¤Ê¤ó¤«¶¦Æ±¤Ç¥×¥í¥°¥é¥àÁȤó¤Ç¤ë¸«¤¿¤¤¤ÇÌÌÇò¤¤¤Ç¤¹¤Í¡£
¿·¤¿¤Êȯ¸«¤¬¤¢¤Ã¤ÆÊÙ¶¯¤Ë¤Ê¤ê¤Þ¤¹¤ë¡£"addfwd"ĶÊØÍø¤ÊÌ¿ÎáÄɲ䷤Ƥ롪Êݸ¤·¤Þ¤·¤¿¡Ê¾Ð¡Ë
¿²¤è¤¦¤È»×¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢»×¤ï¤º¥³¥á¥ó¥È¤·¤Á¤ã¤¤¤Þ¤¤¤·¤¿¡£
>¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó
¸¡¾Ú¥¹¥¯¥ê¥×¥È¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
»ä¤Ï¥â¥Ç¥ë¤ò»ý¤Ã¤Æ¤Ê¤¤¤Î¤Çid_ball¤òduck¤ÎƬ,id_chara¤òtamane2¤ËÃÖ¤´¹¤¨¤Æ³Îǧ¤·¤Þ¤·¤¿¡£
¿§¡¹»î¤·¤Þ¤·¤¿¤¬¡¢Ë¡Àþ¤Ë¤½¤Ã¤Æ¤Ï¤ª¤é¤º¡¢
·¹¸þ¤È¤·¤ÆË¡Àþ¤¬X¼´Êý¸þ¤Î»þ¤Ï³ÑÅÙ¤¬¤º¤ì¤Æ¤¤¤Z¼´Êý¸þ¤ÏµÕÊý¸þ¤ò¸þ¤¤¤Æ¤¤¤ë¤è¤¦¤Ç¤·¤¿¡£
¢¨¤¿¤À¡¢¤½¤Î¥¬¥¿¥¬¥¿´¶¤¬¥²¡¼¥à¤ÎÌ£¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤«¤â
¢¨¤¢¤È¡¢·¹¼Ð¤¬¥¥Ä¥¤½ê¤Ï¤«¤¨¤Ã¤ÆË¡Àþ¤Ëź¤ï¤Ê¤¤»ö¤Ë¤è¤êÊ¿ÃϤ«¤éÆþ¤Ã¤¿»þ¤Ë³ê¤é¤«¤Ë¸«¤¨¤ë¡Ê·¹¤¤¹¤®¤Ê¤¤¤Î¤Ç¡Ë
¤È¤¤¤¦¤ï¤±¤Ç¡¢¤´Ä󼨤¤¤¿¤À¤¤¸¡¾Ú¤Ë»÷¤¿¤è¤¦¤Ê¥¢¥×¥í¡¼¥Á¤ÇË¡Àþ¤Ë¥â¥Ç¥ë¤òź¤ï¤»¤Æ¤ß¤Þ¤·¤¿¡£
¿§¡¹¤Ê³ÑÅ٤Ǹ¡¾Ú¤·¤Þ¤·¤¿¤¬¡¢Ë¡Àþ¤Ë¤½¤Ã¤¿·Á¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È»×¤¤¤Þ¤¹¡£
¢¨buhio¤µ¤ó¤Î¥µ¥ó¥×¥ë¤ÎÊý¤¬¤â¤Ã¤È¹âÅ٤ʻö¤¬¤Ç¤¤ë¤È»×¤¤¤Þ¤¹¡£
¤ä¤Ï¤ê¡¢"¶µ¤¨¤Æ"¥¹¥ì¤Î²óÅú¤È¤·¤Æ¤Ï¡¢Á°¸åº¸±¦¤Î·¹¤¤ò¼èÆÀºÆ¸½ÍøÍѤϽÐÍè¤Æ¤¤¤Ê¤¤¤È»×¤¤¤Þ¤¹¤·¡¢
¹Í¤¨Êý¤È¤·¤Æ¤â¹ç¤Ã¤Æ¤¤¤Ê¤¤¤È»×¤¤¤Þ¤¹¡£¥¹¥Ã¥¥ê¤·¤Þ¤¹¤«¤Í¤§¡£¡£¡£
¢¨¤â¤·¤«¤·¤Æ»ä¡¢¼ÁÌä¤Î°Õ¿Þ¤ò´ª°ã¤¤¤·¤Æ¤¤¤ë¤Î¤«¤Ê¤¡¡£¤¤¤Ä¤Ë¤â¤Þ¤·¤ÆÆñ¤·¤¤¤Ç¤¹¤Í¡£
¢¨ºî¤é¤ì¤¿Êª¤òÈÝÄꤹ¤ë°ÕÌ£¤Ç¤Ï¤Ê¤¤¤Ç¤¹¤Î¤Ç°¤·¤«¤é¤º¡£ÁÇÀ²¤é¤·¤¤¥²¡¼¥à¤À¤È»×¤¤¤Þ¤¹¡£
#include "hspmath.as"
#include "hgimg4.as"
#module
#deffunc qtset array a_qt, double a_x, double a_y, double a_z, double a_w
_r = a_w / 2 : _sin = sin(_r)
a_qt.0 = a_x * _sin : a_qt.1 = a_y * _sin : a_qt.2 = a_z * _sin
a_qt.3 = cos(_r)
return
#deffunc qtmul array a_qt, array a_q1, array a_q2
a_qt.0 = a_q1.3*a_q2.0 + a_q2.3*a_q1.0 + a_q1.1*a_q2.2 - a_q1.2*a_q2.1
a_qt.1 = a_q1.3*a_q2.1 + a_q2.3*a_q1.1 - a_q1.0*a_q2.2 + a_q1.2*a_q2.0
a_qt.2 = a_q1.3*a_q2.2 + a_q2.3*a_q1.2 + a_q1.0*a_q2.1 - a_q1.1*a_q2.0
a_qt.3 = a_q1.3*a_q2.3 - a_q1.0*a_q2.0 - a_q1.1*a_q2.1 - a_q1.2*a_q2.2
return
#global
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
; ÀßÄê¡Ê;¤ê½ÅÍפǤʤ¤¤Î¤Ç·Ç¼¨ÈÄÍѤËû½Ì¡Ë
setpos GPOBJ_CAMERA, 0,15,15 : gplookat GPOBJ_CAMERA, 0,0,0
gpbox id_floor, 1, $00FFFF : setscale id_floor, 50, 0.1, 50 : gppbind id_floor, 0
gpload id_duck,"res/duck" : setpos id_duck,-3,-8 : setscale id_duck, 10,10,10
gppbind id_duck, 0 ,, GPPBIND_MESH
gpload id_model,"res/tamane2" : setscale id_model, 0.01,0.01,0.01
gpbox id_box,0.5,0xff00ff : setpos id_box, 0,5,0 : setang id_box,-M_PI/2
speed = 0.05
; ¥á¥¤¥ó¥ë¡¼¥×
*main
; 2DŪ¤Ê¥é¥¸¥³¥ó²óž°ÜÆ°
getkey ¢«, 37 : getkey ¢ª, 39 : getkey ¢¬, 38 : getkey ¢, 40
if ¢« : ang_model = 0.1 + ang_model
if ¢ª : ang_model = -0.1 + ang_model
if ¢¬ : addpos id_box, sin(ang_model)*speed,, cos(ang_model)*speed
if ¢ : addpos id_box,-sin(ang_model)*speed,,-cos(ang_model)*speed
; ¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó¤ÎÍͤÊ2D°ÜÆ°¤Ë¹â¤µ¤ò¡Ü¤·¤¿Íͤʥ¢¥×¥í¡¼¥Á
; ¹âÅÙÍѤΥܥ寥¹¤«¤é²¼¤Ë¥ì¥¤¥¥ã¥¹¥È¡Ê¤Ê¤Î¤ÇÈ¿¤êÊ֤볳¤ÏÂбþ½ÐÍè¤Ê¤¤)
gppraytest var,id_box,100
getwork id_box, wx,wy,wz
getwork2 id_box, norm.0, norm.1, norm.2
setpos id_model,wx,wy,wz
setpos id_box,wx,wy+5,wz
gpcnvaxis s.0, s.1, s.2, wx,wy,wz
gpcnvaxis e.0, e.1, e.2, wx+norm.0, wy+norm.1, wz+norm.2
; Ë¡ÀþÊý¸þ¤ËΩ¤Ã¤Æ²óž(Á°²ó¤«¤éÊѹ¹¤Ê¤·)
fvset vec_up, 0.0, 1.0, 0.0
fvset vec_axis, vec_up.0, vec_up.1, vec_up.2
fvouter vec_axis, norm.0, norm.1, norm.2 : fvunit vec_axis
fvset dot, vec_up.0, vec_up.1, vec_up.2
fvinner dot, norm.0, norm.1, norm.2
ang_rad = acos(dot.0)
qtset qua, vec_axis.0, vec_axis.1, vec_axis.2, ang_rad
qtset qua2, norm.0, norm.1, norm.2, ang_model
qtmul qua3, qua2, qua
setquat id_model, qua3.0, qua3.1, qua3.2, qua3.3
; ---------------------
redraw 0 : gpdraw
color 255,0,255 : line s.0, s.1, e.0, e.1
mes strf("Ë¡Àþ:%+1.2f, %+1.2f, %+1.2f", norm.0, norm.1, norm.2),4
redraw 1 : await 1000/60
goto *main
¢¨Í¾ÃÌ¢¨
>¤¿¤À¡¢[#deffunc]¤Ë´·¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢¤³¤Á¤é¤â»þ´Ö¤¬¡£
¤´Â¸¤¸¤Ç¤·¤¿¤é¿½¤·Ìõ¤Ê¤¤¤Ç¤¹¤¬¡¢¥Þ¥Ë¥å¥¢¥ë¤Ï¤³¤Á¤é¤Ç¤¹¡£
https://www.onionsoft.net/hsp/v33/doclib/module.htm
¿·µ¬Ì¿Îá¤òÄɲ乤ë¤â¤Î¤Ê¤Î¤Ç¡¢´ðËÜ¥³¥Ô¥Ú¤ÇÎɤ¤¤È¤Ï»ä¤Ï»×¤Ã¤Æ¤Þ¤¹¡£
¢¨»ä¤Ï¶µ¤¨¤Æ¥¹¥ì¤Ë½ñ¤¹þ¤ó¤À¥¹¥¯¥ê¥×¥È¤Ë¸¢Íø¼çÄ¥¤¹¤ë¤Î¤Ï¥Ê¥ó¥»¥ó¥¹ÇɤʤΤǡ£¡£¡£
¡¡¡Ê¤½¤¦¤¤¤¦¤Î¤Ï¥ª¡¼¥×¥ó¤Ë¤¹¤ë¤Ù¤¤Ç¤Ê¤¤¤·¡¢¥×¥í¥×¥é¥¤¥¨¥¿¥ê¤Ç¤ä¤Ã¤Æ¤Í¤È¡Ë
Ãæ¿È¤Ë¶½Ì£¤¬½Ð¤¿¤é¡¢¼ÁÌä¤ä²òÀϤ¹¤ë¤È¤«¤¬¤è¤í¤·¤¤¤«¤È¸¤¸¤Þ¤¹¤Î¤Ç¡¢
µ¤³Ú¤Ë»È¤¤»Ï¤á¤Æ¤ß¤ë¤È¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤óºîÉʵ¬ÌϤÀ¤È¡¢
µºÜÎ̤¬ÂçÉý¤Ë¸º¤ë¤Î¤Ç¡¢·ë²Ì¤È¤·¤Æ¤«¤Ê¤ê»þû¤Ë¤Ê¤ê¤½¤¦¤È»×¤¤¤Þ¤·¤¿¡£
¤¿¤È¤¨¤Ð line ¤È¸À¤¦Ì¿Îá¤òÉáÃʻȤ¦¤È»×¤¤¤Þ¤¹¤¬¡¢¤½¤ÎÃæ¿È¤Ï¤â¤Î¤¹¤´¤¯Ê£»¨¤Ê¤ó¤Ç¤¹¤è¤Í¡£
¤½¤ì¤òï¤Ç¤â´Êñ¤Ë»È¤¨¤ë¤è¤¦¤ËÌ¿Îá¤Î·Á¤ÇÄ󶡤·¤Æ¤¤¤ë¤ï¤±¤Ç¤¹¡£
circle ¤È¸À¤¦Ì¿Îá¤â¤¢¤ê¤Þ¤¹¤¬¡¢»ä¤Ï°ÊÁ°¡¢±ß¤òÉÁ¤¯¤³¤È¤â½ÐÍ褺ºÃÀÞ¤·¤¿»ö¤¬¤¢¤ê
ºÇ¶á¤Ï¼«Á°¤Ç±ß¤òÉÁ¤¯¤Î¤Ç¤Ï¤Ê¤¯¤³¤ÎÌ¿Îá¤Ë¤¿¤è¤ê¤¤Ã¤Æ¤Þ¤¹¡£
| |
|
2024/4/18(Thu) 07:22:18|NO.101555
»ä¤Î[getwork2]¤Î¸¡¾Ú¤Ç¡¢¤ä¤Ï¤ê¡¢¥â¥Ç¥ë¤Î·¹¤¤¬Ë¡Àþ¤È¥º¥ì¤Æ¤¤¤ë¤³¤È¡¢
»ë³ÐŪ¤Ë¤Ï¤Ã¤¤ê¤·¤Þ¤·¤¿¡£
¥¹¥ì¥Ã¥ÉËÁƬ¤Ë½ñ¤¤Þ¤·¤¿¤è¤¦¤Ë¡¢
>¤³¤Î[getwork2]¤Î¼èÆÀÃͤò³ÑÅ٤Τ褦¤Ë´ª°ã¤¤¤·¤Æ¤¤¤Þ¤·¤¿¡£
Á´¤Æ¤Ï¡¢¤³¤Î¡Ø´ª°ã¤¤¡Ù¤«¤é»Ï¤Þ¤ê¤Þ¤·¤¿¡£
¤½¤ÎÃÏÅÀ¤Ë¤ª¤±¤ë¡¢Ë¡Àþ¥Ù¥¯¥È¥ë¤Î³ÆÀ®Ê¬¤ÎÀµµ¬²½¿ôÃͤǤ¢¤ë¤â¤Î¤ò¡¢
¤Þ¤ë¤Ç¡¢Ë¡Àþ¥Ù¥¯¥È¥ë¤Î³ÑÅÙ¤ò[£Ø,£Ù,£Ú]¤Î·Á¤Çɽ¤ï¤·¤¿¤â¤Î¡¢
[setang]Åù¤Ë»È¤¨¤ë¡Ö¥é¥¸¥¢¥ó¡×¤Ç¤¢¤ë¤«¤Î¤´¤È¤¯¡¢¡Ø´ª°ã¤¤¡Ù»×¤¤°ã¤¤¤ò¤·¤¿¤Î¤Ç¤·¤¿¡£
¤½¤³¤«¤é¡¢°Àï¶ìÆ®¡¢»î¹Ôºø¸í¡¢¥È¥é¥¤¡õ¥¨¥é¡¼¡¢¤Ç¹Ô¤Ã夤¤¿¤Î¤¬¡¢»ä¤Î[getwork2]Êý¼°¤Ç¤·¤¿¡£
¤Ç¤¹¤«¤é¡¢¡Ø´ª°ã¤¤¡Ù¤Ëµ¤¤Å¤¤¤Æ¤«¤é¤Ï¡¢¤³¤ÎÊý¼°¤¬¹Í¤¨Êý¤È¤·¤Æ´Ö°ã¤Ã¤Æ¤¤¤ë¤À¤í¤¦¤³¤È¤Ï¡¢
¤¦¤¹¤¦¤¹Ê¬¤«¤Ã¤Æ¤¤¤Þ¤·¤¿¡£¤½¤ì¤Ë¤â´Ø¤ï¤é¤º¡¢
>¶öÁ³¤À¤È¤·¤Æ¤â¡¢¶öÁ³¤Ë»×¤¨¤Ê¤¤²¿¤«¤¬¤¢¤ë
¼ÂºÝ¾å¡¢¤½¤¦´¶¤¸¤Æ¤·¤Þ¤¦¤Û¤É¤Ë¡¢¥×¥í¥°¥é¥à¼Â¹Ô·ë²Ì¤¬¾å¼ê¤¯ÅÔ¹ç¤è¤¯Æ°¤¤¤Æ¤¯¤ì¤¿¤Î¤Ç¤¹¡£
usagi¤µ¤ó¤Î¤ª¤Ã¤·¤ã¤ë¤è¤¦¤Ë
>·¹¸þ¤È¤·¤ÆË¡Àþ¤¬X¼´Êý¸þ¤Î»þ¤Ï³ÑÅÙ¤¬¤º¤ì¤Æ¤¤¤Z¼´Êý¸þ¤ÏµÕÊý¸þ¤ò¸þ¤¤¤Æ¤¤¤ë¤è¤¦¤Ç¤·¤¿¡£
>·¹¼Ð¤¬¥¥Ä¥¤½ê¤Ï¤«¤¨¤Ã¤ÆË¡Àþ¤Ëź¤ï¤Ê¤¤»ö¤Ë¤è¤êÊ¿ÃϤ«¤éÆþ¤Ã¤¿»þ¤Ë³ê¤é¤«¤Ë¸«¤¨¤ë
(Z¼´Êý¸þ¤ÏµÕÊý¸þ.....¤³¤ì¤¬Ê¬¤«¤é¤Ê¤¤¤Î¤Ç¤¹¤¬)
¡Ø£Ø¡Ù¤ÎÆ°²è¤Ï¡¢¥â¥Ç¥ë¸åÊý¤¹¤°¤ÎÃÏÅÀ¤«¤é¤Î¥«¥á¥é»ëÅÀ¡¢
¤ª¤è¤Ó¼ÖºÜ¥«¥á¥é»ëÅÀ(Æ°¤¤¬¼Ö¤ËƱ´ü)¤Ê¤Î¤Ç¡¢¥´¥Þ¥«¥·¤¬½ÐÍè¤Æ¤¤¤ë¤è¤¦¤Ë¤â»×¤¤¤Þ¤¹¡£
¤·¤«¤·¡¢¤¢¤ëÄøÅ٤ε÷Î¥¤«¤é¤ÎÊÌ¥«¥á¥é»ëÅÀ¤ÎÆ°²è(¤Þ¤¿¤Ç¡¢¤¹¤¤¤Þ¤»¤ó)¤òÌܤò¶Å¤é¤·¤Æ¤ß¤Æ¤â¡¢
¾å¼ê¤¯¹Ô¤²á¤®¤Æ¤¤¤ë¤È¡¢¼«Ê¬¤Ê¤¬¤é»×¤Ã¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ç¤¹¡£
(Á´²èÌ̳ÈÂçɽ¼¨¤Ç³Îǧ / ¤â¤Á¤í¤ó¡¢¥×¥í¥°¥é¥à¼Â¹Ô¤Ç¤â³Îǧ)
https://twitter.com/akiakinohiroro/status/1726143022717673911
https://twitter.com/akiakinohiroro/status/1732535218354241657
¤Ç¡¢²¿¸Î¡¢¤½¤¦¤Ê¤Ã¤Æ¤¯¤ì¤¿¤Î¤«¡¢ÉԻ׵Ĥ˻פ¤¡¢¹Í¤¨¤Æ¤ß¤¿¤¯¤Ê¤Ã¤¿¤Î¤Ç¤·¤¿¡£
>buhio¤µ¤ó¡¢usagi¤µ¤ó
¤³¤ó¤Ê¡Ø´ª°ã¤¤¡Ù¤Ë¡¢Ä¹¤¯¤ªÉÕ¤¹ç¤¤¤¤¤¿¤À¤¡¢ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
ÆÃÄê¤ÎÌ¿Îá¤òÌÓ·ù¤¤¤»¤º¡¢µñÀäÈ¿±þ¤ò¹îÉþ¤·¤Æ¡¢´èÄ¥¤Ã¤Æ¤¤¤¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
°Ê¾å¡¢°ì±þ¤Î²ò·è¤ÈÃפ·¤Þ¤¹¡£
¤½¤ì¤Ç¡¢¼¡¤Ê¤ëÌÜɸ¤Ï¡¢
¡Ø±²´¬¤ÃèÊ֤ꤹ¤ë¥¸¥§¥Ã¥È¥³¡¼¥¹¥¿¡¼¡Ù
| |
|
2024/4/19(Fri) 05:25:31|NO.101559
²ò·è¤È¤·¤Þ¤·¤¿¤¬¡¢usagi¤µ¤ó¤´»ØŦ¤Î
>Z¼´Êý¸þ¤ÏµÕÊý¸þ¤ò¸þ¤¤¤Æ¤¤¤ë
¤¬¡¢¤É¤¦¤·¤Æ¤âµ¤¤Ë¤Ê¤Ã¤Æ¡¢¿§¡¹¤ä¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
[¢«,¢ª]¥¡¼¤Ë¤è¤ë[addang]¤ÇÁý¸º¤µ¤»¤ëÃͤòÊѤ¨¤Æ¤ß¤¿¾ì¹ç¤Î¤³¤È¤Ç¤¹¤¬¡¢
[if]¤ÎÃæ¤Î[¡»¡»*addang_cnt]¤Î²Õ½ê¤â¤½¤ÎÃͤËľ¤¹¤È¤È¤â¤Ë¡¢
[*work2]Æâ¤Î[¡»¡»*addang_cnt]¤âÊѹ¹¤·¤Ê¤¤¤È¡¢²óž¤¬¤ª¤«¤·¤¯¤Ê¤ê¤Þ¤¹¡£
Î㤨¤Ð¡¢Ãͤò[1][-1]¤«¤é¡¢[2][-2]¤ËÊѤ¨¤¿¾ì¹ç¡¢[*work2]Æâ¤òÊѹ¹¤·Ëº¤ì¤ë¤È¡¢
¥â¥Ç¥ë¤òȾ²óž¤µ¤»¤¿»þÅÀ¤Ç¡¢¸þ¤¤¬È¿Å¾¤·¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
usagi¤µ¤ó¤Î¡ÖµÕÊý¸þ¡×¤Ï¤³¤Î¾õÂÖ¤«¤È»×¤¤¤Þ¤¹¡£
°ã¤Ã¤Æ¤¤¤¿¤é¡¢¤¹¤¤¤Þ¤»¤ó¡£
Æ°²è¡¢ºÜ¤»¤Þ¤·¤¿¡£
|
|
2024/4/19(Fri) 17:52:19|NO.101560
²ò·è¡£¡£¡£¤·¤Æ¤Ê¤«¤Ã¤¿¤Ç¤¹¤Í¤§¡£¡£¡£¥¶¥ó¥Í¥ó¡£
¤¹¤ß¤Þ¤»¤ó¡£»ä¤Ï¥½¡¼¥·¥ã¥ë¥µ¡¼¥Ó¥¹¤òÍøÍѤ·¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢Æ°²è¤¬¸«¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¤¹¤¬¡£
>usagi¤µ¤ó¤Î¡ÖµÕÊý¸þ¡×¤Ï¤³¤Î¾õÂÖ¤«¤È»×¤¤¤Þ¤¹¡£
¤¤¤¤¤¨¡¢¥â¥Ç¥ë¤òɸ½à¤Î¥µ¥ó¥×¥ë¤ËÊѹ¹¤·¤¿°Ê³°¡¢¥¹¥¯¥ê¥×¥È¤Î²þÊѤϹԤäƤª¤ê¤Þ¤»¤ó¡£
XYÊ¿Ì̤ÎÂè1,2¾Ý¸Â¤Ç¡Ê¥Ç¥Õ¥©¤Î¥«¥á¥é+z¦¤«¤é¸¶ÅÀ¤ò¸«¤¿»þ¡Ë¤ÎË¡Àþ¤ËÂФ¹¤ë³ÑÅÙ¤Ç
>X¼´Êý¸þ¤Î»þ¤Ï³ÑÅÙ¤¬
º¸¤«¤é±¦¤Ø-x¤«¤é+x¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤Ï³ÑÅÙ¤¬¥º¥ì¤ë¡£
(Ë¡Àþ¤ËÂФ·Y¼´¤ËÂФ·¤Æ¤Î³ÑÅÙ¤¬Àõ¤¯¤Ê¤ë)
¢¨Ë¡Àþ¤¬[-1,0,0]->[0,1,0]->[1,0,0]¡¡¤ÎÈϰϤȤ¤¤¦°ÕÌ£
>Z¼´Êý¸þ¤ÏµÕÊý¸þ
¸å¤«¤éÁ°¤Ø¡¢-z¤«¤é+z¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤ÏXYÊ¿Ì̤ÇË¡Àþ¤ÎÊý¸þ¤ÈÀþÂоΤÎÊý¸þ¤Ë¤Ê¤ë¡£
¡Ê¤³¤ì¤òµÕ¤Ë·¹¤¤¤Æ¤ë¤Èɽ¸½¤·¤Þ¤·¤¿¡Ë
¢¨Ë¡Àþ¤¬[0,0,-1]->[0,1,0]->[0,0,-1]¡¡¤ÎÈϰϤȤ¤¤¦°ÕÌ£
¥ª¥¤¥é¡¼³Ñ¤Î²óž½çÈÖ¤ÎÌäÂê¤È¡¢Ë¡Àþ0¡Á1¤ò³ÑÅÙrad¤Ë¤½¤Î¤Þ¤Þ¥Ä¥Ã¥³¤à¤È¤¤¤¦
»ÈÍÑÊýË¡¤Ë¤è¤ê¤½¤ÎÍͤˤʤë¤È»×¤ï¤ì¤Þ¤¹¤·¡¢¼ÂºÝ¤Ë¤½¤ÎÍͤˤʤäƤª¤ê¤Þ¤·¤¿¡£
¼Ö¤òtamane¤ÎÍͤʿŤ¬¹â¤¤¥â¥Ç¥ë¤ËÊѹ¹¤·¤Æ¤ß¤ë¤ÈË¡Àþ¤È¹ç¤Ã¤Æ¤¤¤Ê¤¤»ö¤¬¥Ï¥Ã¥¥ê¤Èʬ¤«¤ë¤«¤È»×¤¤¤Þ¤¹¡£
¤´²óÅú¤Ë¤Ê¤Ã¤Æ¤ª¤ê¤Þ¤¹¤Ç¤·¤ç¤¦¤«¡£
|
|
2024/4/20(Sat) 00:23:47|NO.101571
£³£Ä¤Î·¹¤¤ò¸ÀÍÕ¤ÇÀµ³Î¤Ëɽ¸½¤¹¤ë¤Î¤ÏÆñ¤·¤¤¡£
¡Ö¥â¥Ç¥ë¤òɸ½à¤Î¥µ¥ó¥×¥ë¤ËÊѹ¹¡×¤·¤¿¤À¤±¤Ê¤ó¤Ç¤¹¤Í¡£
(¼Ö¤òtamane¤Ë¡¢µåÂΤò¥¢¥Ò¥ë¤ÎƬ¤Ë)
»ä¤Î¡Ö¼Ö¤ÈµåÂΤΥ¹¥¯¥ê¥×¥È¡×¤Ç¤â¡¢Ë¡Àþ¤È¹ç¤Ã¤Æ¤¤¤Ê¤¤»ö¤Ï¥Ï¥Ã¥¥ê¤È³Îǧ¤Ç¤¤Æ¤ª¤ê¤Þ¤¹¡£
Î理ÎÈÄ(tamane¤ÎÂå¤ê¤Ë¤Ê¤Ã¤Æ¤Þ¤¹)¤ÈË¡Àþ(¿å¿§¤ÎÀþʬ)¤Ï¡¢
µåÂΤÎĺÅÀ¤Ë¤¤¿»þ°Ê³°¡¢½Å¤Ê¤ë¤³¤È¤¬¤Ê¤¤¤Ç¤¹¤«¤é¡£
¤¿¤À¡¢¤½¤Î¡¢Ë¡Àþ¤È¤Î¥º¥ì¤Îˡ§À¡¢¤Î¤è¤¦¤Ê¤â¤Î¤¬ÄϤá¤Ê¤«¤Ã¤¿¤Î¤Ç¤¹¡£
>·¹¸þ¤È¤·¤ÆË¡Àþ¤¬X¼´Êý¸þ¤Î»þ¤Ï³ÑÅÙ¤¬¤º¤ì¤Æ¤¤¤Z¼´Êý¸þ¤ÏµÕÊý¸þ¤ò¸þ¤¤¤Æ¤¤¤ë¤è¤¦¤Ç¤·¤¿¡£
¤³¤ì¤ò¤è¤êºÕ¤¤¤Æ¤´ÀâÌÀ¤¤¤¿¤À¤¤¤¿¤Î¤¬¡¢
>X¼´Êý¸þ¤Î»þ¤Ï³ÑÅÙ¤¬
>Z¼´Êý¸þ¤ÏµÕÊý¸þ
¤Î£²¹à¤Ç¤¹¤Í¡£
¤¿¤À¡¢¤³¤Î¤´ÀâÌÀ¤Î¸ÀÍÕ¤À¤È¡¢X¼´Êý¸þ¤ÈZ¼´Êý¸þ¤Ç¤Ï¡¢Ê̤Îˡ§¤¬Æ¯¤¤¤Æ¤¤¤Æ¡¢
¶¦Ä̤¹¤ë¤è¤¦¤Ê¤â¤Î¤¬¤Ê¤¤¡¢ÄÌÄ줹¤ë¤â¤Î¤¬¤Ê¤¤¤«¤Î¤è¤¦¤ËÆɤá¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
ºÇ¸å¤Þ¤Ç¤è¤¯Æɤá¤Ð¡¢
>¥ª¥¤¥é¡¼³Ñ¤Î²óž½çÈÖ¤ÎÌäÂê¤È¡¢Ë¡Àþ0¡Á1¤ò³ÑÅÙrad¤Ë¤½¤Î¤Þ¤Þ¥Ä¥Ã¥³¤à¤È¤¤¤¦
>»ÈÍÑÊýË¡¤Ë¤è¤ê¤½¤ÎÍͤˤʤë¤È»×¤ï¤ì¤Þ¤¹¤·¡¢¼ÂºÝ¤Ë¤½¤ÎÍͤˤʤäƤª¤ê¤Þ¤·¤¿¡£
¤Ç¤¹¤«¤é¡¢¤³¤ì¤¬¡ÖË¡Àþ¤È¤Î¥º¥ì¤Îˡ§À¡×¤Ê¤ó¤À¤Èʬ¤«¤ê¤Þ¤¹¡£
¤·¤Ä¤³¤¤¤è¤¦¤Ç¤¹¤¬¡¢usagi¤µ¤ó¤Î£²¹à¤ò»ä¤Ê¤ê¤Î¸ÀÍդǡ¢
X¼´Êý¸þ¾ò·ï²¼¤È¡¢Z¼´Êý¸þ¾ò·ï²¼¤Ç¤Î¶¦Ä̤¹¤ë¤â¤Î¤Ëα°Õ¤·¤Ê¤¬¤é¡¢ÀâÌÀ¤·¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
>X¼´Êý¸þ¾ò·ï²¼(XYÊ¿ÌÌ¡á[Z=0])
º¸¤«¤é±¦¤Ø-x¤«¤é+x¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤Ï¡¢-ZÊý¸þ¤ËÂ礤¯·¹¤¤¤Æ(¥º¥ì¤Æ)»Ï¤Þ¤ê¡¢
¤½¤Î¥º¥ì¤¬¾®¤µ¤¯¤Ê¤Ã¤Æ¤¤¤¡¢µåÂΤÎĺÅÀ¤Ë¤¤Æ¡¢·¹¤¤Î¥º¥ì¤Ï¤Ê¤¯¤Ê¤ê¡¢´°Á´¤Ë½Å¤Ê¤ê¡¢
ĺÅÀ¤ò²á¤®¤Æ+x¤Ø¿Ê¤ó¤Ç¤¤¤¯¤È¡¢+ZÊý¸þ¤Ë½ù¡¹¤Ë·¹¤¤¤Æ¡¢¤½¤Î¥º¥ì¤¬Â礤¯¤Ê¤Ã¤Æ¤¤¤¯¡£
>Z¼´Êý¸þ¾ò·ï²¼(ZYÊ¿ÌÌ¡á[X=0])
¸å¤«¤éÁ°¤Ø-z¤«¤é+z¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤Ï¡¢+XÊý¸þ¤ËÂ礤¯·¹¤¤¤Æ(¥º¥ì¤Æ)»Ï¤Þ¤ê¡¢
¤½¤Î¥º¥ì¤¬¾®¤µ¤¯¤Ê¤Ã¤Æ¤¤¤¡¢µåÂΤÎĺÅÀ¤Ë¤¤Æ¡¢·¹¤¤Î¥º¥ì¤Ï¤Ê¤¯¤Ê¤ê¡¢´°Á´¤Ë½Å¤Ê¤ê¡¢
ĺÅÀ¤ò²á¤®¤Æ+z¤Ø¿Ê¤ó¤Ç¤¤¤¯¤È¡¢-xÊý¸þ¤Ë½ù¡¹¤Ë·¹¤¤¤Æ¡¢¤½¤Î¥º¥ì¤¬Â礤¯¤Ê¤Ã¤Æ¤¤¤¯¡£
¤³¤ì¤òÁȤ߹ç¤ï¤»¤Æ
>[-X,-Z][0,0][+X,+Z]¤ÎÊý¸þ
¤³¤ÎÊý¸þ¤Ç¡¢º¸¸å¤«¤é±¦Á°¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤Ï¡¢-Z+XÊý¸þ¤ËÂ礤¯·¹¤¤¤Æ(¥º¥ì¤Æ)»Ï¤Þ¤ê¡¢
¤½¤Î¥º¥ì¤¬¾®¤µ¤¯¤Ê¤Ã¤Æ¤¤¤¡¢µåÂΤÎĺÅÀ¤Ë¤¤Æ¡¢·¹¤¤Î¥º¥ì¤Ï¤Ê¤¯¤Ê¤ê¡¢´°Á´¤Ë½Å¤Ê¤ê¡¢
ĺÅÀ¤ò²á¤®¤Æ+x+z¤Ø¿Ê¤ó¤Ç¤¤¤¯¤È¡¢+Z-xÊý¸þ¤Ë½ù¡¹¤Ë·¹¤¤¤Æ¡¢¤½¤Î¥º¥ì¤¬Â礤¯¤Ê¤Ã¤Æ¤¤¤¯¡£
>[+X,-Z][0,0][-X,+Z]¤ÎÊý¸þ
¤³¤ÎÊý¸þ¤Ç¡¢±¦¸å¤«¤éº¸Á°¤Ø¼Ö¤ò°ÜÆ°¤·¤¿»þ¤Ï¡¢+Z+XÊý¸þ¤ËÂ礤¯·¹¤¤¤Æ(¥º¥ì¤Æ)»Ï¤Þ¤ê¡¢
¤½¤Î¥º¥ì¤¬¾®¤µ¤¯¤Ê¤Ã¤Æ¤¤¤¡¢µåÂΤÎĺÅÀ¤Ë¤¤Æ¡¢·¹¤¤Î¥º¥ì¤Ï¤Ê¤¯¤Ê¤ê¡¢´°Á´¤Ë½Å¤Ê¤ê¡¢
ĺÅÀ¤ò²á¤®¤Æ-x+z¤Ø¿Ê¤ó¤Ç¤¤¤¯¤È¡¢-Z-xÊý¸þ¤Ë½ù¡¹¤Ë·¹¤¤¤Æ¡¢¤½¤Î¥º¥ì¤¬Â礤¯¤Ê¤Ã¤Æ¤¤¤¯¡£
¤³¤ì¤é¤òÁí¹ç¤¹¤ë¤Ë¡¢
µåÂΤÎĺÅÀ¤«¤éÎ¥¤ì¤Æ¤¤¤¯¤Ë½¾¤Ã¤Æ¡¢±¦´¬¤±²¤Î¤è¤¦¤Ë·¹¤¤¬¥º¥ì¤Æ¤¤¤¤Þ¤¹¡£
ÁêÊѤï¤é¤º¡¢Àå¤Ã¤餺¤Î¡¢¤³¤Í¤¯¤ê²ó¤·¤¿¤è¤¦¤Ê¤·¤Ä¤³¤¤ÀâÌÀ¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤·¤¿¤¬¡¢
ºÇ¸å¤Î¡Ö±¦´¬¤±²¤Î¤è¤¦¤Ê¥º¥ì¡×¤ÇǼÆÀ¡£
¤³¤ì¤Ç¡¢ËÜÅö¤Ë²ò·è¤È¤¤¤¿¤·¤Þ¤¹¡£
Ĺ¡¹¤È¡¢¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£
| |
|
2024/4/20(Sat) 11:15:41|NO.101572
ǼÆÀ¤µ¤ì¤¿¤è¤¦¤ÇÎɤ«¤Ã¤¿¤Ç¤¹¡£
¡Ö±¦´¬¤±²¤Î¤è¤¦¤Ê¥º¥ì¡×¤È¤ªÅÁ¤¨¤¹¤ë¤Î¤¬Àµ²ò¤À¤Ã¤¿¤ó¤Ç¤¹¤Í¡£¤Ê¤ë¤Û¤É¡£
»ä¤ÎÊý¤¬¶¦Ä̤¹¤ë¤â¤Î¤¬Ìµ¤¤¤È¸À¤¦Íý²ò¤Ë¤¿¤É¤êÃ夯ÁÛÁü¤¬½ÐÍè¤Æ¤ª¤é¤º¡Ö¤³¤ì¤òÁȤ߹ç¤ï¤»¤Æ¡×
¤È¤¤¤¦°ìʸ¤ò½ñ¤¤¤Æ¤ª¤±¤ÐÅÁ¤ï¤ê¤ä¤¹¤«¤Ã¤¿¤Î¤«¤â¤·¤ì¤Ê¤¤¤ÈÈ¿¾Ê¤·¤Æ¤ª¤ê¤Þ¤¹¡£
XÊý¸þ¤ÎµóÆ°¤ÈZÊý¸þ¤ÎµóÆ°¤òʬ¤±¤Æ¤ªÅÁ¤¨¤·¤¿Êý¤¬¥·¥ó¥×¥ë¤Ëˡ§À¤¬Ê¬¤«¤ê¤ä¤¹¤¤¤È»×¤Ã¤Æ¤¤¤Þ¤·¤¿¡£
¡ÊXZÊ¿Ì̤Ǹ«¤¿¤é¤¿¤À¤Î¹çÀ®¤Ê¤Î¤ÇÁÛÁü¤·¤Æĺ¤¤ä¤¹¤¤¤«¤È¹Í¤¨¤Æ¤Þ¤·¤¿¡Ë
·ë¶É¤Î½ê¡¢¶Ä¤é¤ì¤ëÄ̤êË¡Àþ¤ò³ÑÅÙ¤ËÊÑ´¹¤¹¤ì¤Ð¡¢¤³¤Î¾ò·ï²¼¤Ç¤Ï¤Ê¤ó¤éÌäÂê¤Ê¤¤¤Î¤Ç¡¢
ÀâÌÀÍѤ˥¯¥©¡¼¥¿¥Ë¥ª¥ó¤ò»È¤ï¤Ê¤¤ÊýË¡¤òÍÑ°Õ¤·¤Æ¤¤¤¿¤Î¤ÇÀ޳ѤǤ¹¤«¤éÅê¹Æ¤·¤Æ¤ª¤¤Þ¤¹¤Í¡£¡Ê̤ºÇŬ²½¡Ë
̾ÉÕ¤±¤Æ¡Ö±¦´¬¤±²¤Î¤è¤¦¤Ê¥º¥ì²óÈò¤Î°Ù¡¢Ë¡Àþ¤ò³ÑÅÙ¤ËÊÑ´¹¤¹¤ë½Ñ¡×¤Ç¤¹¡£
¤½¤ì¤Ç¤Ï¡¢¤µ¤è¤¦¤Ê¤é¡£
; ¡ú¿·µ¬Ì¿ÎáÄɲäʤΤǥ³¥³¤«¤é²¼¤ÎÃæ¿È¤Ïµ¤¤Ë¤·¤Ê¤¤¡£ -------
#module
#define EPS 0.00000000001
#define ctype acos(%1) atan(sqrt(1f-double(%1)*(%1)),(%1))
; ¸ø³«Ì¿Îá
; ---------------------------
#deffunc fvnorm2ang array o
v = 0f, 1f, 0f
fvlookat o, v, o : return
; Èó¸ø³«Ì¿Îá
; ---------------------------
; ÆâÀÑ
#defcfunc local dot array a, array b
return a.0*b.0 + a.1*b.1 + a.2*b.2
; ³°ÀÑ
#deffunc local cross array o, array a, array b
o = a.1*b.2 - a.2*b.1, a.2*b.0 - a.0*b.2, a.0*b.1 - a.1*b.0 : return
; Àµµ¬²½
#deffunc local normalize array o
d = sqrt(o.0*o.0 + o.1*o.1 + o.2*o.2)+EPS : o = o.0/d, o.1/d, o.2/d : return
; Ǥ°Õ¼´¼þ¤ê¤Î²óž (¥í¥É¥ê¥²¥¹¤Î²óž¸ø¼°) ¢¨Ã±°Ì¥Ù¥¯¥È¥ë¤òÆþÎÏ
#deffunc local rotvec2mtx array m, double r, array a
x = a.0 : y = 0f+a.1 : z = 0f+a.2 : s = sin(r) : c = cos(r)
m.0 = x*x*(1f-c) + c, x*y*(1f-c) - z*s, z*x*(1f-c) + y*s
m.3 = x*y*(1f-c) + z*s, y*y*(1f-c) + c, y*z*(1f-c) - x*s
m.6 = z*x*(1f-c) - y*s, y*z*(1f-c) + x*s, z*z*(1f-c) + c
return
; ³ÑÅÙ¤òÊÖ¤¹ XYZ
#deffunc local fvlookat array o, array a, array b
angle = acos(dot(a, b)) : cross axis, a, b : normalize axis : rotvec2mtx mtx, angle, axis
t = -atan(mtx.5, mtx.8) : o = t, atan(mtx.2*cos(t), mtx.8), -atan(mtx.1, mtx.0) : return
#global
; ¡ú¥³¥³¤Þ¤Ç¤Ïµ¤¤Ë¤·¤Ê¤¤ ----------------------------------
#include "hgimg4.as"
screen 0, 512, 512 : chdir dir_exe+"\\sample\\hgimg4" : gpreset : setcls CLSMODE_SOLID, 0
setpos GPOBJ_CAMERA, 0,15,15 : gplookat GPOBJ_CAMERA, 0,0,0
gpbox id_floor, 1, $00FFFF : setscale id_floor, 50, 0.1, 50 : gppbind id_floor, 0
gpload id_duck,"res/duck" : setpos id_duck,-3,-8 : setscale id_duck, 10,10,10
gppbind id_duck, 0 ,, GPPBIND_MESH
gpload id_model,"res/tamane2" : setscale id_model, 0.01,0.01,0.01
gpbox id_box,0.5,0xff00ff : setpos id_box, 0,5,0 : setang id_box,-M_PI/2
speed = 0.05
*main
getkey ¢«, 37 : if ¢« : ang_model = 0.1 + ang_model
getkey ¢ª, 39 : if ¢ª : ang_model = -0.1 + ang_model
getkey ¢¬, 38 : if ¢¬ : addpos id_box, sin(ang_model)*speed,, cos(ang_model)*speed
getkey ¢, 40 : if ¢ : addpos id_box,-sin(ang_model)*speed,,-cos(ang_model)*speed
gppraytest var,id_box,100
getwork id_box, wx,wy,wz : getwork2 id_box, norm.0, norm.1, norm.2
setpos id_model, wx,wy,wz : setpos id_box, wx,wy+5,wz
gpcnvaxis l.0, l.1, l.2, wx,wy,wz : gpcnvaxis l.3, l.4, l.5, wx+norm.0, wy+norm.1, wz+norm.2
; ¡ú¥³¥³¤¬½ÅÍ×------
; ¡ú¥¢¥¥¢¥¥Î¥Ò¥í¥í¤µ¤ó¤¬È¯¸«¤µ¤ì¤¿²è´üŪ¤ÊÊýË¡¤Ë³ÑÅÙ¤ò»È¤¦
fvnorm2ang norm ; ¡úË¡Àþ¤ò³ÑÅÙ¤ËÊÑ´¹¤¹¤ë½Ñ(¥¯¥©¡¼¥¿¥Ë¥ª¥ó¤Ï»È¤ï¤Ê¤¤ÊýË¡¤Ç)
setangy id_model, norm.0, norm.1, norm.2
addang id_model, 0, -norm.1, 0
addang id_model, 0, ang_model, 0
; ¡ú----------------
redraw 0 : gpdraw : rgbcolor $FF00FF : line l.0, l.1, l.3, l.4 : redraw 1 : await 16
goto *main
| |
|
2024/4/20(Sat) 18:34:57|NO.101577
usagi¤µ¤ó¡¢ºÇ¸å¤ÎºÇ¸å¤Þ¤Ç¡¢ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
>¡ú¥³¥³¤Þ¤Ç¤Ïµ¤¤Ë¤·¤Ê¤¤
¥×¥í¥°¥é¥ß¥ó¥°¤ò»Ï¤á¤¿¤³¤í¡¢
¡Ö¤³¤ì¤ÏËâË¡¤Î¸ÀÍդǡ¢¤³¤ì¤ò½ñ¤¤¤Æ¤ª¤±¤Ð¡¢¾¡¼ê¤Ë¤ä¤Ã¤Æ¤¯¤ì¤Þ¤¹¡£
¹Í¤¨¹þ¤Þ¤Ê¤¤¤Ç¡¢Âç¾æÉפǤ¹¤è¡£¡×
¤Ê¤ó¤Æ¤¤¤¦²òÀ⤬¤¢¤Ã¤¿¤Î¤ò»×¤¤½Ð¤·¤Ê¤¬¤é¡¢¥¹¥¯¥ê¥×¥È¤òÇÒ¸«¤·¤Æ¤¤¤Þ¤¹¡£
Éݤ¬¤é¤º¤Ë¡¢»È¤¤Åݤµ¤»¤Æ¤¤¤¿¤À¤³¤¦¤È»×¤¤¤Þ¤¹¡¡m(>__<)m
¤Þ¤¿¤É¤³¤«¤Ç¤ª²ñ¤¤¤¹¤ë¤Î¤ò³Ú¤·¤ß¤Ë¤·¤Æ
¤½¤ì¤Ç¤Ï¡¢¤µ¤è¤¦¤Ê¤é¡£
|
|