Based on a 10k polygon model of the Stanford Bunny (http://graphics.stanford.edu/data/3Dscanrep/#bunny)
Transform the triangles in the 3D model into 2D and render in depth order writing the index of each triangle. For each triangle, find the closest unused color C in RGB space to the target color. Then for all pixels that have the same index as the triangle, set each pixel to the nearest unused color to C, sorting the pixels by luminosity and their distance to the edge of the triangle. Draw the border of the triangle with colors closest to C/2.
For the background, sort the triangles by distance to the edge of the model. Then choose a target color based on luminosity and hue, and find the closest unused color D to the target. Set each pixel in the triangle to the closest unused colors to D, sorted by luminosity and distance to the longest edge.
|Dimensions||4,096 × 4,096|