three三维可视化动画演示A*、D* Lite、RRT * 和 RRT-Connect 四种路径规划算法区别代码

代码语言:html

所属分类:三维

代码描述:three三维可视化动画演示A*、D* Lite、RRT * 和 RRT-Connect 四种路径规划算法区别代码

代码标签: three 三维 可视化 动画 演示 A* D* Lite RRT * RRT-Connect

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D路径规划算法可视化演示</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            min-height: 100vh;
            color: #fff;
            overflow-x: hidden;
        }
        
        .header {
            text-align: center;
            padding: 30px;
            background: rgba(0,0,0,0.3);
            backdrop-filter: blur(10px);
        }
        
        .header h1 {
            font-size: 2.5em;
            background: linear-gradient(90deg, #00d4ff, #00ff88);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 10px;
        }
        
        .header p {
            color: #aaa;
            font-size: 1.1em;
        }
        
        .controls {
            display: flex;
            justify-content: center;
            gap: 20px;
            padding: 20px;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 15px 40px;
            font-size: 1.1em;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: bold;
        }
        
        .btn-start {
            background: linear-gradient(90deg, #00d4ff, #00ff88);
            color: #1a1a2e;
        }
        
        .btn-reset {
            background: linear-gradient(90deg, #ff6b6b, #ffa500);
            color: #fff;
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(0,212,255,0.3);
        }
        
        .speed-control {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(255,255,255,0.1);
            padding: 10px 20px;
            border-radius: 50px;
        }
        
        .speed-control input {
            width: 150px;
            accent-color: #00d4ff;
        }
        
        .container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            padding: 20px;
            max-width: 1800px;
            margin: 0 auto;
        }
        
        @media (max-width: 1200px) {
            .container {
                grid-template-columns: 1fr;
            }
        }
        
        .algorithm-box {
            background: rgba(255,255,255,0.05);
            border-radius: 20px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.1);
        }
        
        .algo-header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid rgba(255,255,255,0.1);
        }
        
        .algo-title {
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .algo-icon {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
        }
        
        .algo-name h3 {
            font-size: 1.3em;
            margin-bottom: 5px;
        }
        
        .algo-name p {
            font-size: 0.85em;
            color: #888;
        }
        
        .algo-stats {
            display: flex;
            gap: 20px;
        }
        
        .stat {
            text-align: center;
        }
        
        .stat-value {
            font-size: 1.5em;
            font-weight: bold;
        }
        
        .stat-label {
            font-size: 0.75em;
            color: #888;
        }
        
        .canvas-container {
            height: 400px;
            position: relative;
        }
        
        .algo-footer {
            padding: 15px 20px;
            background: rgba(0,0,0,0.2);
            font-size: 0.9em;
        }
        
        .algo-footer .step {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 5px 0;
        }
        
        .step-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
        }
        
        /* 算法特定颜色 */
        .astar .algo-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
        .astar .stat-value { color: #667eea; }
        
        .dstar .algo-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
        .dstar .stat-value { color: #f093fb; }
        
        .rrtstar .algo-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); }
        .rrtstar .stat-value { color: #4facfe; }
        
        .rrtconnect .algo-icon { background: linear-gradient(135deg, #43e97b, #38f9d7); }
        .rrtconnect .stat-value { color: #43e97b; }
        
        .legend {
            display: flex;
            justify-content: center;
            gap: 30px;
            padding: 20px;
            flex-wrap: wrap;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
           .........完整代码请登录后点击上方下载按钮下载查看

网友评论0