I82Much / BrickMosaic

A program for converting images into LEGO mosaics
MIT License
3 stars 0 forks source link

Improve grid layout algorithm #7

Open I82Much opened 10 years ago

I82Much commented 10 years ago

e.g. look at attached image - no standard build would ever waste so many small pieces. Could imagine teaching it things like how it's good to alternate rows for rigidity/strength.

screen shot 2014-02-22 at 12 30 34 am

I82Much commented 10 years ago

Also the asymmetry is very ugly. darth vader explanation of problems

I82Much commented 10 years ago

First attempt alternates left, right, top, bottom. But I forgot that all of the 'extents' of the pieces assume that we're going left to right, top to bottom. Makes a pretty cool screw up though. screen shot 2014-02-22 at 12 27 59 pm

I82Much commented 10 years ago

OK fixed the bugs (off by one errors). Looking much better in symmetrical case. As of commit https://github.com/I82Much/BrickMosaic/commit/d408332fdcdb38036eee77736bb3567bc8647739

screen shot 2014-02-22 at 10 23 20 pm

I82Much commented 10 years ago

The stair stepping in the head is really bad. Probably can't be helped with greedy algorithm though.