ApasScript.

Mechanics

These are Apas Cloud services: they run on our servers for a signed-in member. The examples below are shown already made; sign in to edit and run your own.

inclineForces Apas Cloud

A block of mass m on a rough incline at θ degrees with friction coefficient μ: the normal reaction mg cos θ, the weight's component along the slope mg sin θ, the most friction μN, the friction acting, the acceleration down the slope (0 when it rests), whether it slides, the angle of repose arctan μ in degrees, the least force along the slope that holds it and the least that pushes it up. Record: normal, along, frictionMax, friction, acceleration, slides, repose, holdForce, pushForce.

atwood Apas Cloud

The Atwood machine, m1 and m2 hanging from a light string over a smooth pulley: the magnitude of the acceleration |m1 − m2| g/(m1 + m2) and the tension 2 m1 m2 g/(m1 + m2). Record: acceleration, tension, moves.

tablePulley Apas Cloud

A block on a rough table tied over a pulley at the edge to a hanging block: the acceleration (m_hang g − μ m_table g)/(m_table + m_hang), zero when friction holds, and the tension. Record: acceleration, tension, moves.

connectedBlocks Apas Cloud

Blocks in a row on a rough floor pushed (or pulled) by F on the first: the common acceleration (F − μ g Σm)/Σm and the force between each pair of neighbours, contact[i] being what the first i + 1 blocks exert on the rest. Record: acceleration, contact (a list), moves.

springBlock Apas Cloud

A block of mass m on a spring of constant k oscillating with amplitude A: ω = √(k/m), the period, the frequency, the greatest speed Aω, the greatest acceleration Aω² and the energy ½kA². Record: omega, period, frequency, vMax, aMax, energy.

pendulumPeriod Apas Cloud

The small-angle period of a simple pendulum, 2π√(L/g).

pendulumAt Apas Cloud

A bob of mass m on a string L released from rest at θ0 degrees from the vertical, when it is at θ degrees: the speed from v² = 2gL(cos θ − cos θ0), the tension mg(3 cos θ − 2 cos θ0) and the height above the lowest point. Record: speed, tension, height.

conicalPendulum Apas Cloud

A conical pendulum, mass m on a string L making θ degrees with the vertical: the circle's radius L sin θ, the tension mg/cos θ, the speed, ω = √(g/(L cos θ)) and the period. Record: radius, tension, speed, omega, period.

verticalCircle Apas Cloud

A mass m on a string (or inside a track) of radius r with speed v at the lowest point: whether it completes the circle (v² ≥ 5gr) or only oscillates (v² ≤ 2gr), the speed at the top, the least speeds √(5gr) at the bottom and √(gr) at the top, the tensions at the bottom and the top, the angle from the bottom (degrees) where the string slackens when it does neither, and the greatest swing angle when it oscillates. Record: completes, oscillates, vTop, vMinBottom, vMinTop, tensionBottom, tensionTop, slackAngle, swingAngle.

banking Apas Cloud

A road of radius r banked at θ degrees with friction coefficient μ: the speed needing no friction √(rg tan θ), the greatest speed √(rg (tan θ + μ)/(1 − μ tan θ)) and the least √(rg (tan θ − μ)/(1 + μ tan θ)), 0 when μ ≥ tan θ. Record: vIdeal, vMax, vMin.

projectile Apas Cloud

A projectile launched at u m/s, θ degrees above the horizontal, from a height h0 (0 if left out): the range, the greatest height, the time of flight, the time to the top and the launch components. Record: range, maxHeight, timeOfFlight, timeToTop, ux, uy.

projectileAt Apas Cloud

Where a projectile launched at u, θ is after t seconds: x, y (from the launch point), the velocity components, the speed and the direction in degrees. Record: x, y, vx, vy, speed, direction.

collision1d Apas Cloud

A head-on collision of m1 at u1 with m2 at u2 with the coefficient of restitution e (1 elastic, 0 perfectly inelastic): the velocities after, the kinetic energy lost and the velocity of the centre of mass. Record: v1, v2, energyLost, vCm.

slopePoint Apas Cloud

The point s along a slope that rises at θ degrees from the foot: foot + s (cos θ, sin θ). For a slope rising to the left use the incline's slopeAngle (180 − θ). Use it to put a block on an incline: blockOn(d, slopePoint(foot, 30, 4), w, h, "m", 30).

forceOn Apas Cloud

Draws a force (or velocity) arrow of the given length from p at θ degrees anticlockwise from +x, with its label just beyond the tip, a little to the arrow's left so it clears a string or a radius the arrow lies along, in the arrow's colour. From a block's centre the arrow crosses the mass label: start it at an edge point when that matters. Optional: a colour (tomato if left out) and "dashed". Returns the tip point.

freeBodyOn Apas Cloud

Draws a free-body diagram at p: a dot and one labelled arrow per (label, length, θ) triple, coloured in turn tomato, steelblue, forestgreen, darkorange, violet, teal. Returns p.

surfaceOn Apas Cloud

Draws a ground, wall, table or ceiling: a line from p to q with hatch ticks on its right-hand side (below a ground drawn left to right, to the left of a wall drawn bottom to top). Optional: a colour and "plain" for no ticks.

blockOn Apas Cloud

Draws a block w wide and h high whose bottom edge's middle is at p, turned by θ degrees about p (so a block on a 30° slope is blockOn(d, slopePoint(foot, 30, s), w, h, "m", 30); on a left-rising slope use the incline record's blockAngle, −30), filled and labelled with its mass at its centre. Optional in this order: the label, θ, the fill colour, the outline colour. Returns the block's centre, the point to hang forces from.

inclineOn Apas Cloud

Draws a wedge from its foot: the base along +x ("right", the default) or −x ("left"), rising at θ degrees, filled, with the angle arc and its label at the foot (θ° if left out). Optional in this order: "right"/"left", the angle label, the fill. Returns foot, corner, top, height, hypotenuse, slopeAngle (θ, or 180 − θ for "left": the direction up the slope, for slopePoint and friction arrows), blockAngle (the turn to give blockOn: θ or −θ) and normalAngle (the outward normal, for N).

pulleyOn Apas Cloud

Draws a pulley: a filled circle with its hub, an optional label under it. Returns the centre. Strings are drawn by the writer tangent to the rim (centre ± r).

atwoodOn Apas Cloud

Draws an Atwood machine: a hatched ceiling, the post, the pulley at centre with radius r, the string over its top and down both sides tangent to the rim by drop1 and drop2, and the two hanging blocks with their labels (w by h, 2.4r by 2r if left out). Returns block1, block2 (the blocks' centres) and string1, string2 (the string ends).

tablePulleyOn Apas Cloud

Draws a block on a table tied over a pulley at the table's corner to a hanging block: the hatched table top of the given length ending at corner, the pulley just past the corner with its top level with the table, the block on the table, the string along the table and over the rim, the hanging block. Optional: w, h of the blocks (then the hanging string's drop), or the drop alone. Returns blockTable, blockHang (centres), pulley, string (the hanging string's end).

springBlockOn Apas Cloud

Draws a spring-block oscillator: a hatched wall at anchor, a zigzag spring of the given length at θ degrees (8 turns if left out), its label ("k" if left out) beside it, and the block w wide and h high attached at the spring's end, lying along the spring's direction. Returns block (the centre), end (the spring's end) and anchor.

pendulumOn Apas Cloud

Draws a simple pendulum: a hatched support at pivot, the dashed vertical, the string of the given length at θ degrees from the downward vertical (positive to the right), the bob and its label ("m" if left out) and the angle arc when θ is not 0. Optional: the label, the bob's radius. Returns bob, pivot and stringAngle (the string's direction in the diagram's degrees, for forceOn).

circularMotionOn Apas Cloud

Draws a particle in circular motion: the dashed circle ("solid" for a track), the centre, the radius to the particle at θ degrees with its label r, the velocity arrow v along the tangent and the centripetal arrow a towards the centre. Optional: the lengths of v and a (0.5r and 0.4r if left out; 0 for none). Returns position, vTip, aTip and tangentAngle (θ + 90).

projectileOn Apas Cloud

Draws a projectile's path to scale from origin: the parabola of a launch at u m/s and θ degrees under g (9.8 if left out), the hatched ground, the launch velocity u with the angle arc, the dashed line to the top labelled H and the range labelled R. Metres are the diagram's units times scale (1 if left out). Returns range, maxHeight, timeOfFlight, top and landing (points).