Wednesday, September 26, 2012

Christmas Light Wireframe Design Helper Program

I created a program to help me with designing wireframe sculptures for Christmas lights. I figured it might help others, so I've included it here with versions for windows, mac and linux, as well as the source code.
This is the first year I'm doing wireframes for my light show, and I was struggling with how to make it the right size to fit the light strings so that I wasn't left with a bunch of lights to cover up. This program allows you to design the wireframe and then scale it to fit light strings so that it comes out perfect.
DISCLAIMER: This program is not perfect. I'm sure it's full of bugs, however it works for me and if it works for you, that's great. I may be able to help with some problems or fixes, but I have a family and a full time job, as well as working on my lights for this year, so don't be surprised if I don't answer questions right away :)
Now that that's out of the way, here's what the program looks like. I'll try to explain how it works, and maybe do a video later.  Click on the picture for full size.
So I hope it's easy to use, but basically you can drag the black points around to make your shape and the lights(red) will follow. The larger dot is the starting point. You can add and remove points in the line by clicking the "Add Point" and "Delete Point" buttons. You can load a background image to trace by clicking the "Load Image" button. The checkbox next to it will turn the image on and off. The colors of the points, lines and lights can be changed by clicking on the color pickers on the bottom right. You can also turn each one on and off with the checkboxes. On the left, you will see places to enter the number of lights on your string, as well as the spacing you want between each light. I haven't put any limits on these entries, so use some common sense :)  Below that are the measurements of your design. It gives overall width and height, as well as the length of rod you will need for your wireframe. You can adjust this using the sliders to change the scale. The large slider will make big changes, and the small one will give you finer control to get it just right. Above the sliders you will see "Extra Lights". This tells you how many lights will be left over. If you click on the "Auto Scale to Lights" button, it will adjust the scale so that it perfectly fits the lights and spacing that you entered. Lastly, you can save your design or open a previous one by clicking the appropriate buttons. It will save your layout and scale as well as the colors, however it will not save the background image.
I think that's it. If you have questions or comments, let me know. I hope some of you find it useful.

Thanks goes to GuruBlog for the cookie cutter code that I used as a starting point, and to Julapy for his color picker code, as well as Quark for his gui library.

Here are the download links. They all include the Processing source code.
EDIT: New version fixes a small bug with background image loading
Download for Windows v0.2
Download for MacOS v0.2
Download for Linux v0.2

Old Version:
Download Windows Version
Download MacOS Version
Download Linux Version