Long Exposure Light Trails
A night road photographed at four shutter speeds: dots at 1/60 s, growing streaks, and full light trails at 30 s.
AI prompt
Long exposure night photograph of a multi-lane city road from a pedestrian bridge, 20 seconds at f/11 and ISO 100 on a tripod, continuous ribbons of white headlight trails on one side and red tail light trails on the other curving into the distance, sharp still buildings with lit windows, deep blue sky just after sunset, wet asphalt reflecting the light, clean and crisp. Variant: 1/60 s version with individual cars as separate dots. Negative: camera shake, blown highlights, noise, people, text, watermark. Reduced motion: still image.About this pattern
Definition
A long exposure keeps the shutter open while things move, so moving lights smear into lines while still things stay sharp. Traffic becomes ribbons of white and red. It needs a tripod, because any camera shake blurs the whole frame, not only the trails.
When to use it
- 1/60 s freezes cars into separate dots; 1 s makes short streaks; 10 to 30 s joins cars into continuous ribbons.
- Use a tripod, low ISO and a small aperture so the frame is not overexposed.
- Headlights read white, tail lights red, which tells direction.
- Handheld long exposure blurs everything, including the still buildings.
What the controls do
- Four shutter speed buttons and a Handheld switch that adds camera shake.
Motion & timing
- The image redraws instantly; nothing moves on its own.
- Reduced motion: no animation is involved.
Tips & variations
- Neutral density filters allow long exposures in daylight.
- A two-second timer or remote release avoids shake from pressing the shutter.
Code of this live preview
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Shutter"><button data-p="0" aria-pressed="true">1/60 s</button><button data-p="1" aria-pressed="false">1 s</button><button data-p="2" aria-pressed="false">10 s</button><button data-p="3" aria-pressed="false">30 s</button></div><canvas id="cv" width="300" height="120" role="img" aria-label="Night road with car lights shown for the chosen shutter speed"></canvas><label class="sw"><input id="hh" type="checkbox"> Handheld (camera shake)</label><p class="out" id="out"></p></div>:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#cv{width:100%;height:auto;border-radius:12px;display:block;background:#0b1020}.out{font-size:12px;color:var(--muted)}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}const cv=document.getElementById('cv'),cx=cv.getContext('2d'),hh=document.getElementById('hh'),bs=[...document.querySelectorAll('#pre button')],T=[1/60,1,10,30],N=['Cars are frozen as separate dots.','Short streaks show each car\u2019s direction.','Streaks join into long ribbons.','Continuous light trails; use a tripod.'];let p=0;
let s=5;const R=()=>(s=(s*1664525+1013904223)%4294967296)/4294967296;const cars=[];for(let i=0;i<70;i++){const lane=i%4,dir=lane<2?1:-1;cars.push({y:70+lane*9+(lane>1?4:0),v:(60+R()*70)*dir,t0:R()*40-5,c:dir>0?'255,244,214':'255,70,60',w:.7+R()*.8});}
function sceneBg(g){const gr=cx.createLinearGradient(0,0,0,120);gr.addColorStop(0,'#0e1a3a');gr.addColorStop(.6,'#2a2f55');gr.addColorStop(1,'#10131f');cx.fillStyle=gr;cx.fillRect(0,0,300,120);cx.fillStyle='#07090f';[[10,38,30],[46,30,24],[76,44,36],[168,34,28],[204,26,34],[244,40,30]].forEach(b=>cx.fillRect(b[0],b[1]+22-b[2]+30,b[2]+4,120));cx.fillStyle='#ffd98a';for(let i=0;i<46;i++){const x=12+R()*270,y=50+R()*20;cx.globalAlpha=.55;cx.fillRect(x|0,y|0,2,2);}cx.globalAlpha=1;cx.fillStyle='#14161f';cx.fillRect(0,64,300,56);}
function up(){s=77;sceneBg();const t=T[p],sh=hh.checked?1:0;let jx=0,jy=0;const copies=sh?5:1;
for(let k=0;k<copies;k++){if(sh){jx=(R()-.5)*7;jy=(R()-.5)*4;}cx.save();cx.translate(jx,jy);cx.globalAlpha=sh?.45:1;cars.forEach(c=>{const a=c.v*(0-c.t0)+(c.v>0?-40:340),b=a+c.v*t;const x0=Math.min(a,b),x1=Math.max(a,b);if(x1<-5||x0>305)return;cx.strokeStyle='rgba('+c.c+',.9)';cx.lineWidth=c.w*1.6;cx.lineCap='round';cx.shadowColor='rgb('+c.c+')';cx.shadowBlur=6;cx.beginPath();cx.moveTo(a,c.y);cx.lineTo(b+(t<.1?c.v*.02:0),c.y);cx.stroke();if(t<.1){cx.beginPath();cx.arc(a,c.y,1.8,0,6.3);cx.fillStyle='rgb('+c.c+')';cx.fill();}});cx.restore();}
cx.shadowBlur=0;document.getElementById('out').textContent=N[p]+(sh?' Camera shake smears the whole frame.':'');bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));hh.addEventListener('change',up);up();One complete HTML file. Save it and open it in a browser.
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Long Exposure Light Trails — demo</title>
<style>
:root{--bg:#F1F1EF;--surface:#fff;--surface-2:#F7F7F5;--line:#E0E0DC;--text:#171717;--muted:#6f6f6f;--accent:#171717;--accent-ink:#fff;--danger:#d92d20}
*{box-sizing:border-box;margin:0}
html,body{height:100%}body{background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,'Segoe UI',Inter,Roboto,sans-serif;-webkit-font-smoothing:antialiased}.stage{min-height:100%;display:grid;place-items:center;padding:24px}button,input,select,textarea{font-family:inherit}@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}a{color:inherit;text-decoration:none}ul,ol,p,h4{margin:0;padding:0}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.pre{display:flex;gap:5px;flex-wrap:wrap}.pre button{height:28px;padding:0 11px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-size:11px;cursor:pointer}
.pre button[aria-pressed=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.bx{width:min(330px,100%);display:grid;gap:9px}.rw{display:grid;gap:3px;font-size:11.5px;color:var(--muted)}.rw b{color:var(--text);font-weight:600}input[type=range]{width:100%;accent-color:#171717}
.out{font-size:12px;color:var(--muted);line-height:1.4}.out b{color:var(--text)}
button:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#cv{width:100%;height:auto;border-radius:12px;display:block;background:#0b1020}.out{font-size:12px;color:var(--muted)}.sw{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--muted)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
</style></head>
<body><div class="stage">
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Shutter"><button data-p="0" aria-pressed="true">1/60 s</button><button data-p="1" aria-pressed="false">1 s</button><button data-p="2" aria-pressed="false">10 s</button><button data-p="3" aria-pressed="false">30 s</button></div><canvas id="cv" width="300" height="120" role="img" aria-label="Night road with car lights shown for the chosen shutter speed"></canvas><label class="sw"><input id="hh" type="checkbox"> Handheld (camera shake)</label><p class="out" id="out"></p></div>
</div>
<script>
const cv=document.getElementById('cv'),cx=cv.getContext('2d'),hh=document.getElementById('hh'),bs=[...document.querySelectorAll('#pre button')],T=[1/60,1,10,30],N=['Cars are frozen as separate dots.','Short streaks show each car\u2019s direction.','Streaks join into long ribbons.','Continuous light trails; use a tripod.'];let p=0;
let s=5;const R=()=>(s=(s*1664525+1013904223)%4294967296)/4294967296;const cars=[];for(let i=0;i<70;i++){const lane=i%4,dir=lane<2?1:-1;cars.push({y:70+lane*9+(lane>1?4:0),v:(60+R()*70)*dir,t0:R()*40-5,c:dir>0?'255,244,214':'255,70,60',w:.7+R()*.8});}
function sceneBg(g){const gr=cx.createLinearGradient(0,0,0,120);gr.addColorStop(0,'#0e1a3a');gr.addColorStop(.6,'#2a2f55');gr.addColorStop(1,'#10131f');cx.fillStyle=gr;cx.fillRect(0,0,300,120);cx.fillStyle='#07090f';[[10,38,30],[46,30,24],[76,44,36],[168,34,28],[204,26,34],[244,40,30]].forEach(b=>cx.fillRect(b[0],b[1]+22-b[2]+30,b[2]+4,120));cx.fillStyle='#ffd98a';for(let i=0;i<46;i++){const x=12+R()*270,y=50+R()*20;cx.globalAlpha=.55;cx.fillRect(x|0,y|0,2,2);}cx.globalAlpha=1;cx.fillStyle='#14161f';cx.fillRect(0,64,300,56);}
function up(){s=77;sceneBg();const t=T[p],sh=hh.checked?1:0;let jx=0,jy=0;const copies=sh?5:1;
for(let k=0;k<copies;k++){if(sh){jx=(R()-.5)*7;jy=(R()-.5)*4;}cx.save();cx.translate(jx,jy);cx.globalAlpha=sh?.45:1;cars.forEach(c=>{const a=c.v*(0-c.t0)+(c.v>0?-40:340),b=a+c.v*t;const x0=Math.min(a,b),x1=Math.max(a,b);if(x1<-5||x0>305)return;cx.strokeStyle='rgba('+c.c+',.9)';cx.lineWidth=c.w*1.6;cx.lineCap='round';cx.shadowColor='rgb('+c.c+')';cx.shadowBlur=6;cx.beginPath();cx.moveTo(a,c.y);cx.lineTo(b+(t<.1?c.v*.02:0),c.y);cx.stroke();if(t<.1){cx.beginPath();cx.arc(a,c.y,1.8,0,6.3);cx.fillStyle='rgb('+c.c+')';cx.fill();}});cx.restore();}
cx.shadowBlur=0;document.getElementById('out').textContent=N[p]+(sh?' Camera shake smears the whole frame.':'');bs.forEach(b=>b.setAttribute('aria-pressed',String(+b.dataset.p===p)));}
bs.forEach(b=>b.addEventListener('click',()=>{p=+b.dataset.p;up();}));hh.addEventListener('change',up);up();
</script>
</body></html>