<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>최대도달거리 &#8211; MyEngNote</title>
	<atom:link href="https://myengnote.com/tag/%ec%b5%9c%eb%8c%80%eb%8f%84%eb%8b%ac%ea%b1%b0%eb%a6%ac/feed/" rel="self" type="application/rss+xml" />
	<link>https://myengnote.com</link>
	<description></description>
	<lastBuildDate>Wed, 08 Jul 2026 04:42:42 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>포물선 운동 계산기 &#038; 시뮬레이터</title>
		<link>https://myengnote.com/projectile-motion-calculator-simulator/</link>
					<comments>https://myengnote.com/projectile-motion-calculator-simulator/#respond</comments>
		
		<dc:creator><![CDATA[동동]]></dc:creator>
		<pubDate>Wed, 03 Jun 2026 03:30:09 +0000</pubDate>
				<category><![CDATA[공학계산기]]></category>
		<category><![CDATA[공기저항]]></category>
		<category><![CDATA[비행시간]]></category>
		<category><![CDATA[최대도달거리]]></category>
		<category><![CDATA[탄도역학]]></category>
		<category><![CDATA[포물선운동]]></category>
		<guid isPermaLink="false">https://myengnote.com/projectile-motion-calculator-simulator/</guid>

					<description><![CDATA[포사체의 발사 속도, 각도, 초기 높이 및 공기 저항 계수를 변수로 정밀 설정하여 2D 궤적을 실시간으로 추적하고 발사 역학 물리 엔진을 구동하는 시뮬레이터입니다.]]></description>
										<content:encoded><![CDATA[
<h2 style="font-size: 1.6em; font-weight: 800; color: #0c0e25; border-bottom: 2px solid #00f2fe; padding-bottom: 8px; margin-bottom: 20px;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 포물선 운동 계산기 &#038; 시뮬레이터</h2>


<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&#038;family=Outfit:wght@400;500;600;700;800&#038;display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
/* Scoped & Isolated Styles for projectile-calculator-wrapper */
        /* Modern Reset and Design Tokens */
        .projectile-calculator-wrapper *, .projectile-calculator-wrapper *::before, .projectile-calculator-wrapper *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }
        .projectile-calculator-wrapper {
            --color-bg-dark: #f8f9fd;
            --color-bg-deep: #ffffff;
            --color-panel-bg: rgba(255, 255, 255, 0.85);
            --color-border: rgba(0, 0, 0, 0.06);
            --color-border-hover: rgba(0, 0, 0, 0.12);
            --color-text-main: #1e293b;
            --color-text-muted: #475569;
            --color-text-dark: #94a3b8;
            --color-cyan: #0284c7; /* Cobalt blue accent */
            --color-cyan-glow: rgba(2, 132, 199, 0.15);
            --color-magenta: #db2777; /* Pink/magenta accent */
            --color-magenta-glow: rgba(219, 39, 119, 0.15);
            --color-purple: #7c3aed;
            --color-purple-glow: rgba(124, 58, 237, 0.12);
            --color-success: #10b981;
            --color-warning: #f59e0b;
            --color-danger: #ef4444;
            --gradient-primary: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-purple) 100%);
            --gradient-accent: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-purple) 100%);
            --gradient-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%);
            --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            --shadow-neon-cyan: 0 0 15px var(--color-cyan-glow);
            --shadow-neon-magenta: 0 0 15px var(--color-magenta-glow);
            --shadow-card: 0 8px 32px 0 rgba(15, 23, 42, 0.05);
            --blur-glass: blur(16px);
        }
        .projectile-calculator-wrapper {
            background-color: var(--color-bg-dark);
            color: var(--color-text-main);
            font-family: var(--font-body);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            overflow-x: hidden;
            position: relative;
        }
        .app-background-glow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
            pointer-events: none;
        }
        .app-background-glow::before, 
        .app-background-glow::after {
            content: '';
            position: absolute;
            width: 600px;
            height: 600px;
            border-radius: 50%;
            filter: blur(140px);
            opacity: 0.15;
        }
        .app-background-glow::before {
            background: var(--color-cyan);
            top: -10%;
            right: -5%;
            animation: pulse-slow 15s infinite alternate;
        }
        .app-background-glow::after {
            background: var(--color-purple);
            bottom: -10%;
            left: -5%;
            animation: pulse-slow 20s infinite alternate-reverse;
        }
        @keyframes pulse-slow {
            0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
            100% { transform: scale(1.2) translate(50px, 50px); opacity: 0.22; }
        }
        .app-container {
            width: 100%;
            max-width: 1440px;
            padding: 24px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }
        .app-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 24px;
            background: var(--color-panel-bg);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 16px;
            box-shadow: var(--shadow-card);
        }
        .logo-area {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        .logo-icon {
            font-size: 32px;
            background: linear-gradient(135deg, var(--color-cyan), var(--color-magenta));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .logo-area h1 {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 24px;
            letter-spacing: 1.5px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-text-muted));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .logo-area .subtitle {
            font-size: 12px;
            color: var(--color-text-muted);
            font-weight: 500;
            letter-spacing: 0.5px;
        }
        .fa-spin-slow {
            animation: fa-spin 15s linear infinite;
        }
        .header-badge {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid rgba(16, 185, 129, 0.2);
            padding: 6px 14px;
            border-radius: 20px;
        }
        .pulse-dot {
            width: 8px;
            height: 8px;
            background-color: var(--color-success);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--color-success);
            animation: pulse-dot-anim 1.5s infinite;
        }
        @keyframes pulse-dot-anim {
            0% { transform: scale(0.9); opacity: 0.6; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(0.9); opacity: 0.6; }
        }
        .badge-text {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-success);
            letter-spacing: 0.5px;
        }
        .app-main-grid {
            display: grid;
            grid-template-columns: 340px 1fr 340px;
            gap: 24px;
            align-items: start;
        }
        .panel {
            background: var(--gradient-panel);
            backdrop-filter: var(--blur-glass);
            border: 1px solid var(--color-border);
            border-radius: 20px;
            padding: 24px;
            box-shadow: var(--shadow-card);
            display: flex;
            flex-direction: column;
            gap: 20px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .panel:hover {
            border-color: var(--color-border-hover);
        }
        .panel-header {
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid var(--color-border);
            padding-bottom: 14px;
        }
        .panel-header i {
            font-size: 18px;
        }
        .panel-header h2 {
            font-family: var(--font-heading);
            font-size: 18px;
            font-weight: 600;
            letter-spacing: 0.5px;
        }
        .text-cyan { color: var(--color-cyan); }
        .text-magenta { color: var(--color-magenta); }
        .text-purple { color: var(--color-purple); }
        .control-panel {
            grid-column: 1;
        }
        .input-group {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .input-label-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .input-label-row label {
            font-size: 13px;
            font-weight: 600;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .helper-text {
            font-size: 10px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
                .number-input-wrapper {
            display: flex;
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--color-border);
            background: #ffffff;
            transition: all 0.2s ease;
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .number-input-wrapper:focus-within {
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
                .custom-number-input {
            flex: 1;
            width: 0;
            min-width: 0;
            background: #f8fafc !important;
            border: none !important;
            outline: none !important;
            color: #0f172a !important;
            padding: 10px 14px !important;
            font-family: var(--font-body) !important;
            font-size: 15px !important;
            font-weight: 700 !important;
            text-align: right !important;
            box-shadow: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: textfield !important;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .custom-number-input::-webkit-outer-spin-button,
        .custom-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
                .unit-badge {
            background: rgba(0, 0, 0, 0.03);
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 700;
            padding: 0 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-left: 1px solid var(--color-border);
            pointer-events: none;
            flex-shrink: 0;
        }
        .custom-slider {
            -webkit-appearance: none;
            width: 100%;
            height: 6px;
            border-radius: 3px;
            background: rgba(0, 0, 0, 0.05);
            outline: none;
            margin: 8px 0;
            transition: background 0.2s ease;
        }
        .custom-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.1s ease, box-shadow 0.2s ease;
        }
        #slider-vel::-webkit-slider-thumb { background: var(--color-cyan); box-shadow: 0 0 10px var(--color-cyan); }
        #slider-ang::-webkit-slider-thumb { background: var(--color-magenta); box-shadow: 0 0 10px var(--color-magenta); }
        #slider-height::-webkit-slider-thumb { background: var(--color-purple); box-shadow: 0 0 10px var(--color-purple); }
        #slider-target::-webkit-slider-thumb { background: var(--color-danger); box-shadow: 0 0 10px var(--color-danger); }
        .segmented-control {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            background: rgba(0,0,0,0.03);
            border: 1px solid var(--color-border);
            border-radius: 8px;
            padding: 2px;
            gap: 2px;
        }
        .segment-btn {
            background: transparent;
            border: none;
            outline: none;
            color: var(--color-text-muted);
            font-size: 11px;
            font-weight: 600;
            padding: 8px;
            cursor: pointer;
            border-radius: 6px;
            transition: all 0.2s ease;
            text-align: center;
        }
        .segment-btn.active {
            background: #ffffff;
            color: var(--color-cyan);
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        }
        .control-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 10px;
        }
        .action-btn {
            background: rgba(0, 0, 0, 0.02);
            border: 1px solid var(--color-border);
            color: var(--color-text-main);
            padding: 12px;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .action-btn:hover {
            background: rgba(0, 0, 0, 0.04);
            border-color: var(--color-border-hover);
        }
        .action-btn.primary-btn {
            background: var(--gradient-primary);
            color: #fff;
            border: none;
            box-shadow: var(--shadow-neon-cyan);
        }
        .action-btn.primary-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 0 20px rgba(2, 132, 199, 0.4);
        }
        .presets-section {
            display: flex;
            flex-direction: column;
            gap: 12px;
            border-top: 1px solid var(--color-border);
            padding-top: 18px;
        }
        .presets-section h3 {
            font-size: 13px;
            font-weight: 700;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .presets-grid {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .preset-btn {
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            padding: 8px 12px;
            cursor: pointer;
            color: var(--color-text-main);
            display: flex;
            align-items: center;
            gap: 12px;
            text-align: left;
            transition: all 0.2s ease;
        }
        .preset-btn:hover {
            background: rgba(0, 0, 0, 0.05);
            border-color: var(--color-border);
            transform: translateX(4px);
        }
        .preset-btn.active {
            background: linear-gradient(90deg, var(--color-cyan-glow), var(--color-magenta-glow));
            border-color: var(--color-cyan);
            box-shadow: 0 0 10px var(--color-cyan-glow);
        }
        .preset-icon {
            width: 28px;
            height: 28px;
            background: rgba(0, 0, 0, 0.02);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: var(--color-cyan);
        }
        .preset-btn:hover .preset-icon, .preset-btn.active .preset-icon {
            background: var(--gradient-primary);
            color: #fff;
            box-shadow: var(--shadow-neon-cyan);
        }
        .preset-name {
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.25px;
        }
        .simulation-panel {
            grid-column: 2;
            align-self: start;
        }
        .canvas-wrapper {
            position: relative;
            width: 100%;
            background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
            border: 1px solid rgba(0, 0, 0, 0.06);
            border-radius: 16px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        #physics-canvas {
            display: block;
            width: 100%;
            height: auto;
            aspect-ratio: 16 / 12;
        }
        .simulation-metrics-strip {
            display: flex;
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 20px;
            justify-content: space-around;
            align-items: center;
            gap: 10px;
            margin-top: 10px;
        }
        .mini-metric {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            text-align: center;
        }
        .mini-metric .label {
            font-size: 10px;
            font-weight: 600;
            color: var(--color-text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .mini-metric .value {
            font-size: 14px;
            font-weight: 700;
            color: var(--color-text-main);
            font-family: var(--font-heading);
        }
        .mini-divider {
            width: 1px;
            height: 24px;
            background: rgba(0, 0, 0, 0.03);
        }
        .results-panel {
            grid-column: 3;
        }
        .ratio-readout-box {
            background: linear-gradient(135deg, rgba(0, 242, 254, 0.08) 0%, rgba(138, 43, 226, 0.03) 100%);
            border: 1px solid rgba(0, 242, 254, 0.25);
            border-radius: 16px;
            padding: 20px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
        }
        .ratio-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--color-cyan);
            letter-spacing: 1px;
            text-transform: uppercase;
        }
        .ratio-value {
            font-family: var(--font-heading);
            font-weight: 800;
            font-size: 32px;
            background: linear-gradient(90deg, var(--color-text-main), var(--color-cyan));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .ratio-type {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .results-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .result-card {
            background: rgba(255, 255, 255, 0.85);
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s ease;
        }
        .result-card:hover {
            transform: translateY(-2px);
            border-color: rgba(0, 242, 254, 0.2);
            background: rgba(0, 242, 254, 0.03);
        }
        .card-icon {
            width: 38px;
            height: 38px;
            background: rgba(0, 0, 0, 0.015);
            border: 1px solid var(--color-border);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: var(--color-text-muted);
        }
        .result-card:hover .card-icon {
            color: var(--color-cyan);
            border-color: rgba(0, 242, 254, 0.3);
            background: rgba(0, 242, 254, 0.1);
        }
        .card-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .card-unit {
            font-size: 11px;
            font-weight: 600;
            color: var(--color-text-muted);
        }
        .card-value {
            font-family: var(--font-heading);
            font-weight: 700;
            font-size: 18px;
            color: var(--color-text-main);
        }
        .formula-card {
            background: rgba(0, 0, 0, 0.01);
            border: 1px solid var(--color-border);
            border-radius: 12px;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            font-size: 12px;
        }
        .formula-card h4 {
            font-weight: 700;
            color: var(--color-text-main);
        }
        .formula-equation {
            font-family: monospace;
            color: var(--color-cyan);
            font-size: 13px;
            background: #f8fafc;
            padding: 6px 10px;
            border-radius: 6px;
            border: 1px solid var(--color-border);
            text-align: center;
        }
        @container projectile-container (max-width: 1024px) {
            .app-main-grid {
                grid-template-columns: 1fr;
            }
            .control-panel, .simulation-panel, .results-panel, .results-panel {
                grid-column: 1;
            }
            .simulation-panel {
                order: -1;
            }
        }
        .preset-details {
            display: flex;
            flex-direction: column;
            gap: 2px;
            align-items: flex-start;
            text-align: left;
        }
        .preset-spec {
            font-size: 11px;
            color: var(--color-text-muted);
            font-weight: 500;
        }
        .preset-name {
            font-size: 13px !important;
        }
/* ━━ WordPress 레이아웃 Override: 디자인 1 (2열 컴팩트 대칭 레이아웃) ━━ */
.projectile-calculator-wrapper .app-main-grid,
.projectile-calculator-wrapper .main-grid,
.projectile-calculator-wrapper .sim-grid {
    display: grid !important;
    grid-template-columns: 340px 1fr !important;
    gap: 24px !important;
    align-items: start !important;
}
/* 3열 레이아웃을 2열 레이아웃으로 변경하는 특화 스타일 */
.projectile-calculator-wrapper .right-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    min-width: 0 !important;
    grid-column: 2 !important;
}
.projectile-calculator-wrapper .simulation-panel,
.projectile-calculator-wrapper .canvas-panel,
.projectile-calculator-wrapper .sim-panel {
    grid-column: auto !important;
    order: 1 !important;
    align-self: stretch !important;
}
.projectile-calculator-wrapper .control-panel {
    grid-column: 1 !important;
}
/* 2열 통합 결과 분석 영역 레이아웃 */
.projectile-calculator-wrapper .simulation-results-section {
    display: grid !important;
    grid-template-columns: 1.1fr 1.3fr !important;
    gap: 20px !important;
    border-top: 1px solid var(--color-border) !important;
    padding-top: 20px !important;
    margin-top: 10px !important;
    align-items: stretch !important;
}
/* Readout Box 스타일 */
.projectile-calculator-wrapper .simulation-results-section .ratio-readout-box,
.projectile-calculator-wrapper .simulation-results-section .re-readout-box,
.projectile-calculator-wrapper .simulation-results-section .status-readout-box,
.projectile-calculator-wrapper .simulation-results-section .gauge-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.projectile-calculator-wrapper .simulation-results-section .results-grid {
    grid-column: 2 !important;
    grid-row: 1 / span 2 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    justify-content: flex-start !important;
}
.projectile-calculator-wrapper .simulation-results-section .results-grid .result-card {
    flex: none !important;
    display: flex !important;
    align-items: center !important;
    min-height: 72px !important;
    height: auto !important;
    padding: 12px 16px !important;
}
.projectile-calculator-wrapper .simulation-results-section .formula-card {
    grid-column: 1 !important;
    grid-row: 2 !important;
}
/* 모바일/반응형 (800px 이하) ── 항상 세로형(1열) 정렬 및 시뮬레이터 캔버스 최상단 배치 */
@media (max-width: 800px) {
    .projectile-calculator-wrapper .app-main-grid,
    .projectile-calculator-wrapper .main-grid,
    .projectile-calculator-wrapper .sim-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .projectile-calculator-wrapper .control-panel {
        order: 2 !important;
        width: 100% !important;
    }
    .projectile-calculator-wrapper .right-column {
        order: 1 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    .projectile-calculator-wrapper .simulation-panel,
    .projectile-calculator-wrapper .canvas-panel,
    .projectile-calculator-wrapper .sim-panel,
    .projectile-calculator-wrapper .canvas-section {
        order: -1 !important;
    }
    .projectile-calculator-wrapper .simulation-results-section {
        grid-template-columns: 1fr !important;
    }
    .projectile-calculator-wrapper .simulation-results-section .ratio-readout-box,
    .projectile-calculator-wrapper .simulation-results-section .re-readout-box,
    .projectile-calculator-wrapper .simulation-results-section .status-readout-box,
    .projectile-calculator-wrapper .simulation-results-section .gauge-container {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto !important;
    }
    .projectile-calculator-wrapper .simulation-results-section .results-grid {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    .projectile-calculator-wrapper .simulation-results-section .formula-card {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
}
.projectile-calculator-wrapper .app-container,
.projectile-calculator-wrapper .main-container {
    max-width: 100% !important;
    padding: 12px !important;
}
/* Premium Advice/Formula Card & Typography Overrides */
.projectile-calculator-wrapper .simulation-results-section .formula-card,
.projectile-calculator-wrapper .results-panel .formula-card {
    background: #ffffff !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: var(--shadow-card) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}
.projectile-calculator-wrapper .simulation-results-section .formula-card h4,
.projectile-calculator-wrapper .results-panel .formula-card h4 {
    font-weight: 700 !important;
    color: var(--color-text-main) !important;
}
.projectile-calculator-wrapper #text-judgment {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--color-text-muted) !important;
    line-height: 1.6 !important;
    word-break: keep-all !important;
}
</style>
<div class="projectile-calculator-wrapper" style="position: relative; width: 100%; box-sizing: border-box; overflow: hidden; margin: 30px auto; border-radius: 20px;">
    <div class="app-background-glow" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: hidden;"></div>
    <div style="position: relative; z-index: 2; width: 100%;">
    <div class="app-container">
        <!-- Header -->
        <header class="app-header">
            <div class="logo-area">
                <div class="logo-icon"><i class="fa-solid fa-plane-launch fa-spin-slow text-cyan"></i></div>
                <div>
                    <h1>PROJECTILE MOTION</h1>
                    <div class="subtitle">포물선 운동 계산기 &#038; 실시간 탄도 시뮬레이터</div>
                </div>
            </div>
            <div class="header-badge">
                <div class="pulse-dot"></div>
                <div class="badge-text">2D PHYSICS ENGINE ONLINE</div>
            </div>
        </header>
        <!-- Main Layout Grid -->
        <main class="app-main-grid">
            <!-- Left Panel: Controls -->
            <section class="panel control-panel">
                <div class="panel-header">
                    <i class="fa-solid fa-sliders text-cyan"></i>
                    <h2>포사체 발사 변수</h2>
                </div>
                <!-- Launch Velocity (v0) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-gauge-high text-cyan"></i> 초기 발사 속도 (V₀)</label>
                        <span class="helper-text">(10 ~ 80 m/s)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-vel" class="custom-number-input" min="10" max="80" value="40">
                        <div class="unit-badge">m/s</div>
                    </div>
                    <input type="range" id="slider-vel" class="custom-slider" min="10" max="80" step="1" value="40">
                </div>
                <!-- Launch Angle (theta) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-compass text-magenta"></i> 발사 각도 (θ)</label>
                        <span class="helper-text">(10 ~ 85 deg)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-ang" class="custom-number-input" min="10" max="85" value="45">
                        <div class="unit-badge">deg</div>
                    </div>
                    <input type="range" id="slider-ang" class="custom-slider" min="10" max="85" step="1" value="45">
                </div>
                <!-- Initial Height (h0) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-mountain text-purple"></i> 초기 포고 높이 (h₀)</label>
                        <span class="helper-text">(0 ~ 50 m)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-height" class="custom-number-input" min="0" max="50" value="10">
                        <div class="unit-badge">m</div>
                    </div>
                    <input type="range" id="slider-height" class="custom-slider" min="0" max="50" step="2" value="10">
                </div>
                <!-- Gravity Fields -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-globe"></i> 작동 중력장 (g)</label>
                    </div>
                    <div class="segmented-control" id="control-gravity">
                        <button class="segment-btn active" data-value="9.81">지구 (9.8)</button>
                        <button class="segment-btn" data-value="3.71">화성 (3.7)</button>
                        <button class="segment-btn" data-value="1.62">달 (1.6)</button>
                    </div>
                </div>
                <!-- Air Drag Coefficient (Cd) -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-wind"></i> 공기 마찰 저항계수 (Cd)</label>
                        <span class="helper-text">(0.00 ~ 0.50)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-drag" class="custom-number-input" min="0.00" max="0.50" step="0.05" value="0.00">
                        <div class="unit-badge">Cd</div>
                    </div>
                </div>
                <!-- Target Position X -->
                <div class="input-group">
                    <div class="input-label-row">
                        <label><i class="fa-solid fa-bullseye"></i> 타겟 탄착 거리</label>
                        <span class="helper-text">(50 ~ 600 m)</span>
                    </div>
                    <div class="number-input-wrapper">
                        <input type="number" id="input-target" class="custom-number-input" min="50" max="600" value="150">
                        <div class="unit-badge">m</div>
                    </div>
                    <input type="range" id="slider-target" class="custom-slider" min="50" max="600" step="10" value="150">
                </div>
                <!-- Trigger & Reset actions -->
                <div class="control-actions">
                    <button id="btn-launch" class="action-btn primary-btn"><i class="fa-solid fa-meteor"></i> 대포 발사!</button>
                    <button id="btn-reset" class="action-btn"><i class="fa-solid fa-rotate-left"></i> 리셋</button>
                </div>
                <!-- Presets -->
                <div class="presets-section">
                    <h3><i class="fa-solid fa-tags text-cyan"></i> 탄도 시나리오 프리셋</h3>
                    <div class="presets-grid">
                        <button class="preset-btn" data-preset="ground">
                            <div class="preset-icon"><i class="fa-solid fa-crosshairs"></i></div>
                            <div class="preset-details"><span class="preset-name">평지 포격전<br>
                                <span style="font-size: 10.5px; color: var(--color-text-muted); font-weight: 500;">(45°, 40m/s, Cd=0, 지구)</span>
                            </div>
                        </button>
                        <button class="preset-btn" data-preset="cliff">
                            <div class="preset-icon"><i class="fa-solid fa-mountain-sun"></i></div>
                            <div class="preset-name">
                                고지 포격전<br>
                                <span style="font-size: 10.5px; color: var(--color-text-muted); font-weight: 500;">(25°, 30m/s, h=40m, 지구)</span>
                            </div>
                        </button>
                        <button class="preset-btn" data-preset="moon">
                            <div class="preset-icon"><i class="fa-solid fa-moon"></i></div>
                            <div class="preset-name">
                                달 중력 발사<br>
                                <span style="font-size: 10.5px; color: var(--color-text-muted); font-weight: 500;">(45°, 20m/s, Cd=0, 달)</span>
                            </div>
                        </button>
                    </div>
                </div>
            </section>
            <!-- Auto Injected Right Column wrapper for Design 1 -->
            <div class="right-column">
                <section class="panel simulation-panel">
                                <div class="panel-header">
                                    <div style="display: flex; align-items: center; gap: 12px;">
                                        <i class="fa-solid fa-circle-nodes text-cyan"></i>
                                        <h2>실시간 탄도 궤적 및 속도 벡터 시뮬레이터</h2>
                                    </div>
                                    <div id="txt-hit-alert" class="canvas-scale-indicator text-cyan">조준 완료</div>
                                </div>
                                <div class="canvas-wrapper">
                                    <canvas id="physics-canvas"></canvas>
                                </div>
                                <!-- Mini Metrics -->
                                <div class="simulation-metrics-strip">
                                    <div class="mini-metric">
                                        <div class="label">실시간 비행 시간</div>
                                        <div id="txt-flight-time" class="value">0.00 s</div>
                                    </div>
                                    <div class="mini-divider"></div>
                                    <div class="mini-metric">
                                        <div class="label">실시간 속도</span><span class="preset-spec">Vx | Vy</span></div>
                                        <div id="txt-live-vel" class="value">0.00 m/s</div>
                                    </div>
                                </div>
                                <!-- Integrated Results Analysis Section -->
                            <div class="simulation-results-section">
                                <div class="ratio-readout-box">
                                    <div class="ratio-title">최대 탄도 수평 거리 (R)</div>
                                    <div id="txt-range-out" class="ratio-value">173.2 m</div>
                                    <div id="txt-terminal-out" class="ratio-type">(탄착 최종 속도: 40.2 m/s)</div>
                                </div>
                                <div class="results-grid">
                                        <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-angles-up text-cyan"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">도달 최고 궤적 높이 (H_max)</span>
                                            <span id="txt-height-out" class="card-value">50.8 m</span>
                                        </div>
                                    </div>
                                        <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-stopwatch text-magenta"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">총 궤적 비행 시간 (T_flight)</span>
                                            <span id="txt-time-out" class="card-value">6.12 s</span>
                                        </div>
                                    </div>
                                        <div class="result-card">
                                        <div class="card-icon"><i class="fa-solid fa-bullseye text-purple"></i></div>
                                        <div class="card-content">
                                            <span class="card-unit">타겟 탄착 오차 거리</span>
                                            <span id="txt-error-out" class="card-value">23.2 m 오차</span>
                                        </div>
                                    </div>
                                    </div>
                                <div class="formula-card"
                                    <h4>뉴턴 중력장 운동 법칙 공식</h4>
                                    <div class="formula-equation">X(t) = V₀·cosθ · t [m]</div>
                                    <div class="formula-equation">Y(t) = h₀ + V₀·sinθ·t &#8211; 0.5·g·t² [m]</div>
                                </div>
                            </div>
                </section>
            </div>
            <!-- Right Panel: Quantitative Results -->
        </main>
        <!-- Disclaimer Footer -->
        <footer class="app-disclaimer" style="margin-top: 20px; padding: 12px 16px; background: rgba(0, 0, 0, 0.015); border: 1px solid var(--color-border); border-radius: 12px; font-size: 11px; color: var(--color-text-muted); line-height: 1.5; text-align: left; display: flex; gap: 10px; align-items: flex-start; clear: both;">
            <i class="fa-solid fa-circle-info" style="color: var(--color-cyan); font-size: 14px; margin-top: 2px; flex-shrink: 0;"></i>
            <span><strong>면책 조항 (Disclaimer):</strong> 본 시뮬레이터의 계산 결과는 교육 및 참고용으로만 제공되며, 실제 제품 설계나 제작 시에는 반드시 최신 공학 규격 및 공식 표준 설계 기준을 재확인하시기 바랍니다. 계산 값의 무결성을 보장하지 않으며, 이로 인해 발생하는 직접적/간접적 손해에 대해 제작자 및 본 블로그는 어떠한 책임을 지지 않습니다.</span>
        </footer>
</div>
    <!-- JavaScript Bullet Simulation Engine -->
    </div>
</div>
<script>
        (function() {
        let isInit = false;
        function initSimulator() {
            if (isInit) return;
            const canvas = document.getElementById('physics-canvas');
            if (!canvas) return;
            const ctx = canvas.getContext('2d');
            if (!ctx) return;
            isInit = true;
            window.__projectile_initialized = true;
            // DOM Elements
            const sliderVel = document.getElementById('slider-vel');
            const inputVel = document.getElementById('input-vel');
            const sliderAng = document.getElementById('slider-ang');
            const inputAng = document.getElementById('input-ang');
            const sliderHeight = document.getElementById('slider-height');
            const inputHeight = document.getElementById('input-height');
            const sliderTarget = document.getElementById('slider-target');
            const inputDrag = document.getElementById('input-drag');
            const inputTarget = document.getElementById('input-target');
            const controlGravity = document.getElementById('control-gravity');
            const presetButtons = document.querySelectorAll('.preset-btn');
            const btnLaunch = document.getElementById('btn-launch');
            const btnReset = document.getElementById('btn-reset');
            const txtRangeOut = document.getElementById('txt-range-out');
            const txtTerminalOut = document.getElementById('txt-terminal-out');
            const txtHeightOut = document.getElementById('txt-height-out');
            const txtTimeOut = document.getElementById('txt-time-out');
            const txtErrorOut = document.getElementById('txt-error-out');
            const txtHitAlert = document.getElementById('txt-hit-alert');
            const txtFlightTime = document.getElementById('txt-flight-time');
            const txtLiveVel = document.getElementById('txt-live-vel');
            // State variables
            const state = {
                vel0: 40.0,
                ang: 45.0,
                height0: 10.0,
                gravity: 9.81,
                dragCd: 0.00,
                targetX: 150.0,
                // Dynamic canvas scale (updated after each calculation)
                dynMaxX: 350.0,
                dynMaxY: 100.0,
                // Simulation Run variables
                isRunning: false,
                simTime: 0.0,
                ball: { x: 0.0, y: 0.0, vx: 0.0, vy: 0.0 },
                path: [], // list of visited {x, y} for actual path
                theoreticalPath: [], // vacuum theoretical path
                isHit: false,
                lastTime: 0
            };
            function resizeCanvas() {
                const rect = canvas.getBoundingClientRect();
                const dpr = window.devicePixelRatio || 1;
                canvas.width = rect.width * dpr;
                canvas.height = rect.height * dpr;
                ctx.scale(dpr, dpr);
            }
            resizeCanvas();
            window.addEventListener('resize', resizeCanvas);
            setTimeout(resizeCanvas, 300);
            // Sync Inputs
            function syncVelFromSlider() {
                const val = parseInt(sliderVel.value);
                inputVel.value = val;
                state.vel0 = val;
                clearPresets();
                updateCalculations();
            }
            function syncVelFromInput() {
                let val = parseInt(inputVel.value);
                if (isNaN(val)) { val = 10; }
                if (val < 10) { val = 10; }
                if (val > 80) { val = 80; }
                sliderVel.value = val;
                state.vel0 = val;
                clearPresets();
                updateCalculations();
            }
            function syncAngFromSlider() {
                const val = parseInt(sliderAng.value);
                inputAng.value = val;
                state.ang = val;
                clearPresets();
                updateCalculations();
            }
            function syncAngFromInput() {
                let val = parseInt(inputAng.value);
                if (isNaN(val)) { val = 10; }
                if (val < 10) { val = 10; }
                if (val > 85) { val = 85; }
                sliderAng.value = val;
                state.ang = val;
                clearPresets();
                updateCalculations();
            }
            function syncHeightFromSlider() {
                const val = parseInt(sliderHeight.value);
                inputHeight.value = val;
                state.height0 = val;
                clearPresets();
                updateCalculations();
            }
            function syncHeightFromInput() {
                let val = parseInt(inputHeight.value);
                if (isNaN(val)) { val = 0; }
                if (val < 0) { val = 0; }
                if (val > 50) { val = 50; }
                sliderHeight.value = val;
                state.height0 = val;
                clearPresets();
                updateCalculations();
            }
            function syncTargetFromSlider() {
                const val = parseInt(sliderTarget.value);
                inputTarget.value = val;
                state.targetX = val;
                clearPresets();
                updateCalculations();
            }
            function syncTargetFromInput() {
                let val = parseInt(inputTarget.value);
                if (isNaN(val)) { val = 50; }
                if (val < 50) { val = 50; }
                if (val > 600) { val = 600; }
                sliderTarget.value = val;
                state.targetX = val;
                clearPresets();
                updateCalculations();
            }
            // Ballistic Integration logic (using fine steps for Cd air drag, standard quadratic for vacuum)
            function calculateTrajectoryDetails() {
                const rad = (state.ang * Math.PI) / 180.0;
                // 1. Vacuum theoretical calculations
                const tFlightVacuum = (state.vel0 * Math.sin(rad) + Math.sqrt(Math.pow(state.vel0 * Math.sin(rad), 2) + 2.0 * state.gravity * state.height0)) / state.gravity;
                const rangeVacuum = state.vel0 * Math.cos(rad) * tFlightVacuum;
                const maxHeightVacuum = state.height0 + Math.pow(state.vel0 * Math.sin(rad), 2) / (2.0 * state.gravity);
                // Build theoretical path points for visualization
                state.theoreticalPath = [];
                const steps = 60;
                for (let i = 0; i <= steps; i++) {
                    const stepT = (i / steps) * tFlightVacuum;
                    const px = state.vel0 * Math.cos(rad) * stepT;
                    const py = state.height0 + state.vel0 * Math.sin(rad) * stepT - 0.5 * state.gravity * stepT * stepT;
                    if (py >= 0) {
                        state.theoreticalPath.push({ x: px, y: py });
                    }
                }
                // 2. Numerical Actual path calculations (takes Drag Cd into account)
                let tempBall = {
                    x: 0.0,
                    y: state.height0,
                    vx: state.vel0 * Math.cos(rad),
                    vy: state.vel0 * Math.sin(rad)
                };
                const simStep = 0.005; // 5ms step for integration
                let flightTime = 0.0;
                let maxH = state.height0;
                const rho = 1.225; // air density kg/m3
                const mass = 1.0; // Assume 1kg projectile
                const area = 0.01; // cross sectional area
                while ((tempBall.y >= 0.0) ? (flightTime < 25.0) : false) {
                    flightTime += simStep;
                    const speed = Math.sqrt(tempBall.vx * tempBall.vx + tempBall.vy * tempBall.vy);
                    // F_drag = 0.5 * Cd * rho * A * v^2
                    const fDrag = 0.5 * state.dragCd * rho * area * speed * speed;
                    // Acceleration component values
                    // Ax = - Fx_drag / m
                    // Ay = - g - Fy_drag / m
                    let ax = 0;
                    let ay = -state.gravity;
                    if (speed > 0.01) {
                        ax = -(fDrag * (tempBall.vx / speed)) / mass;
                        ay = -state.gravity - (fDrag * (tempBall.vy / speed)) / mass;
                    }
                    // Euler steps
                    tempBall.x += tempBall.vx * simStep;
                    tempBall.y += tempBall.vy * simStep;
                    tempBall.vx += ax * simStep;
                    tempBall.vy += ay * simStep;
                    if (tempBall.y > maxH) {
                        maxH = tempBall.y;
                    }
                }
                const actualRange = tempBall.x;
                const termVel = Math.sqrt(tempBall.vx * tempBall.vx + tempBall.vy * tempBall.vy);
                const errorDist = Math.abs(actualRange - state.targetX);
                // X scale: follow the TARGET position (not trajectory range)
                // This makes the parabola visually meaningful - shows if it reaches the target
                const neededX = Math.max(state.targetX * 1.4, actualRange * 1.1, 250.0);
                const neededY = Math.max(maxH * 1.20, state.height0 + 10, 80.0);
                state.dynMaxX = neededX;
                state.dynMaxY = neededY;
                // Update UI readouts
                txtRangeOut.innerText = actualRange.toFixed(1) + ' m';
                txtTerminalOut.innerText = '(탄착 최종 속도: ' + termVel.toFixed(1) + ' m/s)';
                txtHeightOut.innerText = maxH.toFixed(1) + ' m';
                txtTimeOut.innerText = flightTime.toFixed(2) + ' sec';
                txtErrorOut.innerText = errorDist.toFixed(1) + ' m 오차';
                if (errorDist <= 10.0) {
                    txtHitAlert.innerText = '명중 가능 범위! (HIT)';
                    txtHitAlert.style.color = '#10b981';
                } else {
                    txtHitAlert.innerText = '오차 범위 발생';
                    txtHitAlert.style.color = '#f59e0b';
                }
            }
            function updateCalculations() {
                // Reset trajectory display when parameters change
                state.isRunning = false;
                state.path = [];
                calculateTrajectoryDetails();
            }
            // Presets
            function loadPreset(key) {
                clearPresets();
                presetButtons.forEach(btn => {
                    if (btn.dataset.preset === key) {
                        btn.classList.add('active');
                    }
                });
                if (key === 'ground') {
                    state.vel0 = 40;
                    state.ang = 45;
                    state.height0 = 0;
                    state.dragCd = 0.00;
                    state.gravity = 9.81;
                    state.targetX = 163;
                }
                if (key === 'cliff') {
                    state.vel0 = 32;
                    state.ang = 25;
                    state.height0 = 40;
                    state.dragCd = 0.05;
                    state.gravity = 9.81;
                    state.targetX = 135;
                }
                if (key === 'moon') {
                    state.vel0 = 20;
                    state.ang = 45;
                    state.height0 = 0;
                    state.dragCd = 0.00;
                    state.gravity = 1.62;
                    state.targetX = 247;
                }
                // Sync elements
                inputVel.value = state.vel0;
                sliderVel.value = state.vel0;
                inputAng.value = state.ang;
                sliderAng.value = state.ang;
                inputHeight.value = state.height0;
                sliderHeight.value = state.height0;
                inputDrag.value = state.dragCd.toFixed(2);
                inputTarget.value = state.targetX;
                sliderTarget.value = state.targetX;
                document.querySelectorAll('#control-gravity .segment-btn').forEach(btn => {
                    btn.classList.remove('active');
                    if (parseFloat(btn.dataset.value) === state.gravity) {
                        btn.classList.add('active');
                    }
                });
                updateCalculations();
            }
            function clearPresets() {
                presetButtons.forEach(btn => btn.classList.remove('active'));
            }
            // Trigger Launch Animation Sequence
            btnLaunch.addEventListener('click', () => {
                const rad = (state.ang * Math.PI) / 180.0;
                state.ball = {
                    x: 0.0,
                    y: state.height0,
                    vx: state.vel0 * Math.cos(rad),
                    vy: state.vel0 * Math.sin(rad)
                };
                state.path = [];
                state.simTime = 0.0;
                state.isRunning = true;
                state.isHit = false;
                txtHitAlert.innerText = '포사체 날아가는 중...';
                txtHitAlert.style.color = '#db2777';
            });
            btnReset.addEventListener('click', () => {
                state.isRunning = false;
                state.path = [];
                state.isHit = false;
                txtHitAlert.innerText = '리셋 완료';
                txtHitAlert.style.color = '#0284c7';
                txtFlightTime.innerText = '0.00 s';
                txtLiveVel.innerText = '0.00 m/s';
                updateCalculations();
            });
            // Bind Event Listeners
            sliderVel.addEventListener('input', syncVelFromSlider);
            inputVel.addEventListener('change', syncVelFromInput);
            sliderAng.addEventListener('input', syncAngFromSlider);
            inputAng.addEventListener('change', syncAngFromInput);
            sliderHeight.addEventListener('input', syncHeightFromSlider);
            inputHeight.addEventListener('change', syncHeightFromInput);
            sliderTarget.addEventListener('input', syncTargetFromSlider);
            inputTarget.addEventListener('change', syncTargetFromInput);
            inputDrag.addEventListener('change', () => {
                let val = parseFloat(inputDrag.value);
                if (isNaN(val)) { val = 0.0; }
                if (val < 0.0) { val = 0.0; }
                if (val > 0.5) { val = 0.5; }
                inputDrag.value = val.toFixed(2);
                state.dragCd = val;
                updateCalculations();
            });
            // Gravity
            document.querySelectorAll('#control-gravity .segment-btn').forEach(btn => {
                btn.addEventListener('click', () => {
                    document.querySelectorAll('#control-gravity .segment-btn').forEach(b => b.classList.remove('active'));
                    btn.classList.add('active');
                    state.gravity = parseFloat(btn.dataset.value);
                    clearPresets();
                    updateCalculations();
                });
            });
            presetButtons.forEach(btn => {
                btn.addEventListener('click', () => {
                    loadPreset(btn.dataset.preset);
                });
            });
            // Animation Loop
            function animate(currentTime) {
                requestAnimationFrame(animate);
                let dt = (currentTime - state.lastTime) / 1000;
                if (isNaN(dt)) { dt = 0.016; }
                if (dt < 0) { dt = 0.016; }
                if (dt > 1.0) { dt = 0.016; }
                state.lastTime = currentTime;
                const width = canvas.width / (window.devicePixelRatio || 1);
                const height = canvas.height / (window.devicePixelRatio || 1);
                ctx.clearRect(0, 0, width, height);
                // Draw blueprint grid
                ctx.save();
                ctx.strokeStyle = 'rgba(2, 132, 199, 0.06)';
                ctx.lineWidth = 1;
                const gridSpacing = 25;
                for (let x = 0; x < width; x += gridSpacing) {
                    ctx.beginPath();
                    ctx.moveTo(x, 0);
                    ctx.lineTo(x, height);
                    ctx.stroke();
                }
                for (let y = 0; y < height; y += gridSpacing) {
                    ctx.beginPath();
                    ctx.moveTo(0, y);
                    ctx.lineTo(width, y);
                    ctx.stroke();
                }
                ctx.restore();
                // Geometry Mapping: dynamic scale based on actual trajectory extent
                const plotMarginL = 58;
                const plotMarginR = 20;
                const plotMarginB = 36;
                const plotMarginT = 20;
                const scaleX = (width - plotMarginL - plotMarginR) / state.dynMaxX;
                const scaleY = (height - plotMarginB - plotMarginT) / state.dynMaxY;
                const toCanvasX = (px) => plotMarginL + px * scaleX;
                const toCanvasY = (py) => height - plotMarginB - py * scaleY;
                // Draw ground line
                ctx.save();
                ctx.strokeStyle = '#475569';
                ctx.lineWidth = 3;
                ctx.beginPath();
                ctx.moveTo(plotMarginL, height - plotMarginB);
                ctx.lineTo(width - plotMarginR, height - plotMarginB);
                ctx.stroke();
                // Dynamic X-axis ticks
                ctx.fillStyle = "rgba(71,85,105,0.6)";
                ctx.font = "8px Inter, sans-serif";
                ctx.textAlign = "center";
                const xTickStep = state.dynMaxX <= 400 ? 50 : state.dynMaxX <= 800 ? 100 : state.dynMaxX <= 1600 ? 200 : 400;
                const xTickCount = Math.floor(state.dynMaxX / xTickStep);
                for (let i = 1; i <= xTickCount; i++) {
                    const xDist = i * xTickStep;
                    const tx = toCanvasX(xDist);
                    if ((tx > plotMarginL) ? (tx < width - plotMarginR) : false) {
                        ctx.beginPath();
                        ctx.moveTo(tx, height - plotMarginB);
                        ctx.lineTo(tx, height - plotMarginB + 4);
                        ctx.stroke();
                        ctx.fillText(xDist + "m", tx, height - plotMarginB + 14);
                    }
                }
                // Dynamic Y-axis ticks (height labels on left)
                ctx.textAlign = "right";
                const yTickStep = state.dynMaxY <= 100 ? 20 : state.dynMaxY <= 200 ? 40 : state.dynMaxY <= 400 ? 80 : state.dynMaxY <= 800 ? 150 : 300;
                const yTickCount = Math.floor(state.dynMaxY / yTickStep);
                for (let j = 1; j <= yTickCount; j++) {
                    const yDist = j * yTickStep;
                    const ty = toCanvasY(yDist);
                    if ((ty > plotMarginT) ? (ty < height - plotMarginB) : false) {
                        ctx.beginPath();
                        ctx.moveTo(plotMarginL - 4, ty);
                        ctx.lineTo(plotMarginL, ty);
                        ctx.stroke();
                        ctx.fillText(yDist + "m", plotMarginL - 6, ty + 3);
                    }
                }
                ctx.restore();
                // Draw Target Bullseye along ground
                const targetCx = toCanvasX(state.targetX);
                const targetCy = toCanvasY(0);
                ctx.save();
                ctx.strokeStyle = "#ef4444";
                ctx.lineWidth = 3;
                ctx.fillStyle = "rgba(239, 68, 68, 0.15)";
                ctx.beginPath();
                ctx.ellipse(targetCx, targetCy, 18, 6, 0, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                // Outer neon ring
                ctx.strokeStyle = "rgba(239, 68, 68, 0.4)";
                ctx.lineWidth = 1.5;
                ctx.beginPath();
                ctx.ellipse(targetCx, targetCy, 28, 9, 0, 0, Math.PI * 2);
                ctx.stroke();
                ctx.restore();
                // Physics update steps for running projectile
                if (state.isRunning) {
                    // Safety net: X scale expansion only if ball OVERSHOOTS the target
                    if (state.ball.x > state.dynMaxX * 0.92) {
                        state.dynMaxX = Math.max(state.dynMaxX * 1.4, state.ball.x * 1.3);
                    }
                    if (state.ball.y > state.dynMaxY * 0.88) {
                        state.dynMaxY = Math.max(state.dynMaxY * 1.4, state.ball.y * 1.3);
                    }
                    // Update state.ball with Euler equations over fractional delta-time steps
                    // To keep trajectory matching theoretical calculations, subdivide into smaller integration steps
                    const substeps = 5;
                    const subDt = dt / substeps;
                    const rho = 1.225;
                    const mass = 1.0;
                    const area = 0.01;
                    for (let s = 0; s < substeps; s++) {
                        state.simTime += subDt;
                        const speed = Math.sqrt(state.ball.vx * state.ball.vx + state.ball.vy * state.ball.vy);
                        const fDrag = 0.5 * state.dragCd * rho * area * speed * speed;
                        let ax = 0.0;
                        let ay = -state.gravity;
                        if (speed > 0.01) {
                            ax = -(fDrag * (state.ball.vx / speed)) / mass;
                            ay = -state.gravity - (fDrag * (state.ball.vy / speed)) / mass;
                        }
                        state.ball.x += state.ball.vx * subDt;
                        state.ball.y += state.ball.vy * subDt;
                        state.ball.vx += ax * subDt;
                        state.ball.vy += ay * subDt;
                        // Push history path
                        state.path.push({ x: state.ball.x, y: state.ball.y });
                        // Check terminal collision
                        if (state.ball.y <= 0.0) {
                            state.ball.y = 0.0;
                            state.isRunning = false;
                            // Check target hit
                            const error = Math.abs(state.ball.x - state.targetX);
                            if (error <= 12.0) {
                                state.isHit = true;
                                txtHitAlert.innerText = '표적 정밀 격파 명중! (HIT)';
                                txtHitAlert.style.color = '#10b981';
                            } else {
                                txtHitAlert.innerText = '포격 완료 (오차 ' + error.toFixed(1) + 'm)';
                                txtHitAlert.style.color = '#f59e0b';
                            }
                            break;
                        }
                    }
                    txtFlightTime.innerText = state.simTime.toFixed(2) + " s";
                    const ballSpeed = Math.sqrt(state.ball.vx * state.ball.vx + state.ball.vy * state.ball.vy);
                    txtLiveVel.innerText = ballSpeed.toFixed(2) + " m/s";
                }
                // C. Draw theoretical vacuum path (Dotted line)
                if (state.theoreticalPath.length > 1) {
                    ctx.save();
                    ctx.strokeStyle = "rgba(2, 132, 199, 0.25)";
                    ctx.lineWidth = 1.5;
                    ctx.setLineDash([3, 3]);
                    ctx.beginPath();
                    for (let i = 0; i < state.theoreticalPath.length; i++) {
                        const pt = state.theoreticalPath[i];
                        const cx = toCanvasX(pt.x);
                        const cy = toCanvasY(pt.y);
                        if (i === 0) {
                            ctx.moveTo(cx, cy);
                        } else {
                            ctx.lineTo(cx, cy);
                        }
                    }
                    ctx.stroke();
                    ctx.restore();
                }
                // D. Draw actual physical trajectory path
                if (state.path.length > 1) {
                    ctx.save();
                    ctx.strokeStyle = "#db2777";
                    ctx.lineWidth = 3;
                    ctx.shadowBlur = 6;
                    ctx.shadowColor = "#db2777";
                    ctx.beginPath();
                    for (let i = 0; i < state.path.length; i++) {
                        const pt = state.path[i];
                        if (i === 0) {
                            ctx.moveTo(toCanvasX(pt.x), toCanvasY(pt.y));
                        } else {
                            ctx.lineTo(toCanvasX(pt.x), toCanvasY(pt.y));
                        }
                    }
                    ctx.stroke();
                    ctx.restore();
                }
                // E. Draw Cannon Barrel at starting coordinates (0, height0)
                const cannonCx = toCanvasX(0);
                const cannonCy = toCanvasY(state.height0);
                const rad = (state.ang * Math.PI) / 180.0;
                // Visual angle accounts for different X/Y scale ratios
                // Physical angle: rad. But canvas scaleX ≠ scaleY so visual direction differs
                const vxDir = Math.cos(rad);
                const vyDir = Math.sin(rad);
                const visualRad = Math.atan2(vyDir * scaleY, vxDir * scaleX);
                ctx.save();
                ctx.translate(cannonCx, cannonCy);
                ctx.rotate(-visualRad); // negative since canvas Y grows downward
                // Draw barrel rectangle
                ctx.fillStyle = "#ffffff";
                ctx.strokeStyle = "#475569";
                ctx.lineWidth = 3;
                ctx.beginPath();
                ctx.rect(0, -6, 28, 12);
                ctx.fill();
                ctx.stroke();
                ctx.restore();
                // Draw Cannon base wheel
                ctx.save();
                ctx.fillStyle = "#e2e8f0";
                ctx.strokeStyle = "#334155";
                ctx.lineWidth = 2.5;
                ctx.beginPath();
                ctx.arc(cannonCx, cannonCy, 8, 0, Math.PI * 2);
                ctx.fill();
                ctx.stroke();
                ctx.restore();
                // F. Draw target hit animation circle if triggered
                if (state.isHit) {
                    ctx.save();
                    ctx.strokeStyle = "#10b981";
                    ctx.lineWidth = 4;
                    ctx.shadowBlur = 15;
                    ctx.shadowColor = "#10b981";
                    ctx.beginPath();
                    ctx.arc(targetCx, targetCy, 30 + Math.sin(currentTime * 0.01) * 5, 0, Math.PI * 2);
                    ctx.stroke();
                    ctx.fillStyle = "#10b981";
                    ctx.font = "bold 13px Outfit, sans-serif";
                    ctx.textAlign = "center";
                    ctx.fillText("HIT!", targetCx, targetCy - 20);
                    ctx.restore();
                }
                // G. Draw Projectile Ball &#038; Vector components arrow inside Canvas
                if (state.isRunning) {
                    const bx = toCanvasX(state.ball.x);
                    const by = toCanvasY(state.ball.y);
                    // Ball sphere
                    ctx.save();
                    ctx.fillStyle = "#0f172a";
                    ctx.beginPath();
                    ctx.arc(bx, by, 6, 0, Math.PI * 2);
                    ctx.fill();
                    // Velocity Vector lines
                    // Vx vector arrow (Horizontal) - Cyan
                    ctx.strokeStyle = "#0284c7";
                    ctx.lineWidth = 2;
                    ctx.beginPath();
                    ctx.moveTo(bx, by);
                    ctx.lineTo(bx + state.ball.vx * 0.8, by);
                    ctx.stroke();
                    // Vy vector arrow (Vertical) - Pink
                    ctx.strokeStyle = "#db2777";
                    ctx.lineWidth = 2;
                    ctx.beginPath();
                    ctx.moveTo(bx, by);
                    // Canvas Y grows down, so subtract
                    ctx.lineTo(bx, by - state.ball.vy * 0.8);
                    ctx.stroke();
                    ctx.restore();
                }
            }
            // Sync preset and run initial calculations
            loadPreset('ground');
            requestAnimationFrame(animate);
            // Right-click &#038; Keyboard shortcuts block
            document.addEventListener('contextmenu', function(e) {
                e.preventDefault();
                alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                return false;
            }, { capture: true });
            document.addEventListener('selectstart', function(e) {
                e.preventDefault();
                return false;
            }, { capture: true });
            document.addEventListener('keydown', function(e) {
                if (e.key === 'F12') {
                    e.preventDefault();
                    alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                    return false;
                }
                if (e.ctrlKey) {
                    if (e.key === 'u' || e.key === 'c' || e.key === 's' || e.key === 'U' || e.key === 'C' || e.key === 'S') {
                        e.preventDefault();
                        alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                        return false;
                    }
                    if (e.shiftKey) {
                        if (['i','I','j','J','c','C'].includes(e.key)) {
                            e.preventDefault();
                            alert("이 콘텐츠는 저작권법의 보호를 받습니다. 무단 복제 및 우클릭을 금지합니다.");
                            return false;
                        }
                    }
                }
            }, { capture: true });
        }
        let initAttempts = 0;
        function tryInit() {
            initAttempts++;
            initSimulator();
            if (!window.__projectile_initialized) {
                if (initAttempts < 50) {
                    setTimeout(tryInit, 100);
                }
            }
        }
        if (document.readyState === 'complete' || document.readyState === 'interactive') {
            tryInit();
        } else {
            document.addEventListener('DOMContentLoaded', tryInit);
            window.addEventListener('load', tryInit);
        }
        })();
</script>


<div style="background: linear-gradient(135deg, rgba(0,242,254,0.03), rgba(138,43,226,0.03)); border: 1px solid rgba(0,242,254,0.15); border-radius: 12px; padding: 18px 24px; margin: 25px auto 35px auto; font-size: 0.95em; color: #4b5563; line-height: 1.7; font-family: sans-serif;">
    <strong style="color: #1f2937; font-size: 1.05em; display: flex; align-items: center; gap: 8px;">
        <span style="font-size: 1.2em;"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /></span> 간편 사용 설명서
    </strong>
    <ol style="margin: 10px 0 0 0; padding-left: 20px;">
        <li style="margin-bottom: 6px;"><strong>초기 발사 조건 입력: 초기 탄속(m/s)과 대포 발사각(Degree), 기포 높이(m)를 설정합니다.</strong></li>
<li style="margin-bottom: 6px;">중력장 및 공기저항 선택: 지구(9.81m/s²), 화성(3.71m/s²), 달(1.62m/s²) 등 구동할 천체의 중력값과 공기 드래그 마찰계수(Cd)를 지정합니다.</li>
<li style="margin-bottom: 6px;">목표물 탄착 타겟 위치 배치: 화면 상에 배치된 적색 타깃의 위치를 고려하여 계산을 수행합니다.</li>
<li style="margin-bottom: 6px;">실시간 발사 및 벡터 모니터링: [발사!] 버튼을 눌러 발사체가 연성 궤적을 그리며 날아가는 상태와 꼭짓점 도달, 속도 벡터의 실시간 분해 화살표를 확인합니다.</li>
    </ol>
</div>


<details class="premium-seo-accordion" style="border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; background: #fbfbfc; padding: 0; margin: 30px auto; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01); font-family: sans-serif;">
    <summary style="display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; font-size: 1.1em; font-weight: 700; color: #1f2937; cursor: pointer; user-select: none; outline: none; list-style: none;">
        <span><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4da.png" alt="📚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> 상세 포사체 물리 운동 공식 및 궤적 수식 확인하기</span>
        <span class="accordion-arrow" style="font-size: 0.9em; color: #9ca3af; transition: transform 0.2s ease;">▼</span>
    </summary>
    <div style="padding: 0 24px 24px 24px; border-top: 1px solid rgba(0,0,0,0.04); background: #ffffff; border-radius: 0 0 12px 12px; font-size: 0.98em; color: #374151; line-height: 1.8;">
        <div style="margin-top: 20px;">
            <h3>1. 포물선 탄도 운동(Projectile Motion)의 물리적 기본 요소</h3>
<p>2차원 직교 좌표계 상에서 발사된 물체는 중력 가속도의 영향만을 받아 아래 방향으로 휘어지는 <strong>포물선(Parabolic)</strong>을 그리며 비행합니다. 이를 수평(X축) 성분과 수직(Y축) 성분으로 분리하여 모델링합니다.</p><ul><li><strong>수평(X) 방향 운동:</strong> 외력(공기저항 제외 시)이 작용하지 않으므로 등속 직선 운동을 유지합니다. <code>Vx = V0 &times; cos(&theta;)</code></li><li><strong>수직(Y) 방향 운동:</strong> 지구 중력 가속도(<code>g</code>)가 아랫방향으로 계속 작용하므로 연직 상방 등가속도 운동을 합니다. <code>Vy = V0 &times; sin(&theta;) - g &times; t</code></li></ul>
<h3>2. 낙하 비행 시간(T_flight) 및 도달 거리(R) 수식 관계식</h3>
<p>지표면으로부터 <code>H_0</code> 높이에서 발사된 포사체의 낙하 물리식은 다음과 같은 공식으로 유도됩니다.</p><p><strong>① 총 비행 시간 (Time of Flight, t_flight):</strong> 수직 높이 <code>Y(t) = 0</code>이 되는 시점을 2차 방정식의 근의 공식으로 구합니다.</p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">t_flight = [V_0 &times; sin&theta; + &radic;((V_0 &times; sin&theta;)^2 + 2 &times; g &times; H_0)] / g</p><p><strong>② 최대 도달 수평 거리 (Horizontal Range, R):</strong> 비행 시간 동안 등속 이송된 거리입니다.</p><p style="text-align: center; font-weight: bold; background: #e0f2fe; padding: 12px; border-radius: 8px; color: #0369a1;">R = V_0 &times; cos(&theta;) &times; t_flight &nbsp;[m]</p><p><strong>③ 궤도 정점의 최고 높이 (Peak Height, H_max):</strong> 수직 속도 <code>Vy = 0</code>이 되는 순간 도달한 높이입니다.</p><p style="text-align: center; font-weight: bold; background: #fee2e2; padding: 12px; border-radius: 8px; color: #991b1b;">H_max = H_0 + (V_0 &times; sin&theta;)^2 / (2 &times; g) &nbsp;[m]</p>
<h3>3. 공기 저항(Air Drag)을 고려한 물리 상태 모델</h3>
<p>실제 대기 상태에서는 공기 밀도와 발서체 형상에 따라 비속도에 비례하는 <strong>드래그 저항력(Drag Force)</strong>이 비행 궤적을 억누르게 됩니다. 시뮬레이션에서는 각 시간 스텝마다 아래의 외력을 동역학 방정식(Euler method)으로 연산하여 현실적인 궤적 축소를 반영합니다.</p><p style="text-align: center; font-weight: bold; background: #f3f4f6; padding: 12px; border-radius: 8px;">Fx_drag = -1/2 &times; Cd &times; &rho; &times; Vx &times; |V| &nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp; Fy_drag = -g - 1/2 &times; Cd &times; &rho; &times; Vy &times; |V|</p><p>이러한 저항이 작용하면 비행 곡선은 완벽한 대칭인 포물선을 벗어나 탄착 직전에 지면으로 가파르게 내리꽂히는 비대칭 탄도선 형태를 띠게 됩니다.</p>
        </div>
    </div>
</details>
<style>
details.premium-seo-accordion[open] summary .accordion-arrow { transform: rotate(180deg); color: #00f2fe; }
details.premium-seo-accordion summary::-webkit-details-marker { display: none; }
details.premium-seo-accordion:hover { border-color: rgba(0,242,254,0.3); }
</style>

]]></content:encoded>
					
					<wfw:commentRss>https://myengnote.com/projectile-motion-calculator-simulator/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
