الجسر بين التراث والكود. زليج تقليدي ينفصل إلى بكسلات — كل بلاطة سيراميك تصبح مربع بيانات. حرّك مقياس الدقة: من المتصل إلى المنفصل، من الحرفة إلى الخوارزمية.
// Zellige × Pixel — transition continu → discret function render(resolution) { // 1. Dessiner le zellige à haute résolution (continu) drawZellige(offscreen, seed, symmetry); // 2. Pixeliser à la résolution demandée const cellW = W / resolution; const cellH = H / resolution; for (let y = 0; y < resolution; y++) { for (let x = 0; x < resolution; x++) { // Échantillonner la couleur du centre de la cellule const pixel = offscreen.getImageData( x * cellW + cellW/2, y * cellH + cellH/2, 1, 1 ); ctx.fillStyle = `rgb(${pixel.data[0]},${pixel.data[1]},${pixel.data[2]})`; ctx.fillRect(x * cellW, y * cellH, cellW - gap, cellH - gap); } } }
عند أي دقة يبقى نمط الزليج قابلاً للتعرف؟ قارن 8×8 (مجرد جدًا) مقابل 64×64 (شبه فوتوغرافي). ما الحد الأدنى من المعلومات لبقاء النجمة مقروءة؟
من البكسل إلى التراث — استكشف الجسر
احجز جلسة