How to Make 3 Dimension Image?
Once we know how the concept of 3-dimensional image (see The magic of 3D images), it is now time for us to make.
Make The Model of 3 Dimensional Image
As we already know how to move a virtual object into the paper, then the whole object should we broke up into pixels. The pixels are then we save it as a model image.
The model image is a two-dimensional array containing the pixel distance information from the eye of the observer. And to make it more easy to be seen, so this distance information is using pixel color.
If we look again at how to move the pixels of the virtual object to the paper, then P1, P2, P3, and so on should be a pixel with the same color. Therefore, actually we can store information in the model image in the form of how much the distance of certain pixel from the previous one. In this way, it would be very easy for us to change the model images into 3-dimensional image.
Sample of model image for the heart image is as follows:
The white color is a color with the highest value, ie FFFFFF. While black is the color with the lowest value, ie 000000. The more light a pixel, the pixel farther from the eye. Therefore, the colors on the model image will be different from coloring to create an image with three-dimensional impression as shown in the Cute Heart Image.
Make a 3 Dimensional Image Skin
3-dimensional image skin is an image that will be visible.
The width of the skin image is pixel-width of the farthest distance from the model image. The height of the skin should be as high as the model image or if less, then we can restart from the top most of the skin image pixel.
The most important thing to consider in designing the skin is to make the pixel image on the far right must be connected with the leftmost pixel. This is so that when the skin is tiled to the right at the time of formation of 3-dimensional image, the image of the skin will feel connected and no visible gap. And if we make the skin height is less than the higher model image, the bottom pixel of the skin must also be connected with the top pixel.
Example of skin image is as follows:
Convert Model Image into 3 Dimensional Image
Once we set up both the model image and skin image, then we can create 3-dimensional images in the following way:
- Place the skin image as result image on the leftmost of result image
- Read each pixel from left to right.
- At each reading, we have to fill in the pixels of the result image at the X position, with the pixels of the result image on the X position subtracted by the distance information stored in the model image for the X position. If the X position of the result is smaller than zero, then we do not need to make changes again, because the pixel at that time must have been filled from the skin image.
- The above step is done from the top pixel to the bottom pixel.
From the steps above, we can obtain three dimensional images like the following:
So, is there any one falling in love after see my face? 🙂
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.Please notice that comment or question submitted should match the topic.