Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | experiment: scaling pixels to 255 levels | Kartik K. Agaram | 2021-07-13 | 1 | -2/+14 |
| | | | | | This is strictly worse than before, both with barbara.pgm and more subtly with t.pgm. | ||||
* | . | Kartik K. Agaram | 2021-07-12 | 3 | -43/+1331 |
| | | | | | | | | | Undo commit 70a03be0d0 and reinline the helper extracted there. I have a better sense now of the primitives to reuse between greyscale and color dithering. https://merveilles.town/@akkartik/106571585137582228 | ||||
* | more precise error-diffusion | Kartik K. Agaram | 2021-07-12 | 2 | -34/+22222 |
| | | | | | | | | | The Barbara test image has been looking right since commit 430dd67cb2. However, t.pgm has not. This doesn't fix it, but does seem like an improvement. The remaining error seems to be unrelated to rounding. Adding 8 more bits of precision has no effect. | ||||
* | . | Kartik K. Agaram | 2021-07-12 | 1 | -28/+28 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -2/+2 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -5/+2 |
| | |||||
* | forget HSL conversion for now, stick to RGB | Kartik K. Agaram | 2021-07-11 | 2 | -13/+50 |
| | | | | | It looks like seeking the nearest neighbor in HSL space leads to more saturated colors. | ||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -42/+42 |
| | | | | Inline a helper. | ||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -33/+39 |
| | | | | Extract a helper. | ||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -32/+30 |
| | | | | Inline an unnecessary block. | ||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -20/+20 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-11 | 1 | -1/+11 |
| | |||||
* | dither 256-level greyscale to 8-level greyscale | Kartik K. Agaram | 2021-07-11 | 2 | -2/+212 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-10 | 1 | -24/+24 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-10 | 1 | -3/+3 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-10 | 4 | -23/+3 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-10 | 1 | -88/+47 |
| | |||||
* | increase precision for dithering computations | Kartik K. Agaram | 2021-07-10 | 1 | -3/+8 |
| | | | | Now we get a perfect checkerboard pattern. | ||||
* | . | Kartik K. Agaram | 2021-07-10 | 2 | -34/+106 |
| | | | | https://merveilles.town/@akkartik/106559551043772522 | ||||
* | . | Kartik K. Agaram | 2021-07-10 | 1 | -4/+4 |
| | | | | https://merveilles.town/@akkartik/106557664535993377 | ||||
* | dithering greyscale using black/white | Kartik K. Agaram | 2021-07-10 | 5 | -24/+293 |
| | | | | Starting to look right. | ||||
* | reorder a few functions | Kartik K. Agaram | 2021-07-08 | 1 | -126/+128 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -0/+12 |
| | |||||
* | scaling ppm images | Kartik K. Agaram | 2021-07-08 | 1 | -26/+76 |
| | |||||
* | scaling pgm images | Kartik K. Agaram | 2021-07-08 | 1 | -21/+65 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -3/+2 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -3/+3 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -4/+4 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -1/+1 |
| | |||||
* | scaling pbm images | Kartik K. Agaram | 2021-07-08 | 1 | -30/+67 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -18/+18 |
| | |||||
* | better ppm colors | Kartik K. Agaram | 2021-07-08 | 1 | -7/+31 |
| | | | | I had some logic to make hue distance cylindrical, but it wasn't right. | ||||
* | better greyscale | Kartik K. Agaram | 2021-07-08 | 1 | -2/+8 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -14/+14 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-08 | 1 | -1/+0 |
| | |||||
* | ppm colors are weird, though | Kartik K. Agaram | 2021-07-08 | 4 | -1/+16404 |
| | |||||
* | ppm support | Kartik K. Agaram | 2021-07-07 | 1 | -3/+32 |
| | | | | Typo in commit fe3cbcd77: it only rendered pbm/pgm. | ||||
* | instructions for Universal Ctags | Kartik K. Agaram | 2021-07-07 | 2 | -3/+4 |
| | | | | Thanks Sumeet Agarwal for raising this issue. | ||||
* | . | Kartik K. Agaram | 2021-07-07 | 1 | -9/+9 |
| | |||||
* | render ppm/pgm | Kartik K. Agaram | 2021-07-07 | 1 | -7/+106 |
| | | | | Looks pretty bad compressing 256 shades of grey to 8. | ||||
* | load ppm/pgm/ppm on demand | Kartik K. Agaram | 2021-07-07 | 1 | -8/+113 |
| | |||||
* | initial image rendering | Kartik K. Agaram | 2021-07-07 | 5 | -0/+6163 |
| | | | | | | Supports just some ASCII formats: https://en.wikipedia.org/wiki/Netpbm Colors are messed up. That's next. | ||||
* | . | Kartik K. Agaram | 2021-07-06 | 1 | -8/+18 |
| | |||||
* | . | Kartik K. Agaram | 2021-07-06 | 2 | -44/+44 |
| | |||||
* | nearest h/s/l color by a euclidean metric | Kartik K. Agaram | 2021-07-06 | 1 | -0/+51 |
| | |||||
* | primitives for double-buffering | Kartik K. Agaram | 2021-07-05 | 1 | -4/+152 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I thought I needed these for this bouncing-ball demo: def (bounce screen) with (w (width screen) h (height screen) cx 16 cy 16 dx 12 dy 19) while 1 clear screen ring screen cx cy 16 3 5 cx += dx cy += dy when (or (cx > w) (cx < 0)) set dx 0-dx when (or (cy > h) (cy < 0)) set dy 0-dy for _ 0 (< _ 100) ++_ # delay No matter how I adjusted the delay I couldn't get rid of the jitter. So I built a double-buffered version: (bounce2 . [def (bounce2 screen) with (w (width screen) h (height screen) cx 16 cy 16 dx 12 dy 19 screen2 (new_screen (columns screen) (lines screen))) while 1 clear screen2 ring screen2 cx cy 16 3 5 cx += dx cy += dy when (or (cx > w) (cx < 0)) set dx 0-dx when (or (cy > h) (cy < 0)) set dy 0-dy blit screen2 screen for _ 0 (< _ 100) ++_]) # delay But it didn't make a difference! Turns out nothing will help you when successive frames are too far apart. This is the correct tweak to `bounce`: - dx 12 - dy 19) + dx 1 + dy (/ 19 12)) Still, we'll keep double-buffering around for the future. | ||||
* | shell: fix clear on screens | Kartik K. Agaram | 2021-07-05 | 1 | -1/+1 |
| | | | | | | | Broken since commit c95648c96 on Jul 3. Unclear what test to write for this. Should clear-stream check for NULL? Should apply-clear? | ||||
* | expose Mu implementation of 'bezier' | Kartik K. Agaram | 2021-07-05 | 1 | -1/+256 |
| | | | | Still no support for acute-angled control points. | ||||
* | replace 'circle' with Mu implementation | Kartik K. Agaram | 2021-07-05 | 2 | -19/+161 |
| | |||||
* | replace 'vline' with Mu implementation | Kartik K. Agaram | 2021-07-05 | 2 | -6/+162 |
| |