燃燒吧

          關注智能及大數據領域 www.burnba.com
          posts - 3, comments - 0, trackbacks - 0, articles - 0

          霓虹燈

          Posted on 2010-12-08 11:09 燃燒吧 閱讀(442) 評論(0)  編輯  收藏 所屬分類: 其他腳本
          節日快到,發幾個霓虹燈的腳本助助興!

          第一個: 
            1<script languate="VBScript" type="text/VBScript">
            2Dim pubS_Pix_x
            3Dim pubS_Pix_y
            4Dim pubS_Pix_z
            5Dim pubS_Pix_cr
            6Dim pubS_Pix_cg
            7Dim pubS_Pix_cb
            8Dim pubD_Mx
            9Dim pubD_My
           10Dim pubD_Mz
           11Dim pubD_Rx
           12Dim pubD_Ry
           13Dim pubD_Rz
           14Dim pubD_Mtx_Mx
           15Dim pubD_Mtx_Mr
           16Dim pubD_Pix_x
           17Dim pubD_Pix_y
           18Dim pubD_Pix_z
           19Dim pubF_Va
           20Dim pubF_Vd
           21Dim pubV_Vx
           22Dim pubV_Vy
           23Dim pubV_Vz
           24Dim pubV_Sc
           25Dim pubV_Mtx_Mx
           26Dim pubV_Mtx_Mr
           27Dim pubV_Pix_x
           28Dim pubV_Pix_y
           29Dim pubV_Pix_z
           30Dim pubElm
           31Dim pubElm_Len
           32Dim pubWeb_Tv
           33Dim pubWeb_Tw
           34Dim pubWeb_WW, pubWeb_WH
           35Dim pubR, pubG, pubB
           36Dim pubOR, pubOG, pubOB
           37'Web DHTML 事件函數
           38Sub window_onload()
           39    MakeModule
           40            
           41    With document.body
           42        pubWeb_WW = .clientWidth 
           43        pubWeb_WH = .clientHeight 
           44    End With 
           45    pubD_Rz = 0
           46    pubD_Rx = 0
           47    pubD_Ry = 0 
           48    pubF_Va = 15
           49    pubF_Vd = 20
           50     
           51    pubV_Vx = pubWeb_WW \ 2
           52    pubV_Vy = pubWeb_WH \ 3
           53    pubV_Vz = 0
           54    pubV_Sc = 10
           55    pubWeb_Tw = 33
           56    MTX_3DMixV pubV_Vx, pubV_Vy, pubV_Vz, pubV_Sc, pubV_Mtx_Mx, pubV_Mtx_Mr
           57    
           58    Web_TimeLoop
           59    
           60End Sub
           61Sub MakeModule
           62    pubElm_Len = 599
           63    pubElm = ELM_Create(pubElm_Len)
           64    ReDim pubS_Pix_x(pubElm_Len), pubS_Pix_y(pubElm_Len), pubS_Pix_z(pubElm_Len)
           65    ReDim pubD_Pix_x(pubElm_Len), pubD_Pix_y(pubElm_Len), pubD_Pix_z(pubElm_Len)
           66    ReDim pubV_Pix_x(pubElm_Len), pubV_Pix_y(pubElm_Len), pubV_Pix_z(pubElm_Len)
           67    ReDim pubS_Pix_cr(pubElm_Len), pubS_Pix_cg(pubElm_Len), pubS_Pix_cb(pubElm_Len)
           68    tH = 100
           69    tR = 0
           70    For tI = 1 To 1500 Step 15
           71        tR = tI * 15 / 1500 + 5
           72        tA = tA + (1000 / (tR * 2 * 3.14))
           73        tZ = 30 - tI * 30 / 1500
           74        tAr = Radian(tA)
           75        For tRd = Int(tR) To Int(tR) - 5 Step -1
           76            tX = Sin(tAr) * tRd 
           77            tY = Cos(tAr) * tRd 
           78            pubS_Pix_x(tAdd) = tX
           79            pubS_Pix_y(tAdd) = tY
           80            pubS_Pix_z(tAdd) = tZ
           81            tAdd = tAdd + 1
           82        Next
           83    Next
           84    'MsgBox tAdd
           85    pubD_Mx = 0
           86    pubD_My = 0
           87    pubD_Mz = 0
           88End Sub
           89Sub Web_TimeLoop()
           90    pubD_Rz = (pubD_Rz + 1Mod 360
           91    pubD_Rx = 45
           92    pubD_Ry = 0
           93    MTX_3DMixD pubD_Mx, pubD_My, pubD_Mz, pubD_Rx, pubD_Ry, pubD_Rz, pubD_Mtx_Mx, pubD_Mtx_Mr
           94    PXE_MTXTram3D pubS_Pix_x, pubS_Pix_y, pubS_Pix_z, pubD_Mtx_Mx, pubD_Mtx_Mr, pubD_Pix_x, pubD_Pix_y, pubD_Pix_z
           95    FIT_PSV pubD_Pix_x, pubD_Pix_y, pubD_Pix_z, pubF_Va, pubF_Vd, pubD_Pix_x, pubD_Pix_y, pubD_Pix_z
           96    PXE_MTXTram3D pubD_Pix_x, pubD_Pix_y, pubD_Pix_z, pubV_Mtx_Mx, pubV_Mtx_Mr, pubV_Pix_x, pubV_Pix_y, pubV_Pix_z
           97    
           98    For tI = 0 To 5
           99    For tEi = pubElm_Len To 0 Step -1
          100        If CBool(tEi) Then
          101                pubS_Pix_cr(tEi) = pubS_Pix_cr(tEi-1)
          102                pubS_Pix_cg(tEi) = pubS_Pix_cg(tEi-1)
          103                pubS_Pix_cb(tEi) = pubS_Pix_cb(tEi-1)
          104            Else
          105                If pubR < pubOR Then pubR = pubR + 1
          106                If pubR > pubOR Then pubR = pubR - 1
          107                If pubG < pubOG Then pubG = pubG + 1
          108                If pubG > pubOG Then pubG = pubG - 1
          109                If pubB < pubOB Then pubB = pubB + 1
          110                If pubB > pubOB Then pubB = pubB - 1
          111                If pubR = pubOR And pubB = pubOB And pubG = pubOG Then 
          112                    pubOR = Int(Rnd * 32+ 31
          113                    pubOG = Int(Rnd * 32+ 31
          114                    pubOB = Int(Rnd * 32+ 31
          115                End If
          116                pubS_Pix_cr(tEi) = pubR*4
          117                pubS_Pix_cg(tEi) = pubG*4
          118                pubS_Pix_cb(tEi) = pubB*4
          119        End If
          120    Next
          121    Next 
          122    For tEi = pubElm_Len To 0 Step -1
          123        With pubElm(tEi).style
          124            .left = pubV_Pix_x(tEi)
          125            .top =    pubV_Pix_y(tEi)
          126            tL = tEi Mod 6 + 1
          127            .color = rgb(pubS_Pix_cr(tEi)\tL,pubS_Pix_cg(tEi)\tL,pubS_Pix_cb(tEi)\tL)
          128        End With
          129    Next
          130    
          131    pubWeb_Tv = window.setTimeout("Web_TimeLoop", pubWeb_Tw)
          132End Sub
          133Function ELM_Create(pEn)
          134    ReDim tElms(pEn)
          135    For tEi = 0 To pEn
          136        With document
          137            Set tElms(tEi) = .createElement("SPAN")
          138            .body.insertAdjacentElement "beForeEnd", tElms(tEi)
          139        End With
          140        With tElms(tEi)
          141            .innerText = "*"
          142            .style.position = "absolute"
          143            .style.color = rgb(0,0,0)
          144        End With
          145    Next
          146    ELM_Create = tElms
          147End Function
          148Sub PXE_MTXTram2D(pPx(), pPy(), pM(), pMr, oPx(), oPy())
          149    tPe = UBound(pPx)
          150    For tPi = 0 To tPe
          151        oPx(tPi) = pPx(tPi) * pM(0+ pPy(tPi) * pM(1+ pM(2)
          152        oPy(tPi) = pPx(tPi) * pM(3+ pPy(tPi) * pM(4+ pM(5)
          153    Next
          154End Sub
          155Sub PXE_MTXTram3D(pPx(), pPy(), pPz(), pM(), pMr(), oPx(), oPy(), oPz())
          156    tPe = UBound(pPx)
          157    For tPi = 0 To tPe
          158        oPx(tPi) = pPx(tPi) * pM(0+ pPy(tPi) * pM(1+ pPz(tPi) * pM(2+ pM(3)
          159        oPy(tPi) = pPx(tPi) * pM(4+ pPy(tPi) * pM(5+ pPz(tPi) * pM(6+ pM(7)
          160        oPz(tPi) = pPx(tPi) * pM(8+ pPy(tPi) * pM(9+ pPz(tPi) * pM(10+ pM(11)
          161    Next
          162End Sub
          163Sub FIT_PSV(iPx, iPy, iPz, iVa, iVd, oPx, oPy, oPz)
          164    tPe = UBound(iPx)
          165    For tPi = 0 To tPe
          166        tVr = Sin(Radian(iVa))
          167        tZ = iPz(tPi) + iVd
          168        oPx(tPi) = iPx(tPi) * tVr * tZ / (tVr * iVd)
          169        oPy(tPi) = iPy(tPi) * tVr * tZ / (tVr * iVd)
          170        oPz(tPi) = iPz(tPi)
          171    Next
          172End Sub
          173Sub MTX_2DPixMulti(iSc, oM(), oMr)
          174    oMr = 3
          175    ReDim oM(8)
          176    oM = Array(iSc, 000, iSc, 0001)
          177End Sub
          178Sub MTX_2DPixMove(iMx, iMy, oM(), oMr)
          179    oMr = 3
          180    ReDim oM(8)
          181    oM = Array(10, iMx, 01, iMy, 001)
          182End Sub
          183Sub MTX_2DRot(iA, oM(), oMr)
          184    tR = Radian(iA)
          185    oMr = 3
          186    ReDim oM(8)
          187    oM = Array(cos(tR), -sin(tR), 0sin(tR), cos(tR), 0001)
          188End Sub
          189Sub MTX_3DMixD(iMx, iMy, iMz, iRx, iRy, iRz, oMx, oMr)
          190    MTX_3DPixMove tMtx_MV, oMr, iMx, iMy, iMz
          191    MTX_3DPixRotZ tMtx_RTz, oMr, iRz
          192    MTX_3DPixRotX tMtx_RTx, oMr, iRx
          193    MTX_3DPixRotY tMtx_RTy, oMr, iRy
          194    MTX_Multi tMtx_MV, oMr, tMtx_RTz, oMr, tMx, oMr
          195    oMx = tMx
          196    MTX_Multi oMx, oMr, tMtx_RTx, oMr, tMx, oMr
          197    oMx = tMx
          198    MTX_Multi oMx, oMr, tMtx_RTy, oMr, tMx, oMr
          199    oMx = tMx
          200End Sub
          201Sub MTX_3DMixV(iVx, iVy, iVz, iSc, oMx, oMr)
          202    MTX_3DPixMulti tMtx_SC, oMr, iSc
          203    MTX_3DPixMove tMtx_VM, oMr, iVx, iVy, iVz
          204    MTX_Multi tMtx_SC, oMr, tMtx_VM, oMr, tMx, oMr
          205    oMx = tMx
          206End Sub
          207Sub MTX_3DPixMulti(oM(), oMr, iSc)
          208    oMr = 4
          209    ReDim oM(15)    
          210    oM = Array(iSc, 0000, iSc, 0000, iSc, 00001)
          211End Sub
          212Sub MTX_3DPixMove(oM(), oMr, iMx, iMy, iMz)
          213    oMr = 4
          214    ReDim oM(15)    
          215    oM = Array(100, iMx, 010, iMy, 001, iMz, 0001)
          216End Sub
          217Sub MTX_3DPixRotZ(oM(), oMr, iA)
          218    oMr = 4
          219    ReDim oM(15)
          220    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)
          221    oM = Array(tCos, -tSin, 00, tSin, tCos, 0000100001)    
          222End Sub
          223Sub MTX_3DPixRotY(oM(), oMr, iA)
          224    oMr = 4
          225    ReDim oM(15)    
          226    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)
          227    oM = Array(tCos, 0, tSin, 00100-tSin, 0, tCos, 00001)
          228End Sub
          229Sub MTX_3DPixRotX(oM(), oMr, iA)
          230    oMr = 4
          231    tR = Radian(iA)    
          232    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)    
          233    oM = Array(10000, tCos, tSin, 00-tSin, tCos, 00001)
          234End Sub
          235Sub MTX_Multi(iMa(), iMar, iMb(), iMbr, oMc(), oMcr)
          236    tN = (iMar = ((UBound(iMb) \ iMbr) + 1)) And (iMar - 1)
          237    
          238    If CBool(tN) Then
          239    
          240        tM = Ubound(iMa) \ iMar
          241        tP = iMbr - 1
          242        
          243        oMcr = tP + 1
          244                
          245        ReDim oMc(oMcr * (tM + 1- 1)
          246        
          247        For tMi = 0 To tM
          248            For tPi = 0 To tP
          249                For tNi = 0 To tN
          250                    tMv = MTX_VGet(oMc, oMcr, tMi, tPi) + MTX_VGet(iMa, iMar, tMi, tNi) * MTX_VGet(iMb, iMbr, tNi, tPi)
          251                    MTX_VSet oMc, oMcr, tMi, tPi, tMv
          252                    
          253                Next
          254            Next
          255        Next
          256        
          257    End If
          258        
          259End Sub
          260Sub MTX_VSet(pM(), pMr, pX, pY, pMv)
          261    tMi = pY * pMr + pX
          262    pM(tMi) = pMv
          263End Sub
          264Function MTX_VGet(pM(), pMr, pX, pY)
          265    tMi = pY * pMr + pX
          266    MTX_VGet = pM(tMi)
          267End Function
          268Function Radian(pA)
          269    Radian = pA * 71 / 4068
          270End Function
          271</script>
          第二個:
            1<script languate="VBScript" type="text/VBScript">
            2Dim pubS_Pix_x
            3Dim pubS_Pix_y
            4Dim pubS_Pix_z
            5Dim pubS_Pix_c
            6Dim pubD_Mx
            7Dim pubD_My
            8Dim pubD_Mz
            9Dim pubD_Rx
           10Dim pubD_Ry
           11Dim pubD_Rz
           12Dim pubD_Mtx_Mx
           13Dim pubD_Mtx_Mr
           14Dim pubD_Pix_x
           15Dim pubD_Pix_y
           16Dim pubD_Pix_z
           17Dim pubF_Va
           18Dim pubF_Vd
           19Dim pubV_Vx
           20Dim pubV_Vy
           21Dim pubV_Vz
           22Dim pubV_Sc
           23Dim pubV_Mtx_Mx
           24Dim pubV_Mtx_Mr
           25Dim pubV_Pix_x
           26Dim pubV_Pix_y
           27Dim pubV_Pix_z
           28Dim pubElm
           29Dim pubElm_Len
           30Dim pubWeb_Tv
           31Dim pubWeb_Tw
           32Dim pubWeb_WW, pubWeb_WH
           33Dim pubR, pubG, pubB
           34Dim pubOR, pubOG, pubOB
           35'Web DHTML 事件函數
           36Sub window_onload()
           37    MakeModule
           38            
           39    With document.body
           40        pubWeb_WW = .clientWidth 
           41        pubWeb_WH = .clientHeight 
           42    End With 
           43    pubD_Rz = 0
           44    pubD_Rx = 0
           45    pubD_Ry = 0 
           46    pubF_Va = 15
           47    pubF_Vd = 20
           48    
           49    pubV_Vx = pubWeb_WW \ 2
           50    pubV_Vy = pubWeb_WH * 1.3 \ 2
           51    pubV_Vz = 0
           52    pubV_Sc = 12
           53    pubWeb_Tw = 33
           54    MTX_3DMixV pubV_Vx, pubV_Vy, pubV_Vz, pubV_Sc, pubV_Mtx_Mx, pubV_Mtx_Mr
           55    
           56    Web_TimeLoop
           57    
           58End Sub
           59Sub MakeModule
           60    pubElm_Len = 919
           61    pubElm = ELM_Create(pubElm_Len)
           62    ReDim pubS_Pix_x(pubElm_Len), pubS_Pix_y(pubElm_Len), pubS_Pix_z(pubElm_Len)
           63    ReDim pubD_Pix_x(pubElm_Len), pubD_Pix_y(pubElm_Len), pubD_Pix_z(pubElm_Len)
           64    ReDim pubV_Pix_x(pubElm_Len), pubV_Pix_y(pubElm_Len), pubV_Pix_z(pubElm_Len)
           65    ReDim pubS_Pix_c(pubElm_Len)
           66    tH = 100
           67    tR = 0
           68    For tI = 1 To 1500 Step 15
           69        tR = tR + 0.1
           70        tA = tA + (5 / tR * 2 * 3.14)
           71        tH = 30 - 5 * tR '2 * tR
           72        tAr = Radian(tA)
           73        tX = Sin(tAr) * tR * 3
           74        tY = Cos(tAr) * tR * 3
           75        For tZ = Int(tH) To 0 Step -1
           76            pubS_Pix_x(tAdd) = tX
           77            pubS_Pix_y(tAdd) = tY
           78            pubS_Pix_z(tAdd) = tZ
           79            tAdd = tAdd + 1
           80        Next
           81    Next
           82        
           83    pubD_Mx = 0
           84    pubD_My = 0
           85    pubD_Mz = 0
           86End Sub
           87Sub Web_TimeLoop()
           88    pubD_Rz = (pubD_Rz + 5Mod 360
           89    pubD_Rx = -45
           90    pubD_Ry = 0
           91    MTX_3DMixD pubD_Mx, pubD_My, pubD_Mz, pubD_Rx, pubD_Ry, pubD_Rz, pubD_Mtx_Mx, pubD_Mtx_Mr
           92    PXE_MTXTram3D pubS_Pix_x, pubS_Pix_y, pubS_Pix_z, pubD_Mtx_Mx, pubD_Mtx_Mr, pubD_Pix_x, pubD_Pix_y, pubD_Pix_z
           93    FIT_PSV pubD_Pix_x, pubD_Pix_y, pubD_Pix_z, pubF_Va, pubF_Vd, pubD_Pix_x, pubD_Pix_y, pubD_Pix_z
           94    PXE_MTXTram3D pubD_Pix_x, pubD_Pix_y, pubD_Pix_z, pubV_Mtx_Mx, pubV_Mtx_Mr, pubV_Pix_x, pubV_Pix_y, pubV_Pix_z
           95    
           96    For tI = 0 To 10
           97    For tEi = pubElm_Len To 0 Step -1
           98        If CBool(tEi) Then
           99                pubS_Pix_c(tEi) = pubS_Pix_c(tEi-1)
          100            Else
          101                If pubR < pubOR Then pubR = pubR + 1
          102                If pubR > pubOR Then pubR = pubR - 1
          103                If pubG < pubOG Then pubG = pubG + 1
          104                If pubG > pubOG Then pubG = pubG - 1
          105                If pubB < pubOB Then pubB = pubB + 1
          106                If pubB > pubOB Then pubB = pubB - 1
          107                If pubR = pubOR And pubB = pubOB And pubG = pubOG Then 
          108                    pubOR = Int(Rnd * 128+ 127
          109                    pubOG = Int(Rnd * 128+ 127
          110                    pubOB = Int(Rnd * 128+ 127
          111                End If
          112                pubS_Pix_c(tEi) = rgb(pubR, pubG, pubB)
          113        End If
          114    Next
          115    Next 
          116    For tEi = pubElm_Len To 0 Step -1
          117        With pubElm(tEi).style
          118            .left = pubV_Pix_x(tEi)
          119            .top =    pubV_Pix_y(tEi)
          120            .color = pubS_Pix_c(tEi)
          121        End With
          122    Next
          123    
          124    pubWeb_Tv = window.setTimeout("Web_TimeLoop", pubWeb_Tw)
          125End Sub
          126Function ELM_Create(pEn)
          127    ReDim tElms(pEn)
          128    For tEi = 0 To pEn
          129        With document
          130            Set tElms(tEi) = .createElement("SPAN")
          131            .body.insertAdjacentElement "beForeEnd", tElms(tEi)
          132        End With
          133        With tElms(tEi)
          134            .innerText = "*"
          135            .style.position = "absolute"
          136            .style.color = rgb(0,0,0)
          137        End With
          138    Next
          139    ELM_Create = tElms
          140End Function
          141Sub PXE_MTXTram2D(pPx(), pPy(), pM(), pMr, oPx(), oPy())
          142    tPe = UBound(pPx)
          143    For tPi = 0 To tPe
          144        oPx(tPi) = pPx(tPi) * pM(0+ pPy(tPi) * pM(1+ pM(2)
          145        oPy(tPi) = pPx(tPi) * pM(3+ pPy(tPi) * pM(4+ pM(5)
          146    Next
          147End Sub
          148Sub PXE_MTXTram3D(pPx(), pPy(), pPz(), pM(), pMr(), oPx(), oPy(), oPz())
          149    tPe = UBound(pPx)
          150    For tPi = 0 To tPe
          151        oPx(tPi) = pPx(tPi) * pM(0+ pPy(tPi) * pM(1+ pPz(tPi) * pM(2+ pM(3)
          152        oPy(tPi) = pPx(tPi) * pM(4+ pPy(tPi) * pM(5+ pPz(tPi) * pM(6+ pM(7)
          153        oPz(tPi) = pPx(tPi) * pM(8+ pPy(tPi) * pM(9+ pPz(tPi) * pM(10+ pM(11)
          154    Next
          155End Sub
          156Sub FIT_PSV(iPx, iPy, iPz, iVa, iVd, oPx, oPy, oPz)
          157    tPe = UBound(iPx)
          158    For tPi = 0 To tPe
          159        tVr = Sin(Radian(iVa))
          160        tZ = iPz(tPi) + iVd
          161        oPx(tPi) = iPx(tPi) * tVr * tZ / (tVr * iVd)
          162        oPy(tPi) = iPy(tPi) * tVr * tZ / (tVr * iVd)
          163        oPz(tPi) = iPz(tPi)
          164    Next
          165End Sub
          166Sub MTX_2DPixMulti(iSc, oM(), oMr)
          167    oMr = 3
          168    ReDim oM(8)
          169    oM = Array(iSc, 000, iSc, 0001)
          170End Sub
          171Sub MTX_2DPixMove(iMx, iMy, oM(), oMr)
          172    oMr = 3
          173    ReDim oM(8)
          174    oM = Array(10, iMx, 01, iMy, 001)
          175End Sub
          176Sub MTX_2DRot(iA, oM(), oMr)
          177    tR = Radian(iA)
          178    oMr = 3
          179    ReDim oM(8)
          180    oM = Array(cos(tR), -sin(tR), 0sin(tR), cos(tR), 0001)
          181End Sub
          182Sub MTX_3DMixD(iMx, iMy, iMz, iRx, iRy, iRz, oMx, oMr)
          183    MTX_3DPixMove tMtx_MV, oMr, iMx, iMy, iMz
          184    MTX_3DPixRotZ tMtx_RTz, oMr, iRz
          185    MTX_3DPixRotX tMtx_RTx, oMr, iRx
          186    MTX_3DPixRotY tMtx_RTy, oMr, iRy
          187    MTX_Multi tMtx_MV, oMr, tMtx_RTz, oMr, tMx, oMr
          188    oMx = tMx
          189    MTX_Multi oMx, oMr, tMtx_RTx, oMr, tMx, oMr
          190    oMx = tMx
          191    MTX_Multi oMx, oMr, tMtx_RTy, oMr, tMx, oMr
          192    oMx = tMx
          193End Sub
          194Sub MTX_3DMixV(iVx, iVy, iVz, iSc, oMx, oMr)
          195    MTX_3DPixMulti tMtx_SC, oMr, iSc
          196    MTX_3DPixMove tMtx_VM, oMr, iVx, iVy, iVz
          197    MTX_Multi tMtx_SC, oMr, tMtx_VM, oMr, tMx, oMr
          198    oMx = tMx
          199End Sub
          200Sub MTX_3DPixMulti(oM(), oMr, iSc)
          201    oMr = 4
          202    ReDim oM(15)    
          203    oM = Array(iSc, 0000, iSc, 0000, iSc, 00001)
          204End Sub
          205Sub MTX_3DPixMove(oM(), oMr, iMx, iMy, iMz)
          206    oMr = 4
          207    ReDim oM(15)    
          208    oM = Array(100, iMx, 010, iMy, 001, iMz, 0001)
          209End Sub
          210Sub MTX_3DPixRotZ(oM(), oMr, iA)
          211    oMr = 4
          212    ReDim oM(15)
          213    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)
          214    oM = Array(tCos, -tSin, 00, tSin, tCos, 0000100001)    
          215End Sub
          216Sub MTX_3DPixRotY(oM(), oMr, iA)
          217    oMr = 4
          218    ReDim oM(15)    
          219    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)
          220    oM = Array(tCos, 0, tSin, 00100-tSin, 0, tCos, 00001)
          221End Sub
          222Sub MTX_3DPixRotX(oM(), oMr, iA)
          223    oMr = 4
          224    tR = Radian(iA)    
          225    tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR)    
          226    oM = Array(10000, tCos, tSin, 00-tSin, tCos, 00001)
          227End Sub
          228Sub MTX_Multi(iMa(), iMar, iMb(), iMbr, oMc(), oMcr)
          229    tN = (iMar = ((UBound(iMb) \ iMbr) + 1)) And (iMar - 1)
          230    
          231    If CBool(tN) Then
          232    
          233        tM = Ubound(iMa) \ iMar
          234        tP = iMbr - 1
          235        
          236        oMcr = tP + 1
          237                
          238        ReDim oMc(oMcr * (tM + 1- 1)
          239        
          240        For tMi = 0 To tM
          241            For tPi = 0 To tP
          242                For tNi = 0 To tN
          243                    tMv = MTX_VGet(oMc, oMcr, tMi, tPi) + MTX_VGet(iMa, iMar, tMi, tNi) * MTX_VGet(iMb, iMbr, tNi, tPi)
          244                    MTX_VSet oMc, oMcr, tMi, tPi, tMv
          245                    
          246                Next
          247            Next
          248        Next
          249        
          250    End If
          251        
          252End Sub
          253Sub MTX_VSet(pM(), pMr, pX, pY, pMv)
          254    tMi = pY * pMr + pX
          255    pM(tMi) = pMv
          256End Sub
          257Function MTX_VGet(pM(), pMr, pX, pY)
          258    tMi = pY * pMr + pX
          259    MTX_VGet = pM(tMi)
          260End Function
          261Function Radian(pA)
          262    Radian = pA * 71 / 4068
          263End Function
          264</script>

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 龙南县| 乌鲁木齐县| 修水县| 云和县| 浦城县| 勃利县| 廊坊市| 双鸭山市| 蒙自县| 五原县| 桂东县| 祁东县| 鹤庆县| 开远市| 玛多县| 左权县| 永清县| 江华| 开江县| 梓潼县| 东平县| 太白县| 沁阳市| 明水县| 罗平县| 浙江省| 柯坪县| 舒城县| 姚安县| 吕梁市| 恩施市| 曲松县| 泾源县| 屏东县| 大城县| 克东县| 永济市| 广灵县| 秦皇岛市| 清水河县| 大田县|