⚙️

Working IC Engine.

Render:
1,500 RPM
Cylinders
Stroke:
Use two fingers to orbit the engine

Cool blue particles are the incoming air–fuel charge; hot orange/grey particles are the exhaust leaving through the header. Shown at a fraction of real engine speed so the cycle stays visible. One finger scrolls the page; two fingers orbit the model.

Cycle diagram — cylinder 1

Piston position, valve lift and (illustrative) cylinder pressure across the full 720° four-stroke cycle. The cursor tracks the live animation.

Piston position Intake valve Exhaust valve Pressure

How a four-stroke engine works

The four strokes (720° of crankshaft)

A four-stroke engine completes one power cycle every two crankshaft revolutions. Intake: the piston descends and the intake valve opens, drawing in air and fuel. Compression: both valves close and the rising piston squeezes the mixture. Power: the spark plug ignites it and expanding gas drives the piston down. Exhaust: the piston rises again and the exhaust valve opens to expel burnt gas.

Why the motion is exact

Piston height follows the slider-crank relation y = r·cos θ + √(L² − r²·sin²θ), where r is the crank radius (half the stroke) and L is the connecting-rod length. Every part is positioned from a single crank angle θ, so the model is geometrically exact rather than physically simulated.

Where the gases flow

The intake manifold (left) feeds the air–fuel charge down its runners and past the intake valve into the cylinder — shown as the cool blue stream during the intake stroke. After combustion, the rising piston pushes burnt gas past the exhaust valve into the exhaust header (right), which collects every cylinder into one pipe and out the tailpipe — the hot orange stream. The overhead camshafts spin at half crank speed, their lobes pressing each poppet valve open against its spring at the right moment.

Inline-4 firing order

In the four-cylinder mode the cylinders fire in the common 1-3-4-2 order — one power stroke every 180° of crankshaft rotation — so the engine delivers smooth, overlapping power. Pistons 1 and 4 rise and fall together, opposite to 2 and 3.

Explore it your way

Exploded view separates every part with labels so you can see how the assembly fits together. Stop-motion — pause, then drag the crank-angle slider or step stroke-by-stroke — freezes any instant of the 720° cycle for close inspection, and Fullscreen fills the screen for presentations.

FAQ

Frequently Asked Questions

What are the four strokes of an IC engine?
A four-stroke engine repeats a cycle of intake, compression, power and exhaust. Intake draws air and fuel in as the piston descends; compression squeezes the mixture as the piston rises with both valves shut; the spark ignites it for the power stroke that pushes the piston down; and exhaust expels the burnt gas as the piston rises again. The whole cycle takes two crankshaft revolutions (720°).
What is the firing order of an inline-four engine?
The most common firing order for an inline-four is 1-3-4-2, giving one power stroke every 180° of crankshaft rotation. Cylinders 1 and 4 move up and down together, opposite to cylinders 2 and 3, which balances the engine and spreads the power pulses evenly. Some engines use 1-2-4-3 instead.
How does a piston and crankshaft turn up-and-down motion into rotation?
The connecting rod links the piston to an offset journal on the crankshaft. As the piston moves up and down, the rod pushes the crank pin around a circle, converting linear motion into rotation. Piston height follows the slider-crank relation y = r·cos θ + √(L² − r²·sin²θ), where r is the crank radius and L the rod length — which is exactly how this 3D model is animated.
What is the difference between a two-stroke and a four-stroke engine?
A four-stroke engine fires once every two crankshaft revolutions and uses separate intake and exhaust strokes with poppet valves — efficient and clean, used in cars and motorcycles. A two-stroke engine fires every revolution by combining intake/exhaust with compression/power, making it lighter and more powerful for its size but less efficient. This simulator models the four-stroke cycle.
Does this engine simulation run on my device?
Yes — it renders entirely in your browser using WebGPU where available (Chrome, Edge and recent Safari), automatically falling back to WebGL2 on other browsers. The "Render" badge shows which backend is active. Nothing is sent to a server; the animation is pure geometry computed on your device.

Tips

  • Drag to orbit, scroll to zoom, and use the RPM slider to speed the engine up.
  • Watch the blue charge enter through the intake runners and the orange exhaust leave through the header.
  • Hit Exploded to pull the parts apart with labels; turn Cutaway off for the solid block.
  • Pause and drag the Crank angle slider (or Prev/Next stroke) to step through the cycle frame by frame.
  • Use Fullscreen for a big view; switch a single cylinder vs inline-4 to compare firing.