Introduction: Generative Art Bike Paint Job
Earlier this year, I bought myself a second-hand beat-up road bike. It was covered in scratches and was starting to show signs of rust in places. The bike wasn't anything special, but I decided that I'd paint it pink because pink is the best colour. At first, I thought this would be a quick and dirty job, but 3 months later, a custom Inkscape plugin, bike-sized vinyl stickers, and a number of replaced parts, it appears scope creep got the better of me.
Step 1: Striping the Bike Down
The only parts of the bike I wanted to paint were the frame and forks. My first challenge was then to strip down the bike so I could easily access just these parts. I wouldn't say I knew much about bikes when I started this project, but taking apart a bike and putting it all back together is a great way to learn!
To make sure I knew how everything went back, I took lots of pictures of each of the parts I was removing and made sure to keep everything separate.
Taking the bike apart wasn't without casualties though. I managed to strip the threads on the inside of the crank that were used to pull it off the bottom bracket. I had to bring the bike to the bike shop for them to remove this for me with an angle grinder. Also, the stem had managed to corrode itself stuck into the fork tube. No amount of degreaser, penetrating oil, and brute force could get it unstuck. I hade to resort to chopping the stem off with a hacksaw and then using the saw blade to cut out the stem from the inside. By hammering the piece from the bottom side of the fork, I eventually managed to get it out.
After getting the forks free and all the remaining parts off the bike, I removed the decals with a craft knife and gave the parts a thorough clean with a bike cleaning product.
The plan was to paint the bike with a base colour, and then have a vinyl sticker mask. I'd then coat the bike with a final coat and remove the mask. I would then be left with the pattern on the bike.
The next step of the project was then to measure up the parts of the bike I was going to make a mask for. The way I did this was to measure the lengths of the tubes with a tape measure. Then for all the more complex joints, I covered them in masking tape. I cut around these parts with a craft knife and removed the remaining tape. The tape created a 2D unwrapped version of the joints of the bike. I used a pair of calipers to measure some of the other dimensions as well.
One thing I kept in mind was where the seam would be in the final design. Even though I was hoping that my pattern would match all the way around the tube, I knew that any small mismatch might be quite obvious. I made sure to have all the seams at the bottoms of the tubes where it would be less obvious.
I then scanned the shapes to bring them onto my computer and trace around them in the vector graphics toolinkscape.。I could import the scanned page with all the unwrapped joints into my Inkscape document. I just had to scale it so the dimensions in Inkscape matched the dimensions that I had measured on the bike.
第3步: Writing an Inkscape Extension
What I love about open source software such as Inkscape is that it is often very easy to get started hacking around with code that interacts with the program through extensions and plugins. There are some good examples of extensions that come pre-installed with Inkscape that I played around with to come up with my own. Since this was really only going to be a one-off project I didn't polish up the code very much and I would call it more of a hack than anything else.
插件“看到”的作品被选中时,n converting that to a bitmap, it then runs the algorithm over the bitmap for a number of iterations, then converts the resulting bitmap back to an SVG and inserts it back into the original file. The code for running the pattern generation is mostly modified fromBen Maier's great python tutorial on Turing patterns。
I've attached the extension here. In order to enable it put the files in your default Inkscape extensions folder. The "diffusion_reation.txt" file needs to be renamed to "diffusion_reaction.inx" - Instructables won't let me attach files of that format.
Step 4: Using the Inkscape Extension
追踪形状从步骤2,我创建的a solid object in one colour. I then put a black background behind the object to create a rectangular-shaped boarder. The extension converts the input into a rectangular bitmap and treats the world as a torus (so the edges match). The bits in black tell the extension not to simulate the pattern there. I then covered the shape with a bunch of other shapes in another colour, this doesn't really matter much, but these shapes act as "seeds" for the pattern to work from. By having lots of "seeds" it means that the simulation needs fewer cycles to propagate fully around the shape. This is good because the simulation is pretty inefficient and takes lots of time anyway. To run the extension I went to "Extensions>Diffusion Reaction". It comes up with a prompt about how many cycles to run for and the dpi (dots per inch). Higher dpi and more cycles take longer but may create a more complex and finer pattern.
After running the simulation, it should insert the pattern back into the Inkscape document in the same position as the original shape.
Step 5: Creating the Vinyl Stickers￼
The vinyl comes on a large roll which is perfect for the long stickers that are used for the tubes of the bike.
The first layer was a "Smoothing Putty" that helped cover the remaining rust and scratches. The next layer I put on was a light blue. and finally, I used a darker blue to blend into the light from the bottom of the frame upwards. This created quite a nice effect, and I wasn't too worried to make a mess of this step, because the colors were quite close, and the pattern would be covering most of this anyway.
After letting the paint dry overnight, I set about sticking on the vinyl stickers I had made. This was rather challenging, but I took my time and touched up any bits I wasn't happy with, with some extra vinyl and a craft knife. I started with the smaller sections and moved up to the larger tubes. I made sure that the sticker was properly stuck before removing the transfer paper.
Step 8: Second Colour
To give the bike a glossy finish and the paint some protection from scratches, I used a whole can of the spray.bike transparent gloss finish. This gave the frame a professional feel.
Step 10: Putting It All Back Together
I hope you enjoyed this Instructable and are feeling inspired to go and paint a bike of your own!