Skip to content

Instantly share code, notes, and snippets.

View alwynallan's full-sized avatar

Peter Allan alwynallan

  • Greater Philadelphia, Pennsylvaia
View GitHub Profile
@alwynallan
alwynallan / bin2svg.c
Created January 4, 2025 20:13
Takes binary data in 1-byte to 8-byte words and produces a .SVG image of 100K lines where the position on the circumference is the value of each word. Most graphics software balks and the extreme number of transparent objects, but Chrome and Illustrator can handle it, and Inkscape tries.
// bin2svg.c
// $ gcc -Wall -O3 bin2svg.c -o bin2svg -lm
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <math.h>