The pointer to the Hungarian Method helped me to understand that my problem can be described as a linear programming problem with each area/potential color pair being a variable that can take a binary value. After thinking and reading about the problem a little bit, I found this discussion on (again) Stack Exchange. But here my day job as an applied economist came in handy. After implementing a first ‘greedy’ match, my results looked very similar. Given my experiences with the web-based conversion tools available (I am entirely sure that I overlooked some) I was not optimistic. With the second bullet point of my “specification list” knocked off, I moved on to focus on the automated conversion. I thought about ways to implement this efficiently in shiny and then I ran across this wonderful shiny module offered by Garrick Aden-Bule. This looked like another road block, given my time budget for my toy project was only a few days and mostly the early hours where the rest of my family was sound asleep. Second, after playing with the editing interface, I quickly noticed that a proper undo feature is really important for it to become usable. Another feature of this, the changing text color depending on the background, is based on this Stack Overflow snippet pick_text_color_for_bground 0.5, "#000000", "#ffffff") I am a CSS noob so this one would have been very hard for me without the help of this Stack Overflow discussion. If (x 1) identify_area(area, x, y - 1, color) If (is.null(color)) color 1) identify_area(area, x - 1, y, color) # as well as an img raster containing the actual data # needs to be defined prior to calling identify_area() # Writes to a matrix is_area in a higher environment so this # This identifies areas with the same color within a 48*48 bitmap Flood-fill is one of these neat examples for the power of recursive algorithms and with the help of Wikipedia implementing it was almost to easy. 1Īfter selection has been taken care off, I wanted to implement flood-fill selection so that users can easily select areas that they want to convert. This often goes unnoticed but I believe that this platform has developed to one of the most important knowledge resources for software development and even regularly informs academic research. I reference this here not only to give its participants the credit that they deserve but too highlight the maaaanny times that I benefited from the Stack Exchange universe. I quickly found this discussion on Stack Overflow that helped me to get the idea. How does one select pixels from the image for modification? Time to google. And, if all that were not enough, the program is absolutely free to download and use.LEGO Mosaics have been around for a while and there is the wonderful before, so: Why not? Time to produce a first screen shot. Thus, you can try an unlimited amount of combinations using the program before purchasing the definite set of parts. A very interesting feature of the program is the fact that you can create automatically a custom box with all the parts needed for constructing your project with real Lego blocks, and send it to the Lego shop to purchase the actual pieces to construct your project in the real life. Far from being a disadvantage, this limitation keeps the spirit of the toy, since part of the fun and the challenge is precisely to construct things with the limited resources available. The program allows you to use all the types of blocks and parts available in the real toy, of course, in all the colors available thus, custom colors or components are not allowed. You can use it to design any project you have in mind, or modify any of the predesigned projects included in the program. The Lego Digital Designer is like having a virtual Lego with an unlimited amount of blocks and accessories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |