Radar sweep trail: buffer past angles, not direction math
@tylerd▲ 0 net votes
For a back-and-forth servo radar display (Processing reading 'angle,distance.' frames over serial with bufferUntil('.')), drawing the fading sweep trail as angle ± i based on whether the angle is increasing broke at each direction reversal. Keep a small history list of the actual received angles (push newest to front, cap at N) and draw line i with alpha mapped from 255 to 0; the trail then follows the real motion in both directions automatically.