<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by salma amirah on Medium]]></title>
        <description><![CDATA[Stories by salma amirah on Medium]]></description>
        <link>https://medium.com/@salmaamirah92?source=rss-9d14cdeb8804------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4bkaKEE0cd-l_L5N</url>
            <title>Stories by salma amirah on Medium</title>
            <link>https://medium.com/@salmaamirah92?source=rss-9d14cdeb8804------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:37:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salmaamirah92/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Prompts to Interactive Simulations: Exploring Vanilla JavaScript Through Spec-Driven…]]></title>
            <link>https://medium.com/@salmaamirah92/from-prompts-to-interactive-simulations-exploring-vanilla-javascript-through-spec-driven-4a9c0236b09e?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a9c0236b09e</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 17:23:18 GMT</pubDate>
            <atom:updated>2026-12-02T17:23:18.320Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Prompts to Interactive Simulations: Exploring Vanilla JavaScript Through Spec-Driven Development</h3><p>In today’s session, I explored how to transform written instructions into functional interactive applications using Vanilla JavaScript.</p><p>The learning material, presents seven examples of simple applications developed through a prompt-based approach. These examples demonstrate how JavaScript can dynamically create HTML elements, draw objects using Canvas and SVG, implement animations, and simulate physical phenomena.</p><p>What makes this approach interesting is that the development process does not begin with writing code immediately. Instead, it begins with describing what the application should do, identifying its required components, and translating those requirements into a working implementation.</p><p>This approach is closely related to <strong>Spec-Driven Development (SDD)</strong>, where specifications guide the development process.</p><h3>Understanding Spec-Driven Development</h3><p>Spec-Driven Development is an approach in which software development is guided by clearly defined requirements and specifications.</p><p>Rather than immediately focusing on implementation, developers first describe the expected behavior of an application. These specifications can include:</p><ul><li>Required interface elements.</li><li>Input parameters and user controls.</li><li>Expected application behavior.</li><li>Mathematical or physical models.</li><li>Output and visualization requirements.</li></ul><p>In the learning material, each application is described through a natural-language prompt. The prompt is then translated into JavaScript code using Vanilla JavaScript, without relying on external frameworks or libraries.</p><p>One important concept is the use of a parent &lt;div&gt; element, represented by the variable cnt. All application components are dynamically created and inserted into this container.</p><p>This makes it possible to develop applications as independent components that can be integrated into an existing HTML page.</p><h3>Practicing the Seven Application Prompts</h3><p>The material provides seven application examples. Each example demonstrates a different aspect of programming, modeling, and interactive visualization.</p><h3>Practice 1: Bouncing Ball Simulation</h3><p>The first prompt asks us to create a simple application containing a 200 × 200 pixel Canvas and a toggle button labeled “start” and “stop”.</p><p>A blue circle moves diagonally across the Canvas. Whenever it reaches the boundary, its direction changes, creating a bouncing effect.</p><p><strong>Implementation concept:</strong></p><ul><li>Create a Canvas using document.createElement(&quot;canvas&quot;).</li><li>Create a button to control the animation.</li><li>Use an object to store the circle’s position, radius, and velocity.</li><li>Update its position continuously.</li><li>Reverse the velocity when the circle reaches the Canvas boundaries.</li><li>Use requestAnimationFrame() to produce smooth animation.</li></ul><p>The movement can be represented by:</p><p>x(t + Δt) = x(t) + vx × Δt</p><p>y(t + Δt) = y(t) + vy × Δt</p><p>When the circle reaches a boundary, its velocity changes direction:</p><p>vx = -vx or vy = -vy</p><p>This exercise introduces coordinate systems, velocity, collision detection, and animation loops.</p><h3>Practice 2: Random Number Generator</h3><p>The second prompt asks us to create a text area and two buttons: “generate” and “clear”.</p><p>When the generate button is clicked, the application produces 100 random integers between 0 and 99. Every number must be displayed using two digits, including leading zeros.</p><p>For example:</p><p>09, 83, 05, 17, 42, ...</p><p><strong>Implementation concept:</strong></p><p>Generate a random integer using:</p><p>Math.floor(Math.random() * 100)</p><p>Then convert the number into a two-digit string:</p><p>String(randomNumber).padStart(2, &quot;0&quot;)</p><p>A loop repeats this process 100 times, while an array stores the generated values. The clear button simply resets the text area’s content.</p><p>This exercise introduces random data generation, loops, arrays, string formatting, and event listeners.</p><p>It also demonstrates how a simple application can function as a basic data generator.</p><h3>Practice 3: Traveling Sinusoidal Wave Simulation</h3><p>The third prompt involves a more mathematical application: a traveling wave simulator.</p><p>The application contains a Canvas, a text area for input parameters, and a start/stop button.</p><p>Users can modify four parameters:</p><ul><li>Amplitude (A)</li><li>Period (T)</li><li>Wavelength (λ)</li><li>Initial phase (φ)</li></ul><p>The wave is represented by the traveling sinusoidal wave equation:</p><p>y(x,t) = A sin(kx − ωt + φ)</p><p>where:</p><p>k = 2π/λ</p><p>and</p><p>ω = 2π/T</p><p>The JavaScript implementation calculates the vertical position of the wave for each horizontal coordinate on the Canvas.</p><p>By continuously updating the time variable, the application creates the appearance of a wave propagating horizontally.</p><p>This exercise connects mathematical equations with computational modeling and visualization.</p><p>It demonstrates how physical parameters can be converted into variables that users can manipulate interactively.</p><h3>Practice 4: Simple Pendulum Simulation</h3><p>The fourth prompt asks us to simulate a swinging pendulum.</p><p>The application includes a Canvas and a start/stop button. The pendulum bob is represented by a circle, and its color changes according to its angular velocity.</p><p>The simulation uses the small-angle approximation of simple harmonic motion.</p><p>The angular position can be expressed as:</p><p>θ(t) = θ₀ cos(ωt + φ)</p><p>where:</p><p>ω = √(g/L)</p><p>The angular velocity is:</p><p>ωangular(t) = -θ₀ω sin(ωt + φ)</p><p>The visualization uses two different colors to represent the pendulum’s motion:</p><ul><li>Blue: the bob is at its highest position, where velocity is approximately zero.</li><li>Red: the bob is at its lowest position, where velocity is at its maximum.</li></ul><p>The application also displays elapsed time and the number of completed oscillation periods.</p><p>This practice connects harmonic motion, angular displacement, angular velocity, and time-dependent physical modeling.</p><p>It also shows how a physical quantity can be represented through visual properties such as color.</p><h3>Practice 5: Water Level and Floating Object</h3><p>The fifth prompt introduces a two-dimensional water container and a floating box.</p><p>The application contains a Canvas and a vertical range slider. Moving the slider changes the water level, while the box automatically follows the water surface.</p><p>The water surface position can be calculated using:</p><p>waterY = y + height × (1 − waterLevel)</p><p>where waterLevel is expressed as a fraction between 0 and 1.</p><p>The box position is then determined by:</p><p>boxY = waterY − boxHeight</p><p>This exercise demonstrates the relationship between user input and dynamic visualization.</p><p>It also introduces coordinate transformations, geometric calculations, and event-driven rendering.</p><h3>Practice 6: Aquarium Physics Simulation</h3><p>The sixth prompt is more advanced because it combines several physical concepts into one application.</p><p>The application simulates a ball falling into an aquarium containing water.</p><p>Users can adjust:</p><ol><li>Initial vertical position of the ball.</li><li>Water level.</li><li>Ball density.</li></ol><p>The application also provides two buttons: “Release Ball” and “Reset”.</p><p>The simulation considers three important physical effects:</p><p><strong>a. Gravitational force</strong></p><p>Gravity causes the ball to accelerate downward.</p><p>Fg = mg</p><p><strong>b. Buoyant force</strong></p><p>According to Archimedes’ principle, the buoyant force depends on the volume of displaced water.</p><p>Fb = ρwater × g × Vdisplaced</p><p><strong>c. Viscous drag</strong></p><p>The ball experiences resistance when moving through water. In this simplified model, drag acts in the opposite direction of its velocity.</p><p>The net force is calculated as:</p><p>Fnet = Fg − Fb + Fdrag</p><p>Using Newton’s second law:</p><p>a = Fnet/m</p><p>The program calculates acceleration, updates velocity, and then updates the ball’s position.</p><p>The simulation also considers the fraction of the ball submerged in water, allowing buoyancy and drag to change as the ball enters the water.</p><p>This practice demonstrates how multiple physical models can be integrated into a single computational simulation.</p><p>It is particularly interesting because users can change the input parameters and observe how the system responds.</p><h3>Practice 7: Spring-Mass System Using SVG</h3><p>The seventh prompt introduces a spring-mass system using SVG instead of Canvas.</p><p>The application contains two primary visual elements:</p><ul><li>A circle representing the mass or bob.</li><li>A polyline representing the spring.</li></ul><p>The bob is attached to a fixed suspension point and moves under the influence of gravity, spring force, and damping.</p><p>The spring force follows Hooke’s law:</p><p>Fspring = −k(x − x₀)</p><p>where:</p><ul><li>k is the spring stiffness.</li><li>x is the current spring length.</li><li>x₀ is the natural spring length.</li></ul><p>The application also includes an interactive dragging feature. Users can move the bob freely in two dimensions and release it to observe its subsequent motion.</p><p>The numerical simulation calculates the acceleration, velocity, and position of the bob over time.</p><p>This exercise introduces SVG-based visualization, pointer events, interactive object manipulation, Hooke’s law, and numerical integration.</p><p>It also demonstrates that Canvas and SVG can be used for different visualization requirements.</p><h3>3. Comparing the Seven Practices</h3><p>The seven examples illustrate how different programming techniques can be applied to different modeling requirements.</p><p>PracticeMain conceptTechnologyBouncing ballCollision and velocityCanvasRandom generatorRandom data generationHTML + JavaScriptTraveling waveSinusoidal motionCanvasPendulumHarmonic oscillationCanvasFloating boxWater-level visualizationCanvasAquariumGravity, buoyancy, dragCanvasSpring-massHooke’s law and interactionSVG</p><p>Although these applications have different purposes, they share a similar development structure:</p><ol><li>Define the application requirements.</li><li>Identify the necessary HTML elements.</li><li>Define the variables and mathematical models.</li><li>Implement the application logic.</li><li>Connect user interactions through event listeners.</li><li>Render the results.</li><li>Test whether the application behaves as expected.</li></ol><p>This common structure is important because it can become the foundation of a reusable application development framework.</p><h3>4. My Point of View: From Programming Instructions to Computational Thinking</h3><p>In my opinion, the most valuable part of this learning session is not simply learning how to write JavaScript code, but understanding how to translate a problem into a computational model.</p><p>The seven examples demonstrate that programming is not limited to creating buttons, forms, or visual interfaces. It can also be used to represent real-world phenomena through mathematical equations and numerical calculations.</p><p>I found the traveling wave, pendulum, and aquarium simulations particularly interesting because they connect concepts from physics with interactive programming.</p><p>For example, in the traveling wave simulation, amplitude, period, wavelength, and phase are not merely mathematical symbols. They become adjustable parameters that directly influence the visualization.</p><p>Similarly, the aquarium simulation demonstrates how gravity, buoyancy, and viscosity can be translated into computational rules. By changing the ball density or water level, users can observe different behaviors without manually recalculating every equation.</p><p>Another important insight is that <strong>a good prompt is essentially a technical specification</strong>.</p><p>A vague instruction such as “create a pendulum simulation” is not sufficient to guarantee the expected result. A more effective prompt should specify the visual components, physical equations, input parameters, interaction mechanisms, and expected outputs.</p><p>However, generating code from a prompt does not automatically guarantee that the application is correct. The implementation still needs to be tested, especially when it involves numerical calculations and physical assumptions.</p><p>For example, the aquarium simulation uses simplified drag and buoyancy models. These models are useful for learning, but they should not automatically be interpreted as fully accurate representations of real fluid dynamics.</p><p>I also think that the use of Vanilla JavaScript is beneficial for understanding the fundamentals of web development. Without relying on external frameworks, we can directly observe how HTML elements are created, how events work, and how the rendering process is controlled.</p><h3>5. Further Development: Building a Reusable Framework</h3><p>The learning material also provides several development tasks for future exploration:</p><ul><li>Structure the existing prompts into separate parts and identify their required elements.</li><li>Integrate the elements into a reusable framework.</li><li>Test the framework with other application cases.</li><li>Document the limitations of the framework.</li></ul><p>I think these tasks are important steps toward making prompt-based application development more systematic.</p><p>Instead of writing every application from scratch, we could develop a reusable structure consisting of several modules:</p><p><strong>1. User Interface Module</strong></p><p>Responsible for creating Canvas, SVG, buttons, sliders, and text areas.</p><p><strong>2. Parameter Module</strong></p><p>Responsible for storing and managing simulation parameters.</p><p><strong>3. Physics or Mathematical Model Module</strong></p><p>Responsible for calculating position, velocity, acceleration, and other relevant quantities.</p><p><strong>4. Interaction Module</strong></p><p>Responsible for handling button clicks, slider changes, and pointer events.</p><p><strong>5. Rendering Module</strong></p><p>Responsible for displaying the simulation results.</p><p>With this structure, different simulations could reuse the same basic architecture while changing only their mathematical models and application-specific components.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a9c0236b09e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving Charged Particles in a Perpendicular Magnetic Field: Understanding Circular Motion Through…]]></title>
            <link>https://medium.com/@salmaamirah92/moving-charged-particles-in-a-perpendicular-magnetic-field-understanding-circular-motion-through-db159ac423ed?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/db159ac423ed</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 17:12:20 GMT</pubDate>
            <atom:updated>2026-12-02T17:12:20.681Z</atom:updated>
            <content:encoded><![CDATA[<h3>Moving Charged Particles in a Perpendicular Magnetic Field: Understanding Circular Motion Through Mathematics</h3><p>The motion of a charged particle in a magnetic field is one of the interesting applications of classical electromagnetism. When a charged particle enters a uniform magnetic field with an initial velocity perpendicular to the field, it experiences a magnetic force that continuously changes the direction of its velocity.</p><p>Interestingly, although the particle keeps changing direction, its speed remains constant. This happens because the magnetic force is always perpendicular to the particle’s velocity. As a result, the particle moves along a circular trajectory, known as <strong>uniform circular motion</strong>.</p><p>This phenomenon can be understood by combining Newton’s second law, the Lorentz force, and the mathematical representation of circular motion.</p><p>In this session, I will derive the velocity and acceleration components, determine the initial velocity conditions, and demonstrate mathematically and graphically why a charged particle follows a circular trajectory in a uniform magnetic field.</p><h3>Mathematical Model</h3><p>Consider a particle with mass <em>m</em> and electric charge <em>q</em> moving in a uniform magnetic field: <strong>B = B₀ k̂</strong></p><p>where B₀ represents the magnetic field strength and k̂ indicates that the magnetic field points in the positive z-direction.</p><p>The particle’s initial velocity must be perpendicular to the magnetic field:</p><p><strong>B · v₀ = 0</strong></p><p>The magnetic force acting on the particle is described by the Lorentz force:</p><p><strong>F = q(v × B)</strong></p><p>According to Newton’s second law:</p><p><strong>m a = q(v × B)</strong></p><p>Or, equivalently:</p><p><strong>m d²r/dt² = q(dr/dt × B)</strong></p><p>This equation describes how the magnetic field changes the particle’s direction of motion.</p><p>For a particle moving perpendicular to the magnetic field, its trajectory can be represented by the following parametric equations:</p><p><strong>x(t) = x_c + R cos(ωt + φ₀)</strong></p><p><strong>y(t) = y_c + R sin(ωt + φ₀)</strong></p><p>Where:</p><ul><li>x_c and y_c are the coordinates of the circle’s center.</li><li>R is the radius of the circular trajectory.</li><li>ω is the signed angular velocity.</li><li>φ₀ is the initial phase angle.</li><li>t is time.</li></ul><p>The sign of ω determines the direction of rotation.</p><h3>Deriving Velocity Components</h3><p>Velocity is defined as the first derivative of position with respect to time.</p><p>Starting with:</p><p>x(t) = x_c + R cos(ωt + φ₀)</p><p>Differentiating with respect to time:</p><p>v_x(t) = dx(t)/dt</p><p><strong>v_x(t) = -ωR sin(ωt + φ₀)</strong></p><p>Similarly, for the y-direction:</p><p>y(t) = y_c + R sin(ωt + φ₀)</p><p>Differentiating:</p><p>v_y(t) = dy(t)/dt</p><p><strong>v_y(t) = ωR cos(ωt + φ₀)</strong></p><p>Therefore, the velocity components are:</p><ul><li>v_x(t) = -ωR sin(ωt + φ₀)</li><li>v_y(t) = ωR cos(ωt + φ₀)</li></ul><p>The magnitude of the velocity can be calculated as:</p><p>v² = v_x² + v_y²</p><p>Substituting the equations:</p><p>v² = ω²R² sin²(ωt + φ₀) + ω²R² cos²(ωt + φ₀)</p><p>Using the trigonometric identity:</p><p>sin²θ + cos²θ = 1</p><p>We obtain:</p><p><strong>v = |ω|R = constant</strong></p><p>This result confirms that the particle moves at a constant speed, which is one of the main characteristics of uniform circular motion.</p><h3>Deriving Acceleration Components</h3><p>Acceleration is the derivative of velocity with respect to time.</p><p>For the x-direction:</p><p>a_x(t) = dv_x(t)/dt</p><p>Substituting the velocity equation:</p><p>a_x(t) = -ω²R cos(ωt + φ₀)</p><p>Since:</p><p>x(t) — x_c = R cos(ωt + φ₀)</p><p>We can rewrite the acceleration as:</p><p><strong>a_x(t) = -ω²[x(t) — x_c]</strong></p><p>For the y-direction:</p><p>a_y(t) = dv_y(t)/dt</p><p>Therefore:</p><p>a_y(t) = -ω²R sin(ωt + φ₀)</p><p>Since:</p><p>y(t) — y_c = R sin(ωt + φ₀)</p><p>We obtain:</p><p><strong>a_y(t) = -ω²[y(t) — y_c]</strong></p><p>The acceleration components are therefore:</p><ul><li>a_x(t) = -ω²R cos(ωt + φ₀)</li><li>a_y(t) = -ω²R sin(ωt + φ₀)</li></ul><p>The acceleration magnitude becomes:</p><p>a = √(a_x² + a_y²)</p><p><strong>a = ω²R = constant</strong></p><p>The negative signs indicate that acceleration always points toward the center of the circular trajectory.</p><p>This is known as centripetal acceleration.</p><h3>Determining the Initial Velocity</h3><p>The initial condition provided in the problem is:</p><p>B · v₀ = 0</p><p>Given:</p><p>B = (0, 0, B₀)</p><p>Let the initial velocity be:</p><p><strong>v₀ = (u, w, s)</strong></p><p>The dot product becomes:</p><p>B · v₀ = B₀s = 0</p><p>Since B₀ is nonzero:</p><p><strong>s = 0</strong></p><p>Therefore, the general initial velocity that satisfies the condition is:</p><p><strong>v₀ = (u, w, 0)</strong></p><p>where u and w can be any real numbers.</p><p>This means the initial velocity can have arbitrary x and y components, provided that there is no initial velocity component in the z-direction.</p><p>The initial speed is:</p><p>v₀ = √(u² + w²)</p><p>From the circular motion relationship:</p><p>v = |ω|R</p><p>The radius can be expressed as:</p><p><strong>R = v₀/|ω|</strong></p><p>From the Lorentz force equation, the magnitude of the cyclotron angular frequency is:</p><p>|ω| = |q|B₀/m</p><p>Thus:</p><p><strong>R = mv₀/(|q|B₀)</strong></p><p>This equation shows that the radius depends on the particle’s mass, initial speed, electric charge, and magnetic field strength.</p><p>A larger initial speed or mass produces a larger circular radius, while a stronger magnetic field or larger charge magnitude produces a smaller radius.</p><h3>Graphical Demonstration of the Circular Trajectory</h3><p>To visualize the particle’s motion, consider the following parameters:</p><p>Circle center = x_c2 m, Circle center = y_c3 m, Radius = R0.5 m, Angular velocity = ωπ rad/s, Initial phase = φ₀π/2 rad, Period = T2 s</p><p>The angular velocity is related to the period by:</p><p>ω = 2π/T</p><p>For T = 2 seconds:</p><p>ω = 2π/2 = π rad/s</p><p>The position equations become:</p><p>x(t) = 2 + 0.5 cos(πt + π/2)</p><p>y(t) = 3 + 0.5 sin(πt + π/2)</p><p>By evaluating these equations over time, we obtain a series of particle positions.</p><p>The resulting trajectory is a circle centered at (2, 3), with a radius of 0.5 meters. The particle completes one full revolution every 2 seconds.</p><h3>Mathematical Proof of the Circular Trajectory</h3><p>To demonstrate mathematically that the parametric equations form a circle, start with:</p><p>x(t) = x_c + R cos(ωt + φ₀)</p><p>Rearranging:</p><p>x(t) — x_c = R cos(ωt + φ₀)</p><p>Similarly:</p><p>y(t) — y_c = R sin(ωt + φ₀)</p><p>Dividing both equations by R and squaring:</p><p>[(x — x_c)/R]² = cos²(ωt + φ₀)</p><p>[(y — y_c)/R]² = sin²(ωt + φ₀)</p><p>Adding both equations:</p><p>[(x — x_c)/R]² + [(y — y_c)/R]² = cos²(ωt + φ₀) + sin²(ωt + φ₀)</p><p>Using the trigonometric identity:</p><p>cos²θ + sin²θ = 1</p><p>We obtain:</p><p>[(x — x_c)/R]² + [(y — y_c)/R]² = 1</p><p>Multiplying both sides by R²:</p><p><strong>(x — x_c)² + (y — y_c)² = R²</strong></p><p>This is the standard equation of a circle.</p><p>Therefore, the parametric equations indeed describe a circular trajectory with center (x_c, y_c) and radius R.</p><h3>Verifying the Parametric Equations as a Solution of the Equation of Motion</h3><p>The equation of motion for a charged particle in a uniform magnetic field is:</p><p>m a = q(v × B)</p><p>Equivalently:</p><p><strong>m a + q(B × v) = 0</strong></p><p>For:</p><p>B = (0, 0, B₀)</p><p>and:</p><p>v = (-ωR sin θ, ωR cos θ, 0)</p><p>where θ = ωt + φ₀, the cross product becomes:</p><p>B × v = (-B₀ωR cos θ, -B₀ωR sin θ, 0)</p><p>Meanwhile, the acceleration is:</p><p>a = (-ω²R cos θ, -ω²R sin θ, 0)</p><p>Substituting into the equation of motion:</p><p>m a + q(B × v) = 0</p><p>For the x-component:</p><p>-mω²R cos θ — qB₀ωR cos θ = 0</p><p>For the y-component:</p><p>-mω²R sin θ — qB₀ωR sin θ = 0</p><p>Both equations can be simplified into:</p><p>ω(mω + qB₀) = 0</p><p>For nonzero angular velocity:</p><p><strong>ω = -qB₀/m</strong></p><p>This is the signed cyclotron angular velocity.</p><p>Consequently, the parametric equations satisfy the equation of motion when the angular velocity has the appropriate magnitude and direction determined by the particle’s charge and magnetic field.</p><p>The negative sign indicates the rotation direction for a positive charge moving in a magnetic field directed along the positive z-axis.</p><p>Thus, the proposed parametric equations are valid solutions of the equation of motion.</p><p>From this analysis, I find that the most interesting aspect of charged-particle motion in a magnetic field is how a relatively simple force law produces a well-defined circular trajectory.</p><p>At first, it might seem that a particle moving under a continuous force should increase or decrease its speed. However, the magnetic force acts perpendicular to the velocity, meaning that it changes only the direction of motion rather than its magnitude.</p><p>In my opinion, this topic demonstrates why mathematical modeling is important in physics. Instead of relying only on a visual understanding of circular motion, we can derive the trajectory from differential equations and verify the result using mathematical identities.</p><p>I also find the relationship between the radius and the magnetic field particularly interesting. The equation R = mv₀/(|q|B₀) shows that changing the magnetic field strength directly changes the size of the particle’s orbit.</p><p>This principle is not merely theoretical. It is relevant to practical applications such as cyclotrons, mass spectrometers, and charged-particle confinement systems.</p><p>Another important insight is that the direction of rotation depends on the sign of the particle’s charge. Consequently, particles with opposite charges rotate in opposite directions under the same magnetic field.</p><p>Overall, this exercise helped me understand how vector analysis, differential equations, and parametric functions can be combined to explain a physical phenomenon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db159ac423ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Mathematical Equations to Visual Simulations: Exploring Motion with JavaScript]]></title>
            <link>https://medium.com/@salmaamirah92/from-mathematical-equations-to-visual-simulations-exploring-motion-with-javascript-483ce1b3efea?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/483ce1b3efea</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 16:58:11 GMT</pubDate>
            <atom:updated>2026-12-02T16:58:11.898Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s session focused on generating numerical data using JavaScript and visualizing the results with Chart.js. One of its examples is parabolic motion, which is used to understand the relationship between horizontal position, vertical position, and time. Also explores how differential equations can describe different types of physical motion, including parabolic motion, harmonic motion, and circular motion.</p><p>Through these materials, I learned how mathematical models can be translated into numerical data, visualized through graphs, and interpreted to understand physical phenomena.</p><h3>Understanding Parabolic Motion Through Mathematical Modeling</h3><p>Parabolic motion occurs when an object moves under constant acceleration, such as an object thrown into the air under the influence of Earth’s gravity.</p><p>According to Newton’s Second Law: <strong>ΣF = ma</strong></p><p>For an ideal projectile without air resistance, the horizontal acceleration is zero, while the vertical acceleration is caused by gravity:</p><p><strong>aₓ = 0 </strong>and <strong>aᵧ = −g</strong></p><p>To construct a mathematical model, we begin with the general acceleration equation:</p><p><strong>a = dv/dt</strong></p><p>By integrating acceleration with respect to time, we obtain the velocity equation:</p><p><strong>v(t) = v₀ + at</strong></p><p>Integrating velocity gives the position equation:</p><p><strong>r(t) = r₀ + v₀t + ½at²</strong></p><p>Therefore, the horizontal position is:</p><p><strong>x(t) = x₀ + v₀ₓt + ½aₓt²</strong></p><p>And the vertical position is:</p><p><strong>y(t) = y₀ + v₀ᵧt + ½aᵧt²</strong></p><p>These equations describe the position of an object at any given time based on its initial position, initial velocity, and acceleration.</p><p>To obtain the relationship between horizontal and vertical positions, we eliminate time from the two equations.</p><p>For the special case of zero horizontal acceleration:</p><p><strong>x(t) = x₀ + v₀ₓt</strong></p><p>Rearranging the equation:</p><p><strong>t = (x − x₀) / v₀ₓ</strong></p><p>Substituting this expression into the vertical-position equation:</p><p><strong>y(x) = y₀ + v₀ᵧ[(x − x₀)/v₀ₓ] + ½aᵧ[(x − x₀)/v₀ₓ]²</strong></p><p>Simplifying:</p><p><strong>y(x) = y₀ + (v₀ᵧ/v₀ₓ)(x − x₀) + [aᵧ/(2v₀ₓ²)](x − x₀)²</strong></p><p>This equation represents a quadratic relationship between horizontal and vertical positions. Consequently, the trajectory forms a parabola.</p><p>This explicit trajectory equation assumes aₓ = 0 and v₀ₓ ≠ 0. When horizontal acceleration is nonzero, the trajectory can instead be analyzed parametrically using x(t) and y(t).</p><h3>2. Generating Numerical Data Using JavaScript</h3><p>After obtaining the mathematical equations, the next step is to generate numerical data.</p><p><strong>Horizontal position:</strong></p><p>x(t) = 20t</p><p><strong>Vertical position:</strong></p><p>y(t) = 40t − 5t²</p><p><strong>Trajectory equation:</strong></p><p>y(x) = 2x − x²/80</p><p>The simulation uses 17 data points, starting from t = 0 seconds and ending at t = 8 seconds.</p><h3>Results and visualization</h3><p>After generating the numerical data, I created three scatter plots to represent different aspects of the projectile’s motion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*6lPmjAiM6hSPKT5aqNomSg.png" /><figcaption><strong>Figure 1. Horizontal Position versus Time (data x-t)</strong></figcaption></figure><p>The first graph shows the relationship between horizontal position and time.</p><p>The result is a straight line because horizontal acceleration is zero. The horizontal velocity remains constant throughout the motion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*_ErAQx06Bcaf8ljvOh7FgQ.png" /><figcaption><strong>Figure 2. Vertical Position versus Time (data y-t)</strong></figcaption></figure><p>The second graph shows the relationship between vertical position and time.</p><p>Unlike the first graph, this graph forms a downward-opening parabola because the object experiences constant downward acceleration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*xtpl4_Xy6S84EG9B4adVjg.png" /><figcaption><strong>Figure 2. Vertical Position versus Time (data y-t)</strong></figcaption></figure><p>The third graph represents the actual spatial trajectory of the object.</p><p>The graph shows a parabolic trajectory, with a maximum height of 80 meters at a horizontal position of 80 meters.</p><p>This graph is particularly useful because it represents the path followed by the object without explicitly showing time.</p><p>Although all three graphs represent the same physical system, each graph provides different information.</p><p>The first two graphs describe how the object’s position changes over time. The third graph describes the relationship between horizontal and vertical positions.</p><p>By combining these graphs, we can understand both the temporal behavior and spatial trajectory of the projectile.</p><h3>Exploring Differential Equations and Physical Trajectories</h3><p>The second material introduces differential equations as a mathematical framework for describing physical motion.</p><p>In classical mechanics, Newton’s Second Law can be expressed in vector form: <strong>m(d²r/dt²) = F</strong></p><p>The resulting trajectory depends on the force acting on the object and its initial conditions.</p><h3>Parabolic motion: When does it become linear motion?</h3><p>The first differential equation is:</p><p><strong>m(d²r/dt²) − w = 0</strong></p><p>where: <strong>w = mg</strong></p><p>Dividing by mass:</p><p><strong>d²r/dt² = g</strong></p><p>Integrating twice gives:</p><p><strong>r(t) = r₀ + v₀t + ½gt²</strong></p><p>This equation generally produces parabolic motion.</p><p>The trajectory becomes linear when the initial velocity and acceleration are parallel or antiparallel.</p><p>Mathematically:</p><p><strong>v₀ × g = 0</strong></p><p>For example, when an object is thrown vertically upward or downward, its initial velocity is parallel to gravitational acceleration. There is no horizontal displacement, so the trajectory remains along one straight vertical line.</p><p>Thus, linear motion occurs when the initial velocity has no component perpendicular to the acceleration direction.</p><h3>Harmonic motion: One-dimensional and two-dimensional trajectories</h3><p>The second equation presented in the material is:</p><p><strong>m(d²r/dt²) − kr = 0</strong></p><p>There is an important sign consideration in this equation.</p><p>For a restoring force directed toward the equilibrium position, the conventional simple harmonic oscillator equation is:</p><p><strong>m(d²r/dt²) + kr = 0</strong></p><p>where k is positive.</p><p>Dividing by mass:</p><p><strong>d²r/dt² + ω²r = 0</strong></p><p>where:</p><p><strong>ω = √(k/m)</strong></p><p>The general solution is:</p><p><strong>r(t) = r₀ cos(ωt) + (v₀/ω) sin(ωt)</strong></p><p>Consider an object initially positioned along the X-axis.</p><p>If both the initial position and initial velocity are along the X-axis, the object only moves along that axis.</p><p>Its motion is one-dimensional simple harmonic motion:</p><p><strong>x(t) = A cos(ωt + φ)</strong></p><p><strong>y(t) = 0</strong></p><p>However, if the initial velocity also has a component in the Y-direction, the object moves in two dimensions.</p><p>For example:</p><p><strong>x(t) = A cos(ωt)</strong></p><p><strong>y(t) = B sin(ωt)</strong></p><p>Combining both equations:</p><p><strong>x²/A² + y²/B² = 1</strong></p><p>This represents an elliptical trajectory.</p><p>The radial distance from the origin is:</p><p><strong>r(t) = √[A²cos²(ωt) + B²sin²(ωt)]</strong></p><p>When A ≠ B, the radial distance oscillates during the motion. When A = B, the trajectory becomes a circle with constant radius.</p><p>Therefore, depending on the initial conditions, the system can produce one-dimensional harmonic motion, elliptical motion, or circular motion.</p><h3>Circular motion and helical motion</h3><p>The third differential equation is:</p><p><strong>m(d²r/dt²) + q(B × dr/dt) = 0</strong></p><p>This equation describes a charged particle moving in a uniform magnetic field.</p><p>The magnetic force is perpendicular to the velocity component perpendicular to the magnetic field.</p><p>To understand the resulting trajectory, the initial velocity can be divided into two components:</p><p><strong>v₀ = v⊥ + v∥</strong></p><p>Where:</p><ul><li>v⊥ is perpendicular to the magnetic field.</li><li>v∥ is parallel to the magnetic field.</li></ul><p>When:</p><p><strong>v₀ · B = 0</strong></p><p>The initial velocity is entirely perpendicular to the magnetic field.</p><p>The magnetic force continuously changes the direction of the velocity while maintaining its magnitude. As a result, the particle follows a circular trajectory.</p><p>The cyclotron angular frequency is:</p><p><strong>ωc = |q|B/m</strong></p><p>The radius of the circular trajectory is:</p><p><strong>r = mv⊥/(|q|B)</strong></p><p>However, when:</p><p><strong>v₀ · B ≠ 0</strong></p><p>The particle has both perpendicular and parallel velocity components.</p><p>The perpendicular component produces circular motion, while the parallel component produces constant motion along the magnetic field.</p><p>Combining these motions creates a helical trajectory.</p><p>The pitch of the helix, which represents the distance traveled along the magnetic field during one revolution, is:</p><p><strong>p = 2πv∥/ωc</strong></p><p>This demonstrates how the direction of the initial velocity relative to the magnetic field determines whether the particle follows a circular or helical trajectory.</p><p>From my perspective, the most interesting part of this session is the connection between mathematical equations, numerical data generation, and graphical visualization.</p><p>Mathematical equations provide a theoretical description of physical phenomena. However, understanding the behavior of a system becomes easier when the equations are translated into numerical data and visual representations.</p><p>Similarly, the vertical-position graph shows how the object initially moves upward, reaches its maximum height, and then moves downward. The trajectory graph provides another perspective by showing the complete path of the object.</p><p>I also realized that generating numerical data is not simply about calculating values. The way we organize and visualize the data determines how easily we can interpret the underlying physical phenomenon.</p><p>Another important lesson is the role of initial conditions in differential equations. The same mathematical model can produce different trajectories depending on the initial position and velocity of the object.</p><p>This is particularly interesting in harmonic and circular motion. A small change in the direction of the initial velocity can change the resulting trajectory from one-dimensional motion into an elliptical or helical path.</p><p>In my opinion, computational modeling is valuable because it allows us to experiment with mathematical models without having to conduct a physical experiment every time. We can change parameters, generate new data, and observe how the system responds.</p><p>However, visualization alone is not sufficient. The mathematical assumptions and equations must still be understood and verified. A simulation can produce a convincing graph even when its underlying mathematical model contains an error.</p><p>In the future, I would like to develop more interactive simulations where users can modify initial velocity, acceleration, and other physical parameters to observe their effects directly.</p><p>I believe this approach would make mathematical and physical concepts easier to understand while also improving programming and analytical skills.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=483ce1b3efea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Circular Motion and Large-Angle Pendulum Through JavaScript]]></title>
            <link>https://medium.com/@salmaamirah92/exploring-circular-motion-and-large-angle-pendulum-through-javascript-fdd83f068d7d?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdd83f068d7d</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 14:52:51 GMT</pubDate>
            <atom:updated>2026-10-22T14:52:51.819Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s session focused on two topics in classical mechanics: <strong>uniform circular motion</strong> and <strong>large-angle pendulum motion</strong>. These topics helped me understand how mathematical equations describe physical systems and how computational methods can be used to visualize their behavior.</p><p>The first topic explains how an object can move along a circular path at constant speed while continuously changing its direction. The second explores the limitations of the small-angle approximation by comparing a theoretical pendulum model with a numerical simulation.</p><p>What made this session particularly interesting was the opportunity to investigate the pendulum’s behavior by changing its initial angular amplitude and observing how the resulting curves differed.</p><h3>1. Uniform Circular Motion</h3><p>Uniform circular motion occurs when an object travels along a circular path at constant speed. Although the magnitude of its velocity remains constant, its direction changes continuously. Therefore, the object experiences centripetal acceleration directed toward the center of the circle.</p><p>The centripetal acceleration is given by</p><p><em>a_c = v² / R = ω²R</em></p><p>According to Newton’s second law, the net centripetal force is</p><p><em>F_c = mv² / R</em></p><p>where <em>m</em> is the mass, <em>v</em> is the speed, <em>R</em> is the radius of the circular path, and <em>ω</em> is the angular velocity.</p><p>The position of an object moving in a circle can be described using</p><p><em>x(t) = R cos(ωt + φ₀)</em></p><p><em>y(t) = R sin(ωt + φ₀)</em></p><p>These equations allow us to calculate the object’s position at any time and generate a circular trajectory through computational modeling.</p><h3>Five Examples of Uniform Circular Motion</h3><p>I identified five physical examples that demonstrate how different forces can produce circular motion.</p><ol><li><strong>A stone tied to a string:</strong> The tension in the string provides the inward force needed to maintain the circular trajectory.</li><li><strong>A car turning on a flat road:</strong> Static friction between the tires and the road provides the centripetal force.</li><li><strong>The Moon orbiting Earth:</strong> Gravity provides the inward force that maintains the Moon’s orbital motion.</li><li><strong>A rotating fan blade:</strong> Mechanical forces transmitted through the blade produce the net inward force required for rotation.</li><li><strong>A charged particle moving perpendicular to a magnetic field:</strong> The magnetic Lorentz force can produce circular motion when the particle’s velocity is perpendicular to the field.</li></ol><p>These examples demonstrate that centripetal force is not a separate fundamental force. Instead, it describes the role of the net force directed toward the center of a circular path.</p><h3>2. Large-Angle Pendulum</h3><p>The second topic focuses on the motion of a pendulum when its initial angular displacement is large.</p><p>For an ideal pendulum of length <em>R</em>, the equation of motion is</p><p><em>d²θ/dt² = −(g / R) sin(θ)</em></p><p>where <em>θ</em> is the angular displacement and <em>g</em> is gravitational acceleration.</p><p>This equation is nonlinear because the restoring acceleration depends on <em>sin(θ)</em>.</p><p>For small angles measured in radians, we can approximate</p><p><em>sin(θ) ≈ θ</em></p><p>The equation then becomes</p><p><em>d²θ/dt² = −(g / R) θ</em></p><p>This simplified equation describes simple harmonic motion, with the theoretical solution</p><p><em>θ(t) = A cos(ω₀t)</em></p><p>where</p><p><em>ω₀ = √(g / R)</em></p><p>The small-angle approximation makes the equation easier to solve. However, its accuracy decreases as the initial angular displacement increases.</p><h3>3. Simulation Method and Experimental Setup</h3><p>To investigate this behavior, I ran a numerical simulation based on the nonlinear pendulum equation and compared it with the theoretical small-angle solution.</p><p>The simulation used the following parameters:</p><p>ParameterValueGravitational acceleration, (g)9.81 m/s²Pendulum length, (R)0.248 mTime step, (\Delta t)0.001 sSimulation duration4 sObservation interval0.05 sInitial angular velocity0 rad/s</p><p>The initial angular amplitude was controlled by the parameter a:</p><p>[<br>A=a\pi<br>]</p><p>I tested ten values of a, from 0.1 to 0.99. For each value, I calculated the theoretical and numerical angular displacements over four seconds.</p><p>The numerical solution used Euler’s method:</p><p><em>ω_new = ω_old − (g / R) sin(θ_old) Δt</em></p><p><em>θ_new = θ_old + ω_new Δt</em></p><p>This metric measures the greatest angular separation between the two curves during the simulation. It is not a percentage error or a direct measurement of the period error.</p><h3>4. Simulation Results</h3><p>The following table summarizes the results obtained from the ten simulations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*PDrcoZPiI-p_GIi8fi91ww.png" /><figcaption>Table 1. Maximum absolute angular difference between the theoretical small-angle solution and the numerical solution over the 4-second simulation.</figcaption></figure><p>The results show a clear increasing trend in the maximum angular difference as the initial amplitude increases.</p><p>At a = 0.1, corresponding to an initial angle of 18°, the maximum difference is only 0.0447 rad. At a = 0.99, corresponding to 178.2°, the difference reaches 6.2193 rad.</p><p>This indicates that the theoretical and numerical curves become increasingly different over the four-second simulation as the initial angular amplitude increases.</p><h3>Comparing Small and Large Initial Angles</h3><p><strong>Small initial amplitude</strong></p><p>At a = 0.1, the initial angle is 18°. The two curves remain relatively close compared with the larger-amplitude cases, although they do not overlap perfectly. Even at this angle, the small-angle approximation introduces some error.</p><p>At a = 0.2, the maximum difference increases to 0.3635 rad. This shows that the difference between the nonlinear and simplified models becomes more noticeable as the initial displacement increases.</p><p><strong>Intermediate initial amplitude</strong></p><p>For values between a = 0.3 and a = 0.7, the maximum difference rises from 1.1741 rad to 4.3105 rad.</p><p>This behavior is consistent with the limitations of the small-angle approximation. The actual nonlinear pendulum has a longer period at larger amplitudes than predicted by the simple harmonic model. Consequently, the two solutions progressively move out of phase.</p><p><strong>Large initial amplitude</strong></p><p>At a = 0.8, a = 0.9, and a = 0.99, the maximum differences are 4.8100 rad, 5.6474 rad, and 6.2193 rad, respectively.</p><p>The largest difference occurs at a = 0.99, where the initial angular displacement is 178.2°. At this amplitude, the pendulum begins very close to the upright position, and the small-angle approximation is clearly unsuitable.</p><p>These results demonstrate why the nonlinear equation is necessary for describing pendulum motion at large angular displacements.</p><h3>Important Consideration About Numerical Error</h3><p>Although the increasing difference is consistent with the expected nonlinear behavior, it is important to distinguish model error from numerical integration error.</p><p>The theoretical curve assumes simple harmonic motion, whereas the numerical curve uses the nonlinear sine term. In addition, Euler’s method introduces discretization error that can accumulate over time.</p><p>Therefore, the maximum angular difference reflects both the difference between the physical models and the numerical error of the integration method.</p><p>A more complete investigation could compare different time steps or use a higher-order numerical method, such as the fourth-order Runge–Kutta method, to evaluate the influence of numerical accuracy.</p><h3>5. My Point of View</h3><p>In my opinion, the most valuable lesson from this session is that <strong>the accuracy of a mathematical model depends on the assumptions behind it</strong>.</p><p>The uniform circular motion topic shows how equations can describe a predictable trajectory and explain the relationship between velocity, acceleration, and force. It also demonstrates that different physical forces can produce similar motion when their resultant direction is appropriate.</p><p>The pendulum simulation provides a more direct example of the limitations of simplified models. By changing only one parameter, I observed that the maximum difference between the theoretical and numerical curves increased substantially.</p><p>The maximum angular difference rose from 0.0447 rad at a = 0.1 to 6.2193 rad at a = 0.99. This quantitative result makes the limitations of the small-angle approximation more apparent than simply reading the equation.</p><p>I also learned that a simulation should not automatically be considered accurate just because it produces a graph. Numerical methods have limitations, and their results should be evaluated against theoretical predictions or more accurate numerical solutions.</p><p>If I continued this investigation, I would calculate the period of each numerical oscillation and compare it directly with the theoretical small-angle period. I would also investigate how reducing the time step affects the results.</p><p>These additional analyses would help separate the effects of the nonlinear physical model from the errors introduced by the numerical method.</p><h3>Simulation Data</h3><p>The numerical results used in this article were generated by running the pendulum equations for ten initial amplitudes over a four-second interval. The simulation table and the graph for a = 0.99 can be retained as supporting material for the analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVgbr8Fslqow3aVSVEfYqg.png" /><figcaption>Figure 1. Comparison between the theoretical small-angle solution and the numerical Euler solution for a pendulum with an initial amplitude of a = 0.99.</figcaption></figure><h3>Supplementary Materials</h3><p>The complete numerical results for all ten initial amplitudes are available in the following dataset:</p><ul><li><strong>Simulation results (CSV):</strong> <a href="https://drive.google.com/file/d/1JkOh6JPx1T9IJO-vXacy8PZRPQ-N1Id3/view?usp=drivesdk">https://drive.google.com/file/d/1JkOh6JPx1T9IJO-vXacy8PZRPQ-N1Id3/view?usp=drivesdk</a></li><li><strong>Example simulation graph (a = 0.99):</strong> See Figure 1 above.</li></ul><p>The dataset contains the initial amplitude, initial angular displacement, maximum angular difference, and final angular positions for the theoretical and numerical solutions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdd83f068d7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Interactive Applications with JavaScript: From Random Data to Animation]]></title>
            <link>https://medium.com/@salmaamirah92/exploring-interactive-applications-with-javascript-from-random-data-to-animation-60e4a032aba3?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/60e4a032aba3</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 18:19:50 GMT</pubDate>
            <atom:updated>2026-10-21T18:19:50.565Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s session introduced me to new ways of using JavaScript to create interactive visual applications. I explored how JavaScript can be used not only to process data but also to visualize information and create dynamic interactions on a web page.</p><p>What I found interesting about this session was the connection between programming logic and visual results. Instead of simply writing code and looking at the output in a console, I learned how JavaScript can transform generated data into visual objects that users can interact with directly.</p><h3>Understanding the Main Concepts</h3><p>One of the main topics covered in this session was the use of JavaScript libraries to simplify application development. The examples introduced the endap.js library, particularly its Console, RandNum, and Tensor1D modules.</p><p>The RandNum module allows us to generate random numbers, while Tensor1D helps create and manage one-dimensional arrays of data. Meanwhile, the Console module provides a way to display information generated by the program. These components can work together to generate data, organize it, and display the results.</p><p>I also learned how to use the HTML Canvas element to visualize data. By combining coordinates, randomly generated values, and graphical properties such as radius and color, JavaScript can draw objects directly on a web page.</p><p>For example, a program can generate several circles at different positions, assign them different sizes and colors, and display them on a canvas. Although this example may appear simple, it demonstrates an important principle: data can be translated into visual representations that are easier to understand.</p><h3>Making Applications Interactive</h3><p>Another interesting aspect of today’s session was learning how to make visualizations interactive. The examples demonstrated how buttons could control what appears on the canvas.</p><p>With a <em>step</em> button, the program can display one object at a time. The <em>next</em> and <em>previous</em> buttons allow users to navigate between objects, while a <em>start</em> and <em>stop</em> button can control an animation that updates automatically.</p><p>These features helped me understand that JavaScript is not only useful for creating static web pages. It can also be used to develop applications that respond to user actions and change their output dynamically.</p><p>In my opinion, interactivity is one of the most valuable aspects of this lesson. When users can control a visualization themselves, they can explore the data at their own pace and understand how different elements relate to one another. This approach can make learning and data exploration more engaging.</p><h3>My Personal Perspective</h3><p>Personally, I found this session interesting because it expanded my understanding of what I can accomplish with JavaScript. Previously, I tended to associate programming with calculations, data processing, and producing text-based outputs. However, today’s examples showed me that programming can also be a tool for building visual and interactive experiences.</p><p>I particularly enjoyed seeing how relatively simple programming concepts, such as arrays, loops, random number generation, and conditional statements, can be combined to create something more tangible. A loop, for instance, can generate many graphical objects without requiring us to write separate instructions for every object. Adding event listeners allows those objects to become part of an interactive application.</p><p>I also realized that building an application does not always require starting with a complicated system. A small prototype with a clear purpose can be a useful first step toward a more sophisticated project.</p><p>At the same time, this session reminded me that visualizations should do more than look attractive. The data and interactions should serve a clear purpose. Understanding the relationship between the underlying data and its visual representation is essential when developing applications for scientific or educational use.</p><h3>The Application I Plan to Develop</h3><p>With the knowledge I have gained so far, I plan to develop a <strong>simple interactive data visualization and simulation application for educational purposes</strong>.</p><p>The idea is to build a web-based application that allows users to generate sample data, visualize the results, and observe how the visualization changes when they interact with the interface.</p><p>For an initial prototype, I would like to include the following features:</p><ol><li><strong>Random data generation:</strong> Generate sample numerical data using JavaScript.</li><li><strong>Interactive visualization:</strong> Display the generated data as circles or other simple graphical objects on an HTML Canvas.</li><li><strong>Step-by-step exploration:</strong> Allow users to move between data points using <em>next</em> and <em>previous</em> buttons.</li><li><strong>Animation controls:</strong> Provide <em>start</em> and <em>stop</em> buttons to observe changes automatically.</li><li><strong>Data display:</strong> Show the numerical values associated with the objects so that users can compare the visual representation with the underlying data.</li></ol><p>Eventually, I would like to expand this idea into a learning tool for basic scientific modeling. For example, the application could simulate the movement of particles, visualize a simple physical system, or demonstrate how changing input parameters affects the resulting behavior.</p><p>I believe this type of application would be a meaningful way to apply my current JavaScript knowledge because it combines data generation, logical programming, visualization, and user interaction in one project. It would also give me an opportunity to practice writing more organized code while gradually adding more advanced features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60e4a032aba3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning JavaScript: Sorting Data and Exploring Root Finding]]></title>
            <link>https://medium.com/@salmaamirah92/learning-javascript-sorting-data-and-exploring-root-finding-ac1b28385dc6?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac1b28385dc6</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 18:12:45 GMT</pubDate>
            <atom:updated>2026-10-21T18:12:45.665Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s session focused on practicing JavaScript through numerical examples. The main topics were generating random numbers, sorting data in ascending and descending order, and evaluating mathematical functions to understand the concept of root finding.</p><h3>Generating Random Numbers with JavaScript</h3><p>At the beginning of the session, I learned how to generate a set of random integers within a specified range using JavaScript. With the help of the RandNum module from the Endap library, I could generate multiple random numbers automatically by defining the minimum value, maximum value, and number of values needed.</p><p>This exercise helped me understand how programming can be used to generate data efficiently. Instead of entering numbers manually, JavaScript can produce a set of values that can be used for further processing and analysis.</p><p>I found this particularly useful because generating random numbers is a simple but important technique that can be applied to simulations, statistical experiments, and other computational problems.</p><h3>Sorting Data in Ascending and Descending Order</h3><p>The next part of the session focused on sorting the generated numbers. I practiced arranging the numbers from the smallest to the largest and from the largest to the smallest.</p><p>One interesting part was learning how sorting can be implemented using nested loops and conditional statements. By comparing two values and swapping their positions when necessary, the program gradually arranged the numbers into the desired order.</p><p>For ascending order, two values were swapped when the first value was greater than the second. Meanwhile, for descending order, the condition was reversed.</p><p>Through this exercise, I gained a better understanding of how algorithms work behind the scenes. Sorting is not simply about rearranging numbers; it also involves logical decisions, comparisons, and repeated operations. This helped me appreciate how basic programming structures can be combined to solve a practical problem.</p><h3>My Point of View</h3><p>In my opinion, today’s session was interesting because it showed how JavaScript can be applied to both data processing and mathematical computations. Although generating random numbers and sorting them might seem like simple exercises, they helped me understand the logic behind programming algorithms more clearly.</p><p>The sorting exercise was particularly useful for improving my understanding of loops, conditional statements, and value comparisons. I realized that even a straightforward task requires a sequence of logical steps that must be implemented correctly.</p><p>Meanwhile, the function evaluation exercise gave me a different perspective on the relationship between programming and mathematics. I could see how a mathematical equation could be translated into a program that calculates values automatically. This made the learning process more practical and helped me connect theoretical concepts with computational methods.</p><p>As a student interested in data science and computational problem-solving, I believe these skills will be useful in future assignments involving data generation, numerical modeling, and data analysis. Understanding how to generate and organize data is an important foundation before moving on to more complex computational tasks.</p><p>Overall, this session helped me improve my JavaScript skills and broaden my understanding of how programming can support mathematical analysis. I still need more practice to become comfortable with implementing algorithms independently, but I believe that working through these examples step by step is a good way to strengthen my programming fundamentals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac1b28385dc6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Git, GitHub, and JavaScript Project Management with Endap.js]]></title>
            <link>https://medium.com/@salmaamirah92/learning-git-github-and-javascript-project-management-with-endap-js-d716d2f5773b?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/d716d2f5773b</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 16:47:37 GMT</pubDate>
            <atom:updated>2026-10-21T16:47:37.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s session introduced me to a more practical approach to learning JavaScript through the endap.js repository. Instead of focusing only on writing code, I learned about the importance of preparing a development environment, managing source code, and understanding how a project can be organized and accessed locally.</p><h3>Understanding the Endap.js Project Structure</h3><p>One of the things I learned was how a JavaScript project can be organized into different folders. The endap.js repository contains libraries, modules, and assets that serve different purposes. For example, the libs folder contains supporting libraries, the modules folder organizes learning materials, and the assets folder stores resources such as CSS files.</p><p>I found this approach useful because a clear project structure makes code easier to maintain and understand. As a student, I sometimes focus too much on whether my code works without considering how the project is organized. This session reminded me that good programming practices involve both writing functional code and keeping a project manageable.</p><h3>Learning Git and GitHub Through Practice</h3><p>Another important part of the session was learning how to use Git and GitHub. By forking a repository, I can create my own copy of an existing project. Cloning allows me to download that project to my computer, while committing and pushing help me record changes and synchronize them with my GitHub repository.</p><p>I also learned about configuring Git with my name and email address and using a Personal Access Token (PAT) for authentication when necessary. This helped me understand that working with GitHub involves not only knowing the commands but also managing authentication credentials responsibly.</p><p>In my opinion, learning these tools is valuable because version control is an essential part of software development. It allows developers to track changes, maintain a history of their work, and collaborate more effectively.</p><h3>Running a Local Server</h3><p>The session also introduced the use of Python to run a local HTTP server. By executing python -m http.server 8000 in the project directory, I can access the project through my browser at <a href="http://localhost:8000.">http://localhost:8000.</a></p><p>I found this particularly interesting because it demonstrates how different tools can work together. Although the project is written in JavaScript and HTML, Python can provide a simple way to serve the files locally. This also helped me understand the difference between opening an HTML file directly and accessing a project through a local server.</p><h3>My Personal Perspective</h3><p>What I found most valuable about today’s session was the opportunity to understand the workflow behind software development rather than focusing exclusively on programming syntax. A project involves several connected activities, including setting up the environment, organizing files, managing versions, running the application, and maintaining secure access to the repository.</p><p>I believe these skills will be useful in my future academic projects, especially when I need to develop programs, experiment with different implementations, or collaborate with other people. Learning Git and GitHub also encourages me to document my progress and become more comfortable working with existing codebases.</p><p>At the same time, I realized that understanding the commands conceptually is just as important as memorizing them. For example, a Personal Access Token should be treated as a password, and I should avoid exposing it in command history, configuration files, or public repositories. Developing good security habits from the beginning is an important part of becoming a responsible developer.</p><p>Overall, today’s session gave me a better understanding of how JavaScript projects are managed in practice. I look forward to applying these concepts in future sessions and becoming more confident in using development tools independently.</p><h3>Conclusion</h3><p>Today’s learning experience showed me that programming is not only about writing code. It also involves building a reliable workflow, managing project files, using version control, and understanding the tools that support software development. I believe that mastering these fundamentals will help me become a more organized and independent programmer.</p><p>#JavaScript #GitHub #Git #Programming #Learning</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d716d2f5773b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning JavaScript Through Hands-On Practice in Modeling, Data Generation, and Analysis]]></title>
            <link>https://medium.com/@salmaamirah92/learning-javascript-through-hands-on-practice-in-modeling-data-generation-and-analysis-ea1e480324ac?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea1e480324ac</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 17:16:44 GMT</pubDate>
            <atom:updated>2026-09-20T17:16:44.524Z</atom:updated>
            <content:encoded><![CDATA[<p>The session in the <strong>Modeling, Data Generation, and Analysis</strong> course gave me a new learning experience, we were given the opportunity to do more hands-on work using <strong>JavaScript.</strong></p><p>The material focused on introducing JavaScript and practicing how it can be used directly in a web browser. The learning process was relatively simple: we used a text editor to write our code and a web browser to see the results. This made it possible to immediately observe how the code we wrote affected the webpage.</p><h3>Getting to Know JavaScript Through Practice</h3><p>What I found interesting about the session was that the learning process did not stop at understanding JavaScript syntax or theory. Instead, we were encouraged to experiment with how JavaScript can be used to make a webpage more interactive.</p><p>We explored several examples involving HTML elements such as button, label, textarea, and div, and then connected them with JavaScript. We also experimented with elements such as <strong>canvas</strong>, created buttons with specific functions, and explored how different elements could interact with users.</p><p>For me, this hands-on approach was quite interesting because I could immediately see the connection between the code I wrote and what happened on the webpage. It made the learning process feel more concrete compared to simply studying the theory.</p><h3>From Simple Code to Interaction</h3><p>One of the things I learned from the session is how JavaScript can act as a bridge between users and a webpage.</p><p>For example, a simple button that initially exists only as an HTML element can be given a specific function using JavaScript. The same idea can be applied to elements such as textarea, canvas, and div, which can be made more dynamic and interactive.</p><p>The JavaScript tutorial used in the session also introduced the concepts gradually, starting from simple examples such as <em>Hello World</em>, buttons and labels, textareas, and canvas, before moving toward more interactive elements.</p><p>I personally found this gradual approach helpful. It showed me that creating interactive applications does not necessarily have to start with complicated programs. Understanding how simple elements work can become an important foundation before moving on to more complex implementations.</p><p>Overall, I found the material quite interesting. One of the main reasons is that we had the opportunity to <strong>experiment directly and see the results of the code we wrote</strong>.</p><p>Besides gaining a better understanding of JavaScript, I also developed additional skills in creating and controlling interactive elements on a webpage.</p><p>For me, today’s session showed that the <strong>Modeling, Data Generation, and Analysis</strong> course is not only about building models or analyzing data. It can also introduce different tools and programming skills that can support those processes.</p><p>As I become more familiar with JavaScript, I hope I can eventually use these skills to create visualizations, simulations, or simple applications that can present modeling and data analysis results in a more interactive way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea1e480324ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Motivasi Memilih Mata Kuliah Pemodelan, Generator Data, dan Analisisnya]]></title>
            <link>https://medium.com/@salmaamirah92/motivasi-memilih-mata-kuliah-pemodelan-generator-data-dan-analisisnya-68db1b7f7efd?source=rss-9d14cdeb8804------2</link>
            <guid isPermaLink="false">https://medium.com/p/68db1b7f7efd</guid>
            <dc:creator><![CDATA[salma amirah]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 16:22:55 GMT</pubDate>
            <atom:updated>2026-09-20T16:22:55.272Z</atom:updated>
            <content:encoded><![CDATA[<p>Memilih mata kuliah tidak selalu hanya tentang memenuhi jumlah SKS atau untuk mengikuti jalur spesialisasi yang sudah ditentukan. Bagi saya, ada kalanya sebuah mata kuliah terasa menarik karena kemampuan yang ingin dibangun di dalamnya dan bagaimana kemampuan tersebut dapat digunakan untuk menyelesaikan permasalahan nyata.</p><p>Mata kuliah <strong>Pemodelan, Generator Data, dan Analisisnya </strong>cukup menarik perhatian saya.</p><p>Secara akademik, mata kuliah ini merupakan salah satu mata kuliah yang perlu saya ambil sebagai bagian dari spesialisasi <strong>Fisika Sains Data</strong>. Namun, alasan saya memilih mata kuliah ini sebenarnya tidak berhenti pada kewajiban tersebut. Saya tertarik karena mata kuliah ini berada pada titik temu antara <strong>fisika, pemodelan, dan data</strong> — tiga hal yang menurut saya semakin penting dalam memahami dan menyelesaikan permasalahan ilmiah.</p><h3><strong>Dari Fenomena Fisika Menjadi Data</strong></h3><p>Sebagai mahasiswa yang mempelajari fisika, kita sering berhadapan dengan fenomena yang tidak dapat dijelaskan hanya dengan melihat hasil pengamatan secara langsung. Kita membutuhkan suatu cara untuk merepresentasikan fenomena tersebut secara lebih sederhana dan terukur.</p><p>Di sinilah pemodelan menjadi penting.</p><p>Sebuah model memungkinkan kita untuk merepresentasikan suatu fenomena fisik menggunakan pendekatan matematis atau komputasional. Dengan model tersebut, kita dapat mencoba memahami hubungan antarvariabel, melakukan prediksi, maupun melihat bagaimana suatu sistem akan merespons ketika kondisi tertentu berubah.</p><p>Namun, model saja tidak selalu cukup.</p><p>Dalam eksperimen, kita juga berhadapan dengan <strong>data</strong>. Data dapat diperoleh dari hasil pengukuran, simulasi, maupun proses pembangkitan data tertentu. Data tersebut kemudian perlu dianalisis agar dapat memberikan informasi yang bermakna.</p><p>Hal inilah yang membuat saya tertarik dengan mata kuliah ini: bagaimana <strong>fenomena fisika dapat diterjemahkan menjadi model, model dapat menghasilkan atau berinteraksi dengan data, dan data tersebut kemudian dianalisis untuk membantu menjawab permasalahan fisika.</strong></p><h3><strong>Tidak Hanya Menggunakan Model, tetapi Memahami Cara Mengembangkannya</strong></h3><p>Hal lain yang membuat saya tertarik adalah <em>outcome</em> dari mata kuliah ini.</p><p>Setidaknya terdapat tiga kemampuan utama yang diharapkan dapat saya capai.</p><p>Pertama, saya diharapkan mampu <strong>memahami penerapan pemodelan sederhana dan pembangkitan data untuk menyelesaikan permasalahan fisika</strong>.</p><p>Bagi saya, kemampuan memahami ini merupakan fondasi yang penting. Sebelum menggunakan suatu model atau metode analisis, kita perlu mengetahui mengapa metode tersebut digunakan, asumsi apa yang mendasarinya, dan bagaimana model tersebut merepresentasikan fenomena yang sedang dikaji.</p><p>Kedua, saya diharapkan mampu <strong>menerapkan pemodelan sederhana dan pembangkitan data untuk membantu menyelesaikan permasalahan fisika, khususnya yang berkaitan dengan eksperimen</strong>.</p><p>Kemampuan ini menjadi menarik karena menghubungkan konsep dengan praktik. Saya tidak hanya ingin memahami model secara teoritis, tetapi juga mampu menggunakannya untuk membantu memahami data eksperimen. Dengan demikian, pemodelan dan analisis data bukan sekadar konsep matematis, tetapi menjadi alat untuk menjawab pertanyaan yang muncul dari suatu eksperimen.</p><p>Ketiga, dan mungkin yang paling menantang bagi saya, adalah kemampuan untuk <strong>mengembangkan pemodelan sederhana dan pembangkitan data untuk membantu menyelesaikan permasalahan fisika</strong>.</p><p>Ada perbedaan antara menggunakan sesuatu yang sudah tersedia dengan mampu mengembangkan solusi sendiri. Saya berharap mata kuliah ini dapat membawa saya dari sekadar menjadi pengguna model menjadi seseorang yang mampu membangun pendekatan pemodelan yang sesuai dengan permasalahan yang dihadapi.</p><h3>Kemampuan yang Ingin Saya Bawa Setelah Mengikuti Mata Kuliah Ini</h3><p>Saya berharap tidak hanya mendapatkan kemampuan teknis, tetapi juga cara berpikir yang lebih sistematis dalam menghadapi suatu permasalahan.</p><p>Saya ingin belajar bagaimana memulai dari sebuah <strong>permasalahan fisika</strong>, menentukan variabel yang relevan, membuat asumsi yang diperlukan, membangun model sederhana, menghasilkan atau memperoleh data, kemudian menganalisis hasilnya untuk mendapatkan kesimpulan.</p><p>Proses tersebut menurut saya merupakan kemampuan yang dapat diterapkan lebih luas, terutama ketika fisika mulai berinteraksi dengan komputasi dan sains data.</p><p>Pada akhirnya, saya melihat mata kuliah <strong>Pemodelan, Generator Data, dan Analisisnya</strong> bukan hanya sebagai salah satu mata kuliah yang perlu saya ambil untuk menyelesaikan spesialisasi Sains Data. Saya melihatnya sebagai kesempatan untuk memahami bagaimana <strong>model dan data dapat digunakan sebagai alat untuk menjembatani teori dengan permasalahan nyata</strong>.</p><p>Saya berharap setelah menyelesaikan mata kuliah ini, saya tidak hanya mampu mengatakan <em>“saya memahami sebuah model”</em> atau <em>“saya dapat menganalisis sebuah dataset”</em>, tetapi juga mampu menjawab pertanyaan yang lebih penting:</p><p><strong>“Bagaimana saya dapat menggunakan model dan data untuk membantu memahami dan menyelesaikan sebuah permasalahan fisika?”</strong></p><p>Bagi saya, kemampuan untuk menjawab pertanyaan tersebut adalah alasan utama mengapa saya tertarik mengambil mata kuliah ini.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68db1b7f7efd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>