"Fairy" lights in a matrix on a clear vinyl sheet

No I appreciate it, I never could have imagined the extent kids require, the experience is vastly more challenging than my predictions haha

Good to hear you’ve got project time back, I’m so desperate for some it’s become as elusive as winning the lottery!

1 Like

It also doesn’t have to be binary: if it’s 0…1 then you could multiply by the Z value. For example, gradient mask, antialiased shapes, or any image revealed by persistence of vision.

Or, say, something more complicated than simple multiplication …

if (z <= 0.5) {
    Value = Value*z
} else {
    Value = (1+sqrt(Value*z))/2 
    Saturation = Saturation - (2*z) - 1
}
1 Like

I stuck the completed section up on the window, looks great it’s very stealth and plenty bright, 40% is a reasonable match to my Christmas lights. I wish I had time to do the second section! Also does anyone know if there are any patterns with christmas shapes already made? Like a tree with lights or a candy canes or something?


6 Likes

Really clever build and stunning results. As wizard said the illumination of the hot glue is fantastic. Diffusion is such a visual multiplier. I also love the transparent background. It looks great in the window and doesn’t block the light.

Hope you find the time you need to complete the second one!

2 Likes

Thanks! I was surprised upon looking for low power, small addressable LED products there really weren’t many out there. Ideally i was hoping to buy a mesh like “curtain” pre fabricated but never did find one made of these!

1 Like

I’ve seen them, but they are quite expensive (hundreds of dollars). Your method is way better.

What sort of vinyl did you use? Thickness? Cost?

We don’t have a lot of matrix-y “display” patterns (yet?), Especially ones that work on arbitrary sizes.
Doable, but not yet. Likely some SDF shapes.can be done ( @zranger1 and I were collecting shapes but we’ve both been focused elsewhere)

@jeff 's polar Christmas topper might have some good stuff for you. But it’s polar mapped, and I wonder if it needs to be to rewritten for normal matrixes? @jeff ?

1 Like

I found a vendor on aliexpress selling fairy wings full of LEDs … but not programmable, and when I asked they said they couldn’t do it. :confused:

I’m stuck dealing with non-fun IRL stuff for the next little while, but here’s a really simple SDF-based dancing tree pattern that should work on most 2D displays. (I left a little code for other shapes in so you could add stars and decorations and other stuff as you like!)

// Simple SDF Dancing Christmas Tree
//
// MIT License
// Take this code and use it to make cool things!
//
// 2021 ZRanger1

// UI control variables
export var objectSize = 0.4;
export var lineWidth = 0.1;
export var dance = 0;

export function sliderDance(v) {
  dance = (v >= 0.5);
}


function signum(a) {
  return (a > 0) - (a < 0)
}

// signed distance functions for various shapes, adapted for 2D. 
// Math from https://iquilezles.org/www/articles/distfunctions/distfunctions.htm
function circle(x,y,r) {
  return hypot(x,y) - r;
}

function square(x,y,size) {
  dx = abs(x) - size;  d1 = max(dx,0);
  dy = abs(y) - size;  d2 = max(dy,0);
	return min(max(dx, dy), 0.0) + hypot(d1,d2);
}

function triangle(x,y,r) {
	return max((abs(x) * 0.866025) - (y * 0.5), y) - r / 2;
}

function hexagon(x,y,r){
     x = abs(x); y = abs(y);
     return  max((x * 0.5 + y * 0.866025),x) - r;
}

function hexStar(x,y,r) {
  // rescale to pointy parts of star
  x = abs(x*1.73205); y = abs(y*1.73205); 
  dot = 2 * min(-0.5*x + 0.866025 * y,0);
  x -= dot * -0.5; y -= dot * 0.866025;
  
  dot = 2 * min(0.866025*x + -0.5 * y,0);
  x -= dot * 0.866025; y -= dot * -0.5;
  
  x -= clamp(x, r * 0.57735, r * 1.73205);
  y -= r;
  return signum(y) * hypot(x,y) / 1.73205;
}

// interior distance on this is slightly weird. Still
// looking for a reasonable fix.
function cross(x,y,size) {
  x = abs(x); y = abs(y);
  
  if (y > x) { tmp = x; x = y; y = tmp; }
  qx = x - size; qy = y - size / 5;
  k = max(qy,qx);
  if (k > 0) {
    wx = max(qx,0); wy = max(qy,0);
    return hypot(wx,wy);
  } else {
    wx = max(size - x,0); wy = max(-k,0);
    return -hypot(wx,wy);
  }
}

function tree(x,y,r) {
  var d = triangle(x,y+.225,r*0.175);
  d = min(triangle(x,y,r*0.3),d);
  d = min(triangle(x,y-.2,r*.5),d);
  d = min(square(x,y-0.47,r*0.01),d)
  return d;
}

translate(-0.5,-0.5);

var t1, timebase;
export function beforeRender(delta) {
  timebase = (timebase + delta/1000) % 1000;
  t1 = timebase * 10;
}

export function render2D(index,x,y) {
  var d,radius,th;
  var v = 0;
  
  // Introduce a sinewave "wiggle" along the x axis. 
  // Caution: This is neither subtle nor tasteful!
  if (dance) {
    radius = 1.2-hypot(x,y)*2.4;
    th = radius * radius * sin(radius + t1);
    x = (cos(th) * x) - (sin(th)* y);      
  }

  d = tree(x,y,objectSize);
  v = 1-(d/lineWidth);  
  h = (y < 0.41) ? 0.3333 : 0.0124;

  hsv(h, 1, v)
}
3 Likes

Actually, with this technique, you could pretty easily take some existing fairy wings (or make some) and hot glue fairy lights to them. I’d suggest not having wires sticking up/out. I’ll have to see if I’ve got some to do this to. (I have a large cheap costume collection)

Awesome! I had just started trying to adapt the geometry morphing demo to do exactly this but obviously having never written a pattern myself yet I ran up against some required learning and got pulled away before I could finish (or even make a dent? haha)

I will try yours out, thank you!

1 Like

I thought about asking for custom but figured they were probably selling so much in time for Christmas they wouldn’t be interested in my custom order.

My wife grabbed it from the fabric store I think it was 6mil and only a couple bucks a meter. It’s actually thin enough to “static cling” to the window however I did fasten it at the top anyway.

1 Like

It’s looks really good! Thanks again for this.

I added some yellow bands and tweaked the shapes. I learned a lot while trying to add “lights” as I wanted them to be fixed to the tree but still move with it. I know how I can’t achieve this effect now at least and discovered which way to go next but I’ve run out of time so this will have to do!

I did try a few other things like diagonal bands and rainbow colours etc but at the end of it I preferred this version.

4 Likes

I think just wrapping the renderer with a cartesian-to-polar transform should do the trick:

r = hypot(x, y)
phi = (atan2(y, x) + PI_2) % PI_2
2 Likes

Rainbow Color Alas Led Wing With Led Lights Isis Wing Glowing Isis Dancewear Remote Control Circus Led Light Luminous Costumes| | - AliExpress ← watch the video, these are clearly … somewhat addressable. The specifications don’t reveal much.

1 Like

Like this?

4 Likes

Exactly like that, wow. Perfect! I looked for so long haha. Okay so I want double density but I can interlace them for that.

Kudos to @Scruffynerf and @zranger1 for the work on SDF and seven segment functions. Got a new year’s pattern going.

4 Likes

Nice!

Needs a good scrolling 2022… Adjusting the center of the shape should do that.

So $60+ for 20x20 (400pixel) grid with 10cm spacing… Good price point to keep in mind.

Since 2 200 strands would require a output expander, this ends up cheaper than DIY likely, and yes, you could interlace and get roughly 5cm spacing for 800 pixels with 2.