CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 10:31:02 GMT
content-type: text/html
server: cloudflare
last-modified: Thu, 28 Oct 2010 14:02:44 GMT
cf-cache-status: DYNAMIC
vary: Accept-Encoding
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=oZoVG3ZTnhRYqzdNjWCTgqtApjv284py%2Btiy9U9B%2BjHsIq%2FU%2BOpemOYKnhfaTKyMkbZMWQ9U0t7pFKMK6NKlHC2dMZIQH6FGKw0VBe0%3D"}]}
content-encoding: gzip
cf-ray: 98cdaf81f9af8599-BOM
alt-svc: h3=":443"; ma=86400
Processing.js
LinearImage
Click and drag mouse up and down to control the signal. Press and hold any key to watch the scanning.
Original Processing.org Example: LinearImage

// All Examples Written by Casey Reas and Ben Fry // unless otherwise stated. PImage a; boolean onetime = true; int[] aPixels = new int[200*200]; int direction = 1; float signal; void setup() { size(200, 200); stroke(255); a = loadImage("florence03.jpg"); for(int i=0; i<width*height; i++) { aPixels[i] = a.pixels[i]; } frameRate(30); } void draw() { if (signal > width-1 || signal < 0) { direction = direction * -1; } if(mousePressed) { signal = abs(mouseY%height); } else { signal += (0.3*direction); } if(keyPressed) { loadPixels(); for (int i=0; i<width*height; i++) { pixels[i] = aPixels[i]; } updatePixels(); line(0, signal, width, signal); } else { loadPixels(); for (int i=0; i<width*height; i++) { pixels[i] = aPixels[int((width*int(signal))+(i%width))]; } updatePixels(); } }