![]() ![]() ![]() This will always ensure you have rectangles. ![]() Code: Text -Begin with a single Slice (this will be the whole image)Repeat until you have enough slices I think I will try to prototype this Idea on the weekend - Thanks I have to use only rect-shapes, because the puzzle will be jpg + javascript based, so there is no way to overlay other shaped images (because of the missing transparency). Good idea Mouser :) But I think keeping track of only producing rect-shapes will be very tricky. (note you'll have to do this a bit differently if you only want rectangular shapes pieces) Now simply REMOVE random edges until you have the desired # of pieces. Start by imagining a very large grid that divides the entire picture into a grid where each square is X by Y. I have no idea how to do this.Ī non-intuitive approach might work well. The resulting images (parts) should not be smaller than X pixels and not larger than Y Pixels. The algorithm I'm searching must be capeable of slicing any image in a variable amount (which is set by the player) of parts. But how could I divide in into randomsized parts like this: Dividing an image into even sized parts like this: I need this for some kind of puzzle game I'm writing with a friend. I want to divide an image into random sized parts. How to divide an image into random sized parts? ![]() ATTENTION: You are viewing a page formatted for mobile devices to view the full web page, click HERE. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |