【编程游戏】贺岁霓虹灯。(参观247楼KiteGirl的霓虹灯,VBScript编写)

使用VBScript实现了一个3D螺旋霓虹灯效果的编程游戏。该效果通过不断旋转和变换来展示一个由多个发光点构成的螺旋结构,适用于浏览器环境,特别指出在Firefox浏览器中有较好的表现。

【编程游戏】贺岁霓虹灯。(第一名奖励10000可用分)

效果图

评分

参观 [目前Firefox中好使,其他浏览器需复制到本地,存为html文件看效果] <html> <head> <title>K.G Script3D 3.00 —— 螺旋霓虹灯</title> </head> <body bgcolor="#000000" text="#FFFFFF"> <p id="idText" style="color:rgb(255,255,255)"></p> <p id="idInsertObject"></p> </body> <script languate="VBScript" type="text/VBScript"> Dim pubS_Pix_x Dim pubS_Pix_y Dim pubS_Pix_z Dim pubS_Pix_c Dim pubD_Mx Dim pubD_My Dim pubD_Mz Dim pubD_Rx Dim pubD_Ry Dim pubD_Rz Dim pubD_Mtx_Mx Dim pubD_Mtx_Mr Dim pubD_Pix_x Dim pubD_Pix_y Dim pubD_Pix_z Dim pubF_Va Dim pubF_Vd Dim pubV_Vx Dim pubV_Vy Dim pubV_Vz Dim pubV_Sc Dim pubV_Mtx_Mx Dim pubV_Mtx_Mr Dim pubV_Pix_x Dim pubV_Pix_y Dim pubV_Pix_z Dim pubElm Dim pubElm_Len Dim pubWeb_Tv Dim pubWeb_Tw Dim pubWeb_WW, pubWeb_WH Dim pubR, pubG, pubB Dim pubOR, pubOG, pubOB 'Web DHTML 事件函数 Sub window_onload() MakeModule With document.body pubWeb_WW = .clientWidth pubWeb_WH = .clientHeight End With pubD_Rz = 0 pubD_Rx = 0 pubD_Ry = 0 pubF_Va = 15 pubF_Vd = 20 pubV_Vx = pubWeb_WW / 2 pubV_Vy = pubWeb_WH * 1.3 / 2 pubV_Vz = 0 pubV_Sc = 12 pubWeb_Tw = 33 MTX_3DMixV pubV_Vx, pubV_Vy, pubV_Vz, pubV_Sc, pubV_Mtx_Mx, pubV_Mtx_Mr Web_TimeLoop End Sub Sub MakeModule pubElm_Len = 919 pubElm = ELM_Create(pubElm_Len) ReDim pubS_Pix_x(pubElm_Len), pubS_Pix_y(pubElm_Len), pubS_Pix_z(pubElm_Len) ReDim pubD_Pix_x(pubElm_Len), pubD_Pix_y(pubElm_Len), pubD_Pix_z(pubElm_Len) ReDim pubV_Pix_x(pubElm_Len), pubV_Pix_y(pubElm_Len), pubV_Pix_z(pubElm_Len) ReDim pubS_Pix_c(pubElm_Len) tH = 100 tR = 0 For tI = 1 To 1500 Step 15 tR = tR + 0.1 tA = tA + (5 / tR * 2 * 3.14) tH = 30 - 5 * tR '2 * tR tAr = Radian(tA) tX = Sin(tAr) * tR * 3 tY = Cos(tAr) * tR * 3 For tZ = Int(tH) To 0 Step -1 pubS_Pix_x(tAdd) = tX pubS_Pix_y(tAdd) = tY pubS_Pix_z(tAdd) = tZ tAdd = tAdd + 1 Next Next pubD_Mx = 0 pubD_My = 0 pubD_Mz = 0 End Sub Sub Web_TimeLoop() pubD_Rz = (pubD_Rz + 5) Mod 360 pubD_Rx = -45 pubD_Ry = 0 MTX_3DMixD pubD_Mx, pubD_My, pubD_Mz, pubD_Rx, pubD_Ry, pubD_Rz, pubD_Mtx_Mx, pubD_Mtx_Mr 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 FIT_PSV pubD_Pix_x, pubD_Pix_y, pubD_Pix_z, pubF_Va, pubF_Vd, pubD_Pix_x, pubD_Pix_y, pubD_Pix_z 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 For tI = 0 To 10 For tEi = pubElm_Len To 0 Step -1 If CBool(tEi) Then pubS_Pix_c(tEi) = pubS_Pix_c(tEi-1) Else If pubR < pubOR Then pubR = pubR + 1 If pubR > pubOR Then pubR = pubR - 1 If pubG < pubOG Then pubG = pubG + 1 If pubG > pubOG Then pubG = pubG - 1 If pubB < pubOB Then pubB = pubB + 1 If pubB > pubOB Then pubB = pubB - 1 If pubR = pubOR And pubB = pubOB And pubG = pubOG Then pubOR = Int(Rnd * 128) + 127 pubOG = Int(Rnd * 128) + 127 pubOB = Int(Rnd * 128) + 127 End If pubS_Pix_c(tEi) = rgb(pubR, pubG, pubB) End If Next Next For tEi = pubElm_Len To 0 Step -1 With pubElm(tEi).style .left = pubV_Pix_x(tEi) .top = pubV_Pix_y(tEi) .color = pubS_Pix_c(tEi) End With Next pubWeb_Tv = window.setTimeout("Web_TimeLoop", pubWeb_Tw) End Sub Function ELM_Create(pEn) ReDim tElms(pEn) For tEi = 0 To pEn With document Set tElms(tEi) = .createElement("SPAN") .body.insertAdjacentElement "beForeEnd", tElms(tEi) End With With tElms(tEi) .innerText = "*" .style.position = "absolute" .style.color = rgb(0,0,0) End With Next ELM_Create = tElms End Function Sub PXE_MTXTram2D(pPx(), pPy(), pM(), pMr, oPx(), oPy()) tPe = UBound(pPx) For tPi = 0 To tPe oPx(tPi) = pPx(tPi) * pM(0) + pPy(tPi) * pM(1) + pM(2) oPy(tPi) = pPx(tPi) * pM(3) + pPy(tPi) * pM(4) + pM(5) Next End Sub Sub PXE_MTXTram3D(pPx(), pPy(), pPz(), pM(), pMr(), oPx(), oPy(), oPz()) tPe = UBound(pPx) For tPi = 0 To tPe oPx(tPi) = pPx(tPi) * pM(0) + pPy(tPi) * pM(1) + pPz(tPi) * pM(2) + pM(3) oPy(tPi) = pPx(tPi) * pM(4) + pPy(tPi) * pM(5) + pPz(tPi) * pM(6) + pM(7) oPz(tPi) = pPx(tPi) * pM(8) + pPy(tPi) * pM(9) + pPz(tPi) * pM(10) + pM(11) Next End Sub Sub FIT_PSV(iPx, iPy, iPz, iVa, iVd, oPx, oPy, oPz) tPe = UBound(iPx) For tPi = 0 To tPe tVr = Sin(Radian(iVa)) tZ = iPz(tPi) + iVd oPx(tPi) = iPx(tPi) * tVr * tZ / (tVr * iVd) oPy(tPi) = iPy(tPi) * tVr * tZ / (tVr * iVd) oPz(tPi) = iPz(tPi) Next End Sub Sub MTX_2DPixMulti(iSc, oM(), oMr) oMr = 3 ReDim oM(8) oM = Array(iSc, 0, 0, 0, iSc, 0, 0, 0, 1) End Sub Sub MTX_2DPixMove(iMx, iMy, oM(), oMr) oMr = 3 ReDim oM(8) oM = Array(1, 0, iMx, 0, 1, iMy, 0, 0, 1) End Sub Sub MTX_2DRot(iA, oM(), oMr) tR = Radian(iA) oMr = 3 ReDim oM(8) oM = Array(cos(tR), -sin(tR), 0, sin(tR), cos(tR), 0, 0, 0, 1) End Sub Sub MTX_3DMixD(iMx, iMy, iMz, iRx, iRy, iRz, oMx, oMr) MTX_3DPixMove tMtx_MV, oMr, iMx, iMy, iMz MTX_3DPixRotZ tMtx_RTz, oMr, iRz MTX_3DPixRotX tMtx_RTx, oMr, iRx MTX_3DPixRotY tMtx_RTy, oMr, iRy MTX_Multi tMtx_MV, oMr, tMtx_RTz, oMr, tMx, oMr oMx = tMx MTX_Multi oMx, oMr, tMtx_RTx, oMr, tMx, oMr oMx = tMx MTX_Multi oMx, oMr, tMtx_RTy, oMr, tMx, oMr oMx = tMx End Sub Sub MTX_3DMixV(iVx, iVy, iVz, iSc, oMx, oMr) MTX_3DPixMulti tMtx_SC, oMr, iSc MTX_3DPixMove tMtx_VM, oMr, iVx, iVy, iVz MTX_Multi tMtx_SC, oMr, tMtx_VM, oMr, tMx, oMr oMx = tMx End Sub Sub MTX_3DPixMulti(oM(), oMr, iSc) oMr = 4 ReDim oM(15) oM = Array(iSc, 0, 0, 0, 0, iSc, 0, 0, 0, 0, iSc, 0, 0, 0, 0, 1) End Sub Sub MTX_3DPixMove(oM(), oMr, iMx, iMy, iMz) oMr = 4 ReDim oM(15) oM = Array(1, 0, 0, iMx, 0, 1, 0, iMy, 0, 0, 1, iMz, 0, 0, 0, 1) End Sub Sub MTX_3DPixRotZ(oM(), oMr, iA) oMr = 4 ReDim oM(15) tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR) oM = Array(tCos, -tSin, 0, 0, tSin, tCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) End Sub Sub MTX_3DPixRotY(oM(), oMr, iA) oMr = 4 ReDim oM(15) tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR) oM = Array(tCos, 0, tSin, 0, 0, 1, 0, 0, -tSin, 0, tCos, 0, 0, 0, 0, 1) End Sub Sub MTX_3DPixRotX(oM(), oMr, iA) oMr = 4 tR = Radian(iA) tR = Radian(iA) : tSin = sin(tR) : tCos = cos(tR) oM = Array(1, 0, 0, 0, 0, tCos, tSin, 0, 0, -tSin, tCos, 0, 0, 0, 0, 1) End Sub Sub MTX_Multi(iMa(), iMar, iMb(), iMbr, oMc(), oMcr) tN = (iMar = ((UBound(iMb) / iMbr) + 1)) And (iMar - 1) If CBool(tN) Then tM = Ubound(iMa) / iMar tP = iMbr - 1 oMcr = tP + 1 ReDim oMc(oMcr * (tM + 1) - 1) For tMi = 0 To tM For tPi = 0 To tP For tNi = 0 To tN tMv = MTX_VGet(oMc, oMcr, tMi, tPi) + MTX_VGet(iMa, iMar, tMi, tNi) * MTX_VGet(iMb, iMbr, tNi, tPi) MTX_VSet oMc, oMcr, tMi, tPi, tMv Next Next Next End If End Sub Sub MTX_VSet(pM(), pMr, pX, pY, pMv) tMi = pY * pMr + pX pM(tMi) = pMv End Sub Function MTX_VGet(pM(), pMr, pX, pY) tMi = pY * pMr + pX MTX_VGet = pM(tMi) End Function Function Radian(pA) Radian = pA * 71 / 4068 End Function </script> </html>
参观 [目前Firefox中好使,其他浏览器需复制到本地,存为html文件看效果]

内容概要:本文介绍了一个基于多传感器融合的定位系统设计方案,采用GPS、里程计和电子罗盘作为定位传感器,利用扩展卡尔曼滤波(EKF)算法对多源传感器数据进行融合处理,最终输出目标的滤波后位置信息,并提供了完整的Matlab代码实现。该方法有效提升了定位精度与稳定性,尤其适用于存在单一传感器误差或信号丢失的复杂环境,如自动驾驶、移动采用GPS、里程计和电子罗盘作为定位传感器,EKF作为多传感器的融合算法,最终输出目标的滤波位置(Matlab代码实现)机器人导航等领域。文中详细阐述了各传感器的数据建模方式、状态转移与观测方程构建,以及EKF算法的具体实现步骤,具有较强的工程实践价值。; 适合人群:具备一定Matlab编程基础,熟悉传感器原理和滤波算法的高校研究生、科研人员及从事自动驾驶、机器人导航等相关领域的工程技术人员。; 使用场景及目标:①学习和掌握多传感器融合的基本理论与实现方法;②应用于移动机器人、无人车、无人机等系统的高精度定位与导航开发;③作为EKF算法在实际工程中应用的教学案例或项目参考; 阅读建议:建议读者结合Matlab代码逐行理解算法实现过程,重点关注状态预测与观测更新模块的设计逻辑,可尝试引入真实传感器数据或仿真噪声环境以验证算法鲁棒性,并进一步拓展至UKF、PF等更高级滤波算法的研究与对比。
内容概要:文章围绕智能汽车新一代传感器的发展趋势,重点阐述了BEV(鸟瞰图视角)端到端感知融合架构如何成为智能驾驶感知系统的新范式。传统后融合与前融合方案因信息丢失或算力需求过高难以满足高阶智驾需求,而基于Transformer的BEV融合方案通过统一坐标系下的多源传感器特征融合,在保证感知精度的同时兼顾算力可行性,显著提升复杂场景下的鲁棒性与系统可靠性。此外,文章指出BEV模型落地面临大算力依赖与高数据成本的挑战,提出“数据采集-模型训练-算法迭代-数据反哺”的高效数据闭环体系,通过自动化标注与长尾数据反馈实现算法持续进化,降低对人工标注的依赖,提升数据利用效率。典型企业案例进一步验证了该路径的技术可行性与经济价值。; 适合人群:从事汽车电子、智能驾驶感知算法研发的工程师,以及关注自动驾驶技术趋势的产品经理和技术管理者;具备一定自动驾驶基础知识,希望深入了解BEV架构与数据闭环机制的专业人士。; 使用场景及目标:①理解BEV+Transformer为何成为当前感知融合的主流技术路线;②掌握数据闭环在BEV模型迭代中的关键作用及其工程实现逻辑;③为智能驾驶系统架构设计、传感器选型与算法优化提供决策参考; 阅读建议:本文侧重技术趋势分析与系统级思考,建议结合实际项目背景阅读,重点关注BEV融合逻辑与数据闭环构建方法,并可延伸研究相关企业在舱泊一体等场景的应用实践。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值