Solidarity with Iran

Hi all, as some of you may know, Iran has been going through an incredibly difficult time recently. Communication into the country has been heavily disrupted, including landlines, mobile service, and the internet. A small number of people can get online through Starlink, but most cannot.

From what we are hearing, extreme force has been used against people, and countless civilians have been killed.

I made this Pixelblaze pattern in solidarity with my people. While working on it I felt sad, worried, and hopeful, and I honestly cried at one point. The piece is my attempt to show people being silenced, mourning, and fighting, then moving toward a brighter world lit by “lion heart” energy. The lion is a symbol of courage in the streets, and also a nod to Iran’s historical lion-and-sun emblem.

I’m sharing the code here as a small voice, faint but present, for people whose voices are being silenced. The code is already on the marketplace and it’s called “Iran - Solidarity”.

Here’s the model I am using to show this pattern on my tree:

function (pixelCount) {
// ==========================================
// MASTER SWITCH
// ==========================================
// true = Perfect Spiral (For Coding/Preview)
// false = Calibrated Tree (For Physical Deployment)
var simMode = false

// ==========================================
// CONFIGURATION
// ==========================================
// Set to 0.0 because you mentioned it’s a cylinder (Oak tree)
// Set to 1.0 if you want it to look like a cone again
var coneTaper = 0.0

// — DATA FOR PHYSICAL TREE ONLY —
// Measured Pixel Counts (Row 0 to 15)
var rowPixels = [
31, 29, 28, 27, 26,
25, 25, 25, 24, 24,
24, 24, 24, 24, 24,
20
]

// Measured Shifts
var rowShifts = [
2.0, 1.2, 1.0, 0.5, 0.0,
-0.4, -0.4, -1.4, -1.3, -1.5,
-1.5, -1.5, -1.3, -1.6, -2.5,
-2.0
]

var map =

// ==========================================
// MODE A: SIMULATION (Perfect Cylinder)
// ==========================================
if (simMode) {
// 16 Loops to match your physical tree
var loops = 16

for (var i = 0; i < pixelCount; i++) {
  var pct = i / (pixelCount - 1)
  var z = pct
  var r = 1 - (z * coneTaper)
  var theta = pct * loops * 2 * Math.PI
  
  var x = r * Math.cos(theta)
  var y = r * Math.sin(theta)
  
  map.push([(x + 1) * 0.5, (y + 1) * 0.5, z])
}
return map

}

// ==========================================
// MODE B: DEPLOYMENT (Calibrated Map)
// ==========================================
var totalRows = rowPixels.length
var mappedCount = 0

for (var r = 0; r < totalRows; r++) {
var pixelsInThisRow = rowPixels[r]
var pixelShift = rowShifts[r]

// Z-Height calculation
var rowBaseZ = r / (totalRows - 1)
var rad = 1 - (rowBaseZ * coneTaper)

// Process pixels in row
for (var i = 0; i < pixelsInThisRow; i++) {
  if (mappedCount >= pixelCount) break;

  // Calculate Angle with Shift
  // LOGIC UPDATE: We use minus (-) here to match the calibration tool logic.
  // If shift is 2.0, pixel 2 becomes the "Front" (Angle 0).
  var pct = (i - pixelShift) / pixelsInThisRow
  var theta = pct * 2 * Math.PI

  // Slight Z-climb to prevent visual overlap in map preview
  var z = rowBaseZ + ( (i/pixelsInThisRow) * (1/(totalRows*8)) )

  var x = rad * Math.cos(theta)
  var y = rad * Math.sin(theta)

  map.push([(x + 1) * 0.5, (y + 1) * 0.5, z])
  mappedCount++
}

}

// Handle leftovers
while (map.length < pixelCount) {
map.push([0.5, 0.5, 1.0])
}

return map
}

3 Likes