SMART GENERATIVE ALGORITHM (SMART GEN-A): 2D ARCHITECTURAL PHOTO CONVERTER TO BE THE DIGITAL 3D OBJECT

All objects have various shapes and dimensions. When the three dimensional objects were captured by camera, the output will be two dimensional images although were captured from different angles, this will lead to some misperceptions for observer especially the one never seen the images before. To overcome these misperceptions, it was required a program which is capable of converting a two dimensional image in a digital three dimensional objects. However, conversion process takes a long time without standard measure of real objects to virtual especially for objects with different basic form. The standard is the parametric box with parametric coordinate points to allow creating virtual objects with nearly the exact size of the original. The research uses Rhinoceros 4.0 and Grasshopper to generate the algorithm. The algorithm is designed based on the basic form of object (circle, triangle and square) by using the hierarchy logic of the water gallon. The result is the Smart Generative Algorithm (Smart Gen-A) which can re-create the 2D image into digital 3D and even give the nearly unlimited possible shape for architectural reconstruction.


INTRODUCTION Background
When the 3-dimensional objects were photographed, the outcome object will be two-dimensional images.But the same thing if photographed from different angles, will get a different 2-dimensional images that arise different perception of each photo even wrong perception.For example the case study of rugby ball.When the ball captured from the front side, we will get a circular object like target board of arrow game.In different angle, we captured the ball from the left side then we get an ellipse image as Figure 1.The rugby ball case is misperception problem of 2D digital photos.To resolve this problem, we need a software to convert the 2D photo to be 3D digital object like AutoCad or 3D Image Commander.But the conversion process takes a long time if there is no standard size from real object to the virtual one.And for the different object that has no same standard shape, the conversion process must be start by devising algorithm from first step.
According to the problem, the idea is about making smart algorithm to convert from 2d photo to be 3d digital object based parametric points.From one basic shape of the object we get one algorithm.This algorithm could be used to construct another object that has similar basic shape or geometry.
The main problem in this study is how to design smart algorithm based parametric points as 2D photo converter to be 3D digital modeling automatically.The expected output from this program is standardization of 2D photo object, parametric box studio that used to get photo input, and design of Smart Generative Algorithm (SMART Gen-A).

Algorithm
The word 'algorithm' derives from the name of the mathematician and scientist from Persian, Mohammed ibn-Musa al-Khwarizmi.Algorithm is step-by-step procedure as an effective method or formula for solving a problem.Algorithm used for data processing and various calculation.More than ordinary calculation, algorithm is a process that calculate variables approaching infinity apply for computer application (Boolos and Jeffrey, 1999).
Inside a process of algorithm, the data take from an input source and noted at an output device.The data saved for next processing as data structures.The processes of algorithm can be going on long stand and crucial, but it will stop in a specific point to get the result like unique value.
There are many kinds of algorithm.It can be distinguished by its function either way to manage the data.Algorithm commonly expressed in pseudo code, flow chart, programming language and tables of control.The origin algorithm inside the application of computer is complex and commonly used in technical cases.Use of algorithm for certain application can be patented.

Generative Algorithm
Algorithm used in various application, including software like computer-aided drawing(CAD) and computer-aided architectural drawing (CAAD).They need generative algorithm as method for shaping visual model in three dimension (3D).Basically, design aspect of geometry in 3D CAD arranged in parametric space.Generative algorithm method let the user of CAD possible to change the geometry shape without reprocess the step from beginning, only by changing the parameters of the object (Khabazi, 2010).
Some another generative algorithm used in CAD named Finite Elements Method (FEM) and Finite Elements Analysis (FEA) measuring the complex activity of geometry shape like flexibility, stiffness, pressure, and fluid.Output of FEM and FEA is specific number or visualization, for example through the color.
Over all, generative algorithm enable the CAD's users to create transformation or arrangement of complex geometry such on the nature.Not only shape, but also enable to explore, simulate, analyze, and control that form of complex geometry (Hermawan, 2010).

Mathematics in Generative Algorithm
Generative Algorithm is one of method for computational 3D modeling and computer graphics.Knowing essential mathematics for computational design bring the design professionals to the foundation of mathematical concept which is effective for the development of the project (Issa, 2010).During creation of the object, we must have knowledge about geometry.Mathematics operation is important for support the geometry development like vector, matrix, transformation, curve, and parameter.

Methods
The method for this study is shown in Figure 2.

RESULTS AND DISCUSSION
First step, it is important to look at many of two dimensional basic shapes from many objects, by doing so we conclude that there are three basic shapes be selected: circle, square, and triangle.From those shapes, we make matric table as shown in Figure 3 than we get six different three dimensional object: cone, cylinder, triangle pyramid, square pyramid, beam, and prism.The three dimensional object as the result from first matric called object with hierarchy level 2. Figure 4 shows matric of object built from basic shape with specific repeating in hierarchy level 1 until 10.This basic logic is used for develop basic algorithm in gallon to be case study which has circle as basic shape.

Circle-Ellipse Based Algorithm
Smart Gen-A is created step by step in grasshopper framework during the virtual visualization as the result of the algorithm presented in rhinoceros framework.The schema of creating smart generative algorithm is shown in ordered step by Table 1.

The Schema of Smart Generative Algorithm
Step The complete algorithm in grasshopper framework is shown by Figure 5 below.By using this algorithm, we can convert a photo of a gallon in parametric box to be a virtual image as 3d digital object as given by Figure 6.After successfully get the original algorithm, change the parameter such as diameter and high of specific circle-ellipse by slider component than we get another shapes of familiar object like bottle, rugby ball, chemistry glass, pitcher, pen, lemon tea glass, even bowl as given by Figure 7.

Polygon Based Algorithm
To evaluate the algorithm, subtitute the circle-ellips by polyline.By using the same procedure as the circle-ellipse do, we get another Smart Gen-A with square as basic geometry.Set triple points for the polyline then repeat by random four points and we get object likes monument as given by figure 8.

CONCLUSIONS
Generative algorithm is a method which is let the user of CAD possible to change the geometry shape without reprocess the step from beginning, only by changing the parameters of the object.In order to get photo input as same as real object, parametric box is the solution for standarization.To evaluate the program, input some architectural photo in rhinoceros.By canging the value of slider in grasshopper, Smart Gen-A can convert from 2d photo object to be 3d digital object.Beside that, we can reconstruct another object with one algorithm since the object has similar basic shape without start from begin.
Irvansyah for the assistance and The Ministry of National Education of Indonesia (DIKTI) for the financial support in research.

Figure 1 .
Figure 1.Captured Images of Rugby from Front Side (Left) and Rear Side (Right) Source: Clipartist, 2011

Figure 3 .
Figure 3. Matric of Selected Basic Shape Source: author's documentation

Figure 4 .
Figure 4. Matric of Combined Object in Any Level Source: author's documentation

Figure 8 .
Figure 8. Smart Gen-A by Polygon as Basic Geometry with triple points (left) and four points (right) Source: author's documentation