Pavilion Mapping

My wife has a medieval style pavilion. It is basically a small circus style tent that is held up with a central pole that has 16 spokes sticking out to hold up the structure. I’ve festooned it up with leds such that a string runs (1) out from the central axis along each even spoke to the tent wall, (2) then to the next odd spoke, (3) back to the central axis, (4) and then down to the floor. It looks like this

image
I’m adapting the old fastled code which was split to each strip, such that each strip is independent using the pro driver and then adding patterns that use the XYZ mapping.

The map generating code looks like this.

function (pixelCount) {
var map = [];
pixels_per_string=240
numstrings=8
initial_offset=10
num_first=50
//num_arc=30
num_second=initial_offset+num_first
num_arc=num_secondMath.PI * 2/16
numpole=pixels_per_string-num_first-num_arc-num_second-1
for (k=0;k<numstrings;k++){
for (i = 0; i < num_first; i++) {
c = k / 8 * Math.PI * 2
map.push([Math.cos©
(i+initial_offset), Math.sin©*(i+initial_offset),0])
}
for (i = 0; i < num_arc; i++) {
c = (k+i/num_arc/2) / 8 * Math.PI * 2
map.push([Math.cos©num_second, Math.sin©num_second,0])
}
for (i = 0; i < num_second; i++) {
c = (k+0.5) / 8 * Math.PI * 2
map.push([Math.cos©
(num_second-i), Math.sin©
(num_second-i),0])
}
for (i = 0; i < numpole; i++) {
c = (k) / 8 * Math.PI * 2
rad=5
map.push([Math.cos©*rad, Math.sin©*rad,-i])
} }
return map
}

3 Likes

That’s a great use of the mapping function. I’d love to see pictures or video of the pavillion in use!

1 Like

Me too :v . It’ll be a while before we have a chance to put it back up.