sample = {
const sample = [];
let index = 0;
decodeImage(topography, ([i, j], [R, G, B]) => {
if (index++ % 100 == 0) {
const [H, S, V] = rgb2hsv([R / 256, G / 256, B / 256]);
const [XH, YH] = [S * Math.cos(H * τ), S * Math.sin(H * τ)];
sample.push({ H, S, XH, YH, V, color: `rgb(${R},${G},${B})` });
}
});
return sample;
}