Neon Python Code Editor with Age Calculation

Loading...

Loading video...

Pro
0:00 / 0:00

Animation Specification: Python Code Editor with Neon Aesthetic

Animation Description and Purpose

The animation simulates a modern code editor environment where Python code is typed smoothly, followed by simulated user input and output display. The purpose is to demonstrate a simple Python program that calculates age based on user input, with a visually appealing neon aesthetic.

Mathematical Elements and Formulas

  • Age calculation: exttuoi=extnam_hien_taiextnam_sinhext{tuoi} = ext{nam\_hien\_tai} - ext{nam\_sinh}
  • Current year retrieval: extnam_hien_tai=extdatetime.date.today().yearext{nam\_hien\_tai} = ext{datetime.date.today().year}

Visual Elements

  1. Code Editor Window:

    • Background: Dark gray (#1E1E1E) with subtle grid lines for a modern editor feel.
    • Syntax Highlighting:
      • Keywords (import, input, int, print, def): Light blue (#569CD6)
      • Strings: Light green (#CE9178)
      • Variables: White (#D4D4D4)
      • Functions: Yellow (#DCDCAA)
    • Cursor: Blinking vertical line in neon blue (#00FFFF), visible during typing.
  2. Terminal Window:

    • Background: Dark black (#0A0A0A) with a slight glow effect.
    • Text: Neon green (#39FF14) for output, white (#FFFFFF) for input prompts.
    • Border: Thin neon blue (#00FFFF) outline.
  3. Neon Aesthetic Effects:

    • Subtle glow around the active line of code (neon blue, opacity 20%).
    • Light scanlines overlay for a retro-futuristic feel.
    • Soft ambient light effect emanating from the screen edges.

Animation Sequence and Timing

  1. Initial Setup (0s - 1s):

    • Fade in the code editor window from black.
    • Camera zooms slightly into the editor (1.2x) to focus attention.
  2. Code Typing (1s - 8s):

    • Each line of code appears smoothly with a typing animation:
      • import datetime (1s - 2s)
      • ten = input("Nhập tên của bạn: ") (2s - 4s)
      • nam_sinh = int(input("Nhập năm sinh: ")) (4s - 6s)
      • nam_hien_tai = datetime.date.today().year (6s - 7s)
      • tuoi = nam_hien_tai - nam_sinh (7s - 7.5s)
      • print(f"Xin chào {ten}, năm nay bạn {tuoi} tuổi.") (7.5s - 8s)
    • Typing speed: ~15 characters per second with natural pauses at line breaks.
  3. User Input Simulation (8s - 12s):

    • Terminal window slides up from the bottom (0.5s animation).
    • Input prompt Nhập tên của bạn: appears, followed by simulated typing of Minh (8.5s - 9.5s).
    • Second prompt Nhập năm sinh: appears, followed by simulated typing of 2000 (10s - 11s).
    • Terminal cursor blinks during input (neon green).
  4. Output Display (11s - 13s):

    • Terminal processes input (0.5s pause with blinking cursor).
    • Output Xin chao Minh, nam nay ban 26 tuoi. appears character by character (11.5s - 13s).
  5. Final Hold (13s - 15s):

    • Camera holds on the terminal output with a subtle zoom-out (1.05x) to emphasize the result.
    • Neon glow intensifies slightly around the terminal window.

Camera Angles and Perspectives

  • Primary view: Slightly angled top-down perspective (15° tilt) to simulate a natural screen viewing angle.
  • Depth effect: Subtle parallax between editor and terminal (terminal appears slightly closer to the viewer).
  • Focus: Sharp focus on active elements with mild blur on inactive areas.

Additional Details

  • Transitions: Smooth crossfades between major steps (typing → input → output).
  • Error Handling Visual: If invalid input were simulated, the terminal would show red error text, but this is not included in this animation.
  • Realism: Cursor blinking matches typical editor behavior (0.5s interval).
  • Neon Accents: Thin neon blue lines highlight:
    • Current line in editor
    • Terminal borders
    • Input/output areas

Text Display Rules

  • All terminal text has a semi-transparent black background (#000000 at 70% opacity) for readability.
  • Code editor text has no background (syntax highlighting provides contrast).
  • Font: Monospace (e.g., Fira Code) for both editor and terminal.

Duration Compliance

Total duration: 15 seconds (within the 30-second limit while fully expressing the intent).

Created By

Ha HiHa Hi

Description

A visually striking animation of a Python code editor with neon aesthetics, demonstrating a simple age calculation program. The animation includes smooth typing of code, simulated user input, and output display in a terminal window.

Created At

Jan 16, 2026, 08:51 AM

Tags

pythoncode-editorneon-aestheticage-calculation

Status

Completed
AI Model
DevStral 2512