Layout & Color
Distortion & Bias
Angle & Noise
About Project:
Earlier this month, I built a small mathematical visualization tool to generate geometric shapes on a grid for my art practice. I’ve modified it a bit and shared it here so anyone who happens to visit can give it a try.
This project lays out a simple rectangular grid of points—rows intersecting columns—to form a mesh of quadrilaterals. Each cell alternates two colors, much like a checkerboard, but the real magic happens when you nudge just one parameter:
-
Grid size sets how many cells tile the space. Fewer rows and columns make big, bold blocks; more of them create a finer, more detailed weave.
-
Column/Row bias applies a power curve to each cell’s position. Raising the column index to a power pulls columns toward the edges, bending straight lines into smooth arcs. Doing the same to the row index bends rows into gentle waves.
-
Top/bottom scale and shear interpolate that bias from one edge of the grid to the other. You can make the mesh taper or flare, or shift one side left while the other shifts right, turning a regular grid into a slanted, expanding, or contracting form.
-
Angle modes calculate a direction at each cell—using sine waves, spirals, noise, vortices, and more—and offset each corner along that angle. A small change in frequency or phase can turn rolling waves into twisting spirals or spiky bursts.
-
Noise detail adds natural roughness. Low detail means smooth gradients in the noise field; high detail layers in fine texture, breaking the pattern into intricate fragments.
Overall, it’s the same program I used to create the artworks in my previous post, now shared so others can play with it.
User Guide:
Adjusting Parameters:
Layout & Color
-
Grid Rows: Number of horizontal rows
-
Grid Columns: Number of vertical columns
-
Margin %: Space between the grid and canvas edge
-
Color: Pick the primary fill color
Distortion & Bias
-
Column Bias: Warps columns (p‑power)
-
Row Bias: Warps rows (q‑power)
-
Top Scale: Scale factor for the top of the grid
-
Bottom Scale: Scale factor for the bottom of the grid
-
Top Shear: Horizontal shear at top
-
Bottom Shear: Horizontal shear at bottom
Angle & Noise
-
Angle Mag: Strength of angle offset (0 hides other controls)
-
Angle Freq: Frequency of angle variation
-
Angle Phase: Phase shift applied to all angles
-
Noise Scale: Scale of underlying noise field
-
Noise Detail: Detail (octaves) of noise
-
Angle Mode: Select angle‑calculation mode (wave, radial, noise, etc.)
Play/Pause Controls
-
Play: Click the green Play button to start looping the angle
-
Pause: Click the red Pause button to stop looping the angle
-
Regen Noise: Click Regen Noise to regenerate the noise value
Desktop Controls
- key Z: Save the current pattern as a PNG image
- key Space: Toggle animation on/off
This work is licensed under CC BY-NC-SA 4.0




ลูกทุ่งสีสัน
เมื่อต้นเดือนที่ผ่านมา ผมลองทำโปรแกรมสำหรับสร้างเรขาคณิตบนระบบกริด (grid) ขึ้นมาเพื่อใช้เป็นเครื่องมือทำงานศิลปะ เลยคิดว่าปรับปรุงอีกนิดหน่อย แล้วอัพโหลดมาเก็บไว้ ก็น่าจะเป็นประโยชน์ ก็เลยแก้ไขปรับปรุงนิดหน่อยเพื่อให้เหมาะสำหรับการใช้บนเวบไซต์ได้ครับ (หวังว่าจะใช้ได้)
หลักการทำงานแบ่งเป็น 3 ส่วนหลัก:
-
Layout & Color สร้างตารางจากจำนวนแถว (number of rows) และคอลัมน์ (number of columns) พร้อมกำหนดสี (color)
-
Distortion & Bias ปรับสัดส่วนและบิดเบือน (distortion & bias) ของแถวหรือคอลัมน์ ให้รูปทรงดูโค้งงอหรือเอียง
-
Angle & Noise เลือกโหมดการบิดองศา (angle mode) แบบต่าง ๆ และปรับ noise เพื่อสร้างลวดลายที่หลากหลายมากขึ้น
ผมตั้งชื่องานชุดนี้ว่า "Chromatic Fields" ด้วยเหตุผลที่ไร้สาระ ไม่มีปรัชญาลึกซึ่งใดใด คือถึงแม้จะเป็นการทำงานกับข้อจำกัดของกริดขาว-ดำ ก็สามารถทำให้เราเห็นภาพเป็นการเกลี่ยพื้นผิวไล่ระดับให้ดูมีมิติได้เช่นกัน เลยล้อเลียนตัวเอง ด้วยการใช้คำว่า Chromatic ในชื่องานที่เป็นขาว-ดำครับ (อันที่จริง ตัวโปรแกรมที่ทำมาก็มีฟีเจอร์ที่สามารถเลือกสีอื่นได้เช่นกัน)
โดยรวมก็คงไม่มีอะไรมาก ผมนำโปรแกรมต้นฉบับที่ทำไว้ใช้งานเอง มาปรับให้ใช้งานผ่านเว็บไซต์ได้ง่ายขึ้น นอกจากเป็นการฝึกสมาธิแล้วยังเป็นการฝึกนิสัยตัวเองด้วย ให้จัดระเบียบโปรแกรมที่ทดลองทำไว้ให้สะอาดเรียบร้อยครับ
ขอบคุณครับ
Saranont Limpananont
2025.04.19
*This program was made using p5.js, a JavaScript library for creative coding.
