📜 ⬆️ ⬇️

3D illusions

General:


Madonnari - one of the types of street art, very popular in the world. The drawings are made on the sidewalk and distorted in such a way that the illusion of a three-dimensional object appears when you look at the drawing from a certain point. Many artists use methods developed in the sixteenth century to make such drawings. Some graphics packages, such as Photoshop, allow you to distort images in this way. However, they cannot build illusions at the junction of two planes, and the point of view cannot be predetermined, since this tool is designed to remove perspective distortions, and not to build illusions. An example of a program (my term paper), which allows you to build 3D illusions at the junction of two or three planes with a choice of viewpoint from which a spatial effect is created. I have not heard about the existence of graphic packages that are designed to build 3D-illusions on one or several planes (although I investigated this question on purpose). Despite the simplicity of the implementation, the idea to create such a graphical tool seemed to me very interesting.

Introduction:


Anamorphosis is the art of building intentionally distorted images that, from a certain point, restore the original look. The art of Anamorphosis was invented in China and brought to Italy in the sixteenth century. Probably one of the most spectacular and impressive examples is Madonnari's Anamorphosis, a street art form. The central object of art in Italy in the sixteenth century was Madonna, apparently it is the reason for the name "Madonnari".

This type of art is very popular in our time, and many companies use 3D illusions for advertising. An example of such illusions is shown in the figure. image
An experiment was recently launched in Canada, in which the speed of vehicles is controlled by an optical illusion made on the road (this experiment is conducted by the Road Safety Foundation in British Columbia).
')

Mathematical model:


Suppose we want to get the illusion of the image in three planes. Consider a Cartesian coordinate system in space.
image
Thus, the task is to build a projection of the image plane on the coordinate plane. Let (u1, u2) be the coordinates of a pixel in the image plane, (v1, v2) the coordinates of pixels in one of the coordinate planes. It is necessary to obtain a projective transformation between two planes. Such a transformation is a rational function of the form.
image
To find the ten K factors, we need to know the set of five points (u1, u2) and the corresponding set of points (v1, v2). These sets can be found from a geometric point of view (see the drawing with a Cartesian coordinate system). If we substitute these points in the above equation, we obtain a system of linear equations, the variables of this system are the coefficients K from the same equation. As a result, we obtain:
image
The program works with bitmaps. The user can enter the coordinates of the point and the size of the file where the illusion will be built. After that, images can be selected to be placed in 3D space, dimensions can be resized, and they can be projected onto a plane (or planes), where the illusion is built. The result of the program is a file-image, which is printed and viewed from a certain point. The result of the program is shown in Figures 5 and 6. If the image in Figure 5 is printed, bent and viewed from a certain point, this will create an illusion (shown in Figure 6).
figure 5
image

image

A small presentation of the program:


Worked on the project: I and Yelchugin Evgeny.

Source: https://habr.com/ru/post/120384/


All Articles