How rodrigoyalibat/proyectofisicaii works
Project type and purpose
• This is a front-end web application (an educational simulator) built purely with HTML, CSS, and JavaScript.
• Its goal is to let students build resistive circuits in series or parallel, set resistor values and a voltage source, then compute and display equivalent resistance, current, voltage drops, and power.
File structure
• Top-level files only:
• index.html – the application’s single page (UI container)
• script.js – the logic: reading user input, modeling circuits, performing calculations, and updating the view
• README.md – project description and user instructions
• No backend or database—this is a static, client-side tool.
Key insights from the README
• Interactive drag/drop or click-to-add resistors
• Core features: adding resistors, defining values, voltage source, computing circuit parameters, graphical display
• Target audience: students, educational tool
Main components
a. Browser Environment
• HTML Renderer (index.html)
• CSS Styling Engine (style.css)
• JavaScript Engine (script.js)
b. JavaScript Modules (logical subdivisions within script.js)
1. UI Controller
– Listens for user actions: add resistor, change value, set voltage
– Updates input forms and buttons
2. Circuit Model
– Data structures representing nodes, resistors, connections
3. Calculation Engine
– Series/parallel resistance formulas
– Ohm’s law (I = V/R), power (P = VI)
4. Visualization Renderer
c. Data flow & interactions
• User → UI Controller → Circuit Model → Calculation Engine → Visualization Renderer → Browser viewport
• UI Controller also pulls data from HTML form elements and pushes updates back into the DOM
Architectural patterns & design principles
• Separation of concerns:
• Static assets (HTML/CSS) vs dynamic logic (JS)
• Within JS, divide into input handling, data modeling, computing, rendering
• Single-page application (SPA) pattern – all functionality lives in one HTML page
Detail without over-engineering
• Every logical piece even if it lives in one file.
• The goal is clarity on how user actions propagate through the system and produce the visual circuit and numerical results.