# Mapping of my Dreamcatcher pixels

I built this dreamcatcher/tunnel thing you see here:

and in other posts on the birdsite.

I want to create a mapping for the pixels.
Its basically a Spiral with 200 points.

21 in the second winding
19 in the third…

The pixels are not very symmetrical but point to point is 10 cm distance
I think some kind of math that calculates a spiral and the points get tighter towards the middle will do the trick.

I would be super thankful if you would come up with something nice to describe this structure.

“An Intro to Pixelblaze code” looks like this video:

Is this even the right category for mapping questions?!

1 Like

Hi @overflo!
I think I understand, you run loose led wire around once, such that they all have the same height, then weave another ring through that, also at the same height? Have details on how these are constructed? It’s quite cool!

So if we map each ring on the XY, we can calculate that with some sin/cos based on angle, which we can get from how many LEDs there are on the first circle. Then we repeat for smaller and smaller number of LEDs. Each smaller ring has a different Z coordinate, and also a smaller radius. Is each loop always 2 fewer pixels, with the last (since its odd) being right in the center? Does the transition between rings happen at the same place (looks to be on the left in the video), or do they shift?

When I throw LEDs on my Christmas tree, I hack a spiral or helix map until it roughly matches, and the effect is still decent! Even if we only roughly get it right, it can still look quite good for patterns.

Another way to do it would be to take a photo from underneath with all pixels on slightly, and give it a try with this 2D image based pixel mapper if you know the order by sight. The Z could then be recreated based on the radius from center or pixel index.

Heheh, I literally have my led Dreamcatcher sitting here 75% done (I posted a photo of it finished, but then I took it apart cause I’d screwed up the rim, and in redoing, improved on the technique. And then I had a pixel go dead as I was wrapping, and put it aside to remove the dead one (which with these preaddressed pixels is actually a small problem, I’ll have a missing pixel I need to account for in the map count.)

Yes, the 2d photo mapper is a good idea for an XY mapping

For Polar, I’d just take a ruler and an angle measure, and measure the pixels, for maximum accuracy. Distance is relative and the angle is too, so long as you measure the right direction (counter clockwise from 3o’clock)

However, you also need to decide in where the center is. True circle center, or wrapped center (which is what is visible in the video).

You could actually measure both ways (2D and true center will be/should be analogous, and math verified by the other), and have 3 mappings all of which would be useful.

Thanks for getting back so fast!
The construction is a spiral 20 meter long, 10 cm between the pixels.
The first 6 circles are almost at the same height and then it iterates into the ceiling in another 20 or so windings.

The closer the pixels get to the center the more assymetrical it becomes.
But i think this is no problem at all, a mapping that is “close enough” will do.

When i built this dreamcatcher i followed instructions from this video (relevant parts @ 5:00)
The outer diameter of the ring is ~ 80cm, I used a cheeap hula-hoop i found at a local market.
I used zipties at each intersection.

The leds i got super cheap from aliexpress. including a controller, that i cut off.

They are some neopixel derivate where each pixel “knows” its position.
That means, its cheaper to produce as there is only a single shared dataline between all pixels and the signal is not reshaped at each pixel as it is the case with normal WS2812.
It also means, it can not be very long, but it works goof enough for these 200 led strings.
If you want to build your own make sure to get the 200 pixels for 80 cm diameter or 100 and make it smaller.

Building this thing was more work than expected, but it turned out to be super beautiful.
Just plan for 3-4 hours of construction work with zipties and pliers.

UPDATE:
i used bens totally rad pixelmapper he linked in the comment above.

This is my final mapping in case you are curious:
[
[361,515],
[374,654],
[411,779],
[481,901],
[597,976],
[723,1054],
[862,1045],
[1027,1042],
[1151,976],
[1275,859],
[1364,747],
[1388,597],
[1398,465],
[1337,323],
[1261,208],
[1156,126],
[1035,73],
[902,58],
[778,52],
[664,104],
[556,172],
[481,266],
[433,358],
[409,479],
[432,593],
[469,712],
[503,822],
[614,910],
[724,953],
[858,975],
[990,946],
[1143,888],
[1219,790],
[1322,677],
[1302,541],
[1332,395],
[1232,284],
[1174,181],
[1035,136],
[914,93],
[775,115],
[665,149],
[564,221],
[512,332],
[459,441],
[493,566],
[536,677],
[571,818],
[715,841],
[832,891],
[963,896],
[1079,820],
[1197,736],
[1221,609],
[1276,476],
[1227,342],
[1136,249],
[1028,173],
[889,152],
[781,153],
[661,199],
[585,292],
[542,398],
[507,523],
[564,642],
[648,715],
[718,824],
[853,841],
[947,770],
[1083,763],
[1144,650],
[1175,549],
[1225,414],
[1128,326],
[1050,230],
[931,186],
[807,204],
[697,235],
[599,298],
[566,412],
[590,528],
[625,624],
[698,721],
[785,775],
[880,752],
[999,720],
[1101,668],
[1122,561],
[1106,434],
[1089,331],
[996,228],
[878,220],
[780,253],
[678,298],
[617,371],
[614,477],
[671,582],
[737,641],
[810,709],
[915,724],
[1013,664],
[1081,589],
[1077,480],
[1057,391],
[992,293],
[835,286],
[733,320],
[692,356],
[648,434],
[688,533],
[738,604],
[819,656],
[924,650],
[991,592],
[1042,528],
[1082,431],
[1015,350],
[916,302],
[816,306],
[732,360],
[707,443],
[746,522],
[778,587],
[843,626],
[934,602],
[985,555],
[1012,460],
[998,387],
[938,330],
[850,316],
[776,359],
[747,428],
[769,489],
[797,530],
[820,571],
[871,579],
[924,555],
[959,525],
[991,479],
[978,414],
[959,367],
[897,330],
[820,346],
[783,393],
[775,451],
[807,498],
[829,532],
[862,552],
[905,532],
[941,502],
[961,466],
[979,438],
[953,391],
[931,366],
[903,351],
[861,346],
[838,360],
[813,383],
[796,410],
[801,451],
[816,482],
[843,502],
[886,515],
[926,486],
[940,456],
[937,419],
[925,388],
[903,373],
[871,368],
[843,377],
[822,411],
[821,434],
[833,461],
[848,484],
[875,488],
[911,478],
[924,441],
[921,401],
[895,385],
[870,377],
[850,398],
[841,419],
[846,443],
[855,457],
[886,465],
[908,448],
[907,420],
[901,398],
[885,393],
[867,398],
[858,415],
[860,431],
[874,442],
[898,441],
[911,428],
[907,411],
[887,401],
[875,406],
[870,421],
[885,432],
[891,416]
]

1 Like

yes, very similar to mine, same leds even.

I really like the ziptie idea, I may use that in my next iteration.
I’ll post some mapping code but honestly, I suspect it’s non-trivial to accurately map via code. I strongly recommend for a first pass, use Ben’s 2d photo mapper (linked above)

@overflo,
Is it always 2 pixels less each circle? If not, do you have a list all the way in?