A Portable 3-Dimensional Digitizer for Computer Graphics 3D Modeling SURIYONG LERTKULVANICH 1 AND NITHI BURANAJANT 2 1 Computer and Information Technology Department 2 Production Engineering Department King Mongkut s University of Technology Thonburi 126 Bangmod, Bangkok THAILAND suriyong.ler@kmutt.ac.th 1 and nithi.bur@kmutt.ac.th 2 Abstract: - This project created a portable three-dimensional digitizer for computer graphics 3D modeling. It started from reviewing literature then constructed a digitizer, developed applications programs, created experiments and analyzed. The process of the machine started from reading pulse train of the arm rotation via Rotary Encoder at each joint. Next, it was processed by microcontroller and sent the results via USB port to PC. In order to calculated the coordinate x, y and z of Cartesian coordinate system. The obtained values are the coordinates of the application, when user recorded values of a prototype already. It displayed points which represented the 3D model. The result of the implementation of the project from the measurement of the standard sphere with a radius of 12.7 mm was found that the mean error is 0.184 mm or 1.455%. This error is acceptable and can be used in making a 3D model in computer graphics. Key-Words: - Portable 3-Dimensional Digitizer/ 3D/ Modeling/ Computer Graphics/ applications programs/ Prototype 1 Introduction The display technology-oriented 3D has been popular with prevalent in industry for the production of multimedia that combines art and technology that are unique, interest, simplification and reduction of defects in the physical of object. Oriented threedimensional display will be able to know the object of width, length and depth. The mathematical equations used to calculate the structural and geometric characteristics of the object model in which 3D Modeling on a computer. Creators have the expertise, skills in the arts. Understand the application of mathematical equations and accuracy of the scale or shape of the model is quite highly because It is important for 3D Modeling similar to prototype object. Including run-time in modeling is quite a lot therefore model can be applied to produce computer graphics, such as the movie and animation, game, presentation, information media etc. A Portable 3-Dimensional Digitizer is device that receives renewed interest because the device can reduce processing time, cost and human resources. For 3D Modeling with A Portable 3-Dimensional Digitizer in the commercially available and price would look different from the purpose resolution of the Measuring the model of machine. 3D Modeling applied use production of the computer graphic. A Portable 3-Dimensional Digitizer have features that are unique. In order to be consistent with the applications of the computer graphics. From importance of the technology and application of the technology from this project is to create A Portable 3-Dimensional Digitizer for 3D objects modeling in the field of computer graphics. This is similar mechanical arm the industry is an arm connected by joints, rotary, all 5 Special per 3 links, each joint has Rotary Encoder as a device to read the rotation angle of the joints. points. Go to the reading. Processed through CPU: Central Processing Unit and computer. To calculate the coordinates x, y, z Cartesian coordinate system for end of the arm of mathematical equations and then make the display 3-dimensional model of the object program. A Portable 3-Dimensional Digitizer have accuracy and precision of the scale, Proportion and shape of the Improved error be used in the modeling of 3D objects in computer graphics. ISBN: 978-1-61804-138-8 54
2 Objectives 2.1 To Create A Portable 3-Dimensional Digitizer for Computer Graphics 3D Modeling. 2.2 To analyze and Efficiency of a Portable 3- Dimensional Digitizer for Computer Graphics 3D Modeling. 3 Expected Results The expected results of this experiment were: 1. A Portable 3-Dimensional Digitizer can create Computer Graphics 3D Modeling. 2. 3D Modeling measured the coordinates of A Portable 3-Dimensional Digitizer has accuracy and precision for Computer Graphics 3D Modeling. 3. The research prototype of invention on processing applications to others closely. 4 The Scope of Research The scope of this research as follows: 1. A Portable 3-Dimensional Digitizer can read the coordinates x, y, z Cartesian coordinate system of the prototype. 2. A Portable 3-Dimensional Digitizer can move the coordinates x, y, z coordinates in Cartesian system to prototype. 3. The application was developed for A Portable 3- Dimensional Digitizer which can be processed and created 3D Modeling of Prototype object on the computer. 5 Procedures Education and Development Project A Portable 3- Dimensional Digitizer for Computer Graphics 3D Modeling applying the principles of A Portable 3- Dimensional Digitizer (Coordinate Measuring Machines: CMMs). Research defined model of education and development work as following procedure. 5.1 Structure of the hardware A Portable 3-Dimensional Digitizer for Computer Graphics 3D Modeling combines the functionality of 4 device is Manipulators of the Rotary encoder, microcontroller board, And electronic circuits that will be various devices for Applied as following. 1. Robotic arm of the principles of Mr. Dana Witt and Mr. Hartainberg is a Numbers of joints and connections to link together. It is a further rotation of 5 joints and a connecting link of the 3 link with the end of the robotic arm is a conical long pointed (Point Probe) developed the used of aluminum as the main material of the a robotic arm by linked that first has 184.5 mm in length, the second link has a length of 300 mm the third link has a length 212.5 mm, and installed of the two switches buttons that coordinate to save and delete the previous coordinates of the last joints. 2. Rotary encoder on the 5 of A Portable 3- Dimensional Digitizer has a rotary encoder in the machine for a signal pulse. Caused by the movement of the robotic arm. The rotary encoder is using in the NPN open-collector output with a diameter of 50 mm with a number of pulses 2000 pulses per round. 3. The microcontroller board. Processing converted analog signals to digital form using a board ET- EASY MEGA1280 (DUINO MEGA) of ETT company which a board microcontroller AVR are programming language C of the Arduino as a device for receiving and sending that has gone the computer. The cable is connected to the rotary encoder on the board of ET-EASY MEGA1280 (DUINO MEGA), then use this connection to PC USB Port of the technical. 4. Electronic Circuits have connection of electronic devices by using the equipment. Rotary encoder 5 unit, 1K R-network (5P is common) 3 of series board ET-EASY MEGA1280 (DUINO MEGA) 1 set of push-type switch, PCB 4-pin to release the 2 buttons and a power outage. 5.2 Development and design of the software application program Development and design of the software application program to control CPU and the program will be written using the C programming language and then transfer to a board microcontroller ET-EASY MEGA1280 that the principle works as follows. The parameters of the rotary, button, pos up and start working button based. If pressing a button that will show to the screen OK and to touch the second which shows NOT after the process do. In order to enter the rotary encoder software When the rotary encoder in specific movement will show the pulses changes on the screen sorting run from rotary encoder in the first (Rotary A) to the rotary encoder in the finally (Rotary E) of the complete cycles through of the working since the beginning of it again and so on, this work is a never-ending. ISBN: 978-1-61804-138-8 55
5.3 Software interface between the hardware and software Development using NetBeans IDE 7.0 is a program for the Java programming language. The default working of the synchronize port of the computer. To the baud rate is in the Arduino to receive and send data to the Java programming language, then the computer will find the port that is connected to the board microcontroller ET-EASY MEGA1280 which will read the pulse from the motion of the rotary encoder software Which are stored in the variable string with 3 conditions, including the string "" (space), "OK", "NOT" by cutting the string on the "" is used in cases. The value of the movement of Rotary A, B, C, D, E, and the specific numbers and stored to the RoA, RoB, RoC, RoD, RoE, as well as the string on the "OK", "NOT" of the press button 1 and button 2 of A Portable 3-Dimensional Digitizer. 5.4 Software interface for users to start working and verify Software interface for users to start working and verify that the USB port can be connected or not. The updated value of Rotary A, B, C, D, E, and the pulse from the Rotary used as a component of A Portable 3-Dimensional Digitizer with the 2000 pulses in the first round of it so the value of the pulse has a degree in order to calculate the matrix. In each of the different matrices were calculated. Finally, it has the coordinates x, y, z are the values from the pulse angle and the coordinates x, y, z on the computer screen. When the user required pressing the Add button to the x, y, z and rotary A, B, C, D, E stores the result in the table. If the error can be resolved by press delete button. Measuring object is measured several points. To achieve the shape desired and the result is a text file extension. Xyz. then send the application to display on a display model. 5.5 The mathematical equations applied in the project To calculate the coordinates x, y, z Cartesian coordinate system. The equation used to calculate the rotation matrix and the application as following. Matrix used to calculate the coordinates of each joint axis. Joints that rotate around the axis X (Rotation X-Axis) matrix move to the point of origin (Translation to origin) joints that rotate around the axis Y (Rotation Y-Axis) joints that rotate around the axis Z (Rotation Z-. Axis) matrix used to calculate the end point. 6 Method Data analysis to determine the accuracy of the coordinates obtained from measurements using A Portable 3-Dimensional Digitizer for Computer Graphics 3D Modeling and analysis the data from the objects to know the exact length with the measurement and comparison of the shapes by analyzing the data into two parts. 6.1 Analysis of object standard 1. The measured values are compared with the coordinates of each length object to find the error. 2. The measurement errors was calculated. Calculating the average. 3. The average value of each shaped combined. and then average again. To analyze the quality of the movement overall. 6.2 Analysis of the information that is used for modeling 3D objects in the field of computer graphics 1. The coordinate values that collecting was show after comparing the characteristics of 3D Modeling and object model. 2. To measured 3D Modeling using in the application. 6.3 Statistics is used analysis The average of error comparing for standard. To make the data are statistically reliable. The method of averaging is done as follows. Find the average and the Least Square. 7 Results A Portable 3-Dimensional Digitizer created a machine that can be moved as desired of the user. The rotary joint of 5 joint and the connecting link of the 3 link is the end of the long robotic arm of the cone sharp (Point Probe) generated by the use of aluminum as the main material of the robotic arm. The base metal is the material used in the assembly. When the movement robotic arm has a rotary encoder and will send the signal to the pulse of the CPU. And the coordinates x, y, z are controlled by the user of the infected joints finally. The characteristics of the device are shown in Fig.1- Fig.6 and the application's user interface as shown in Fig.7. ISBN: 978-1-61804-138-8 56
Fig.1 A Portable 3-Dimensional Digitizer that are created. Fig.4 First connector of A Portable 3-Dimensional Digitizer. Fig.2 A Portable 3-Dimensional Digitizer for built in the side view. Fig.5 Last connector of A Portable 3-Dimensional Digitize and the measuring object. Fig.3 A Portable 3-Dimensional. Digitizer created in the top view. Fig.6 The buttons area for storing the coordinate values. ISBN: 978-1-61804-138-8 57
Fig.7 The application Users interface. 7.1 Results experiment of measuring object standards To find distance 5.000 cm and the radius of a sphere 1.270 cm in the measurement of the mean 5.061 inches and 1.251 inches can do a standard error of measurement was 0.061 cm and 0.019 cm, equivalent to 1.226% and 1.455%. The values that can indicate the quality of the device as a machine able to used for generating A Portable 3- Dimensional Digitize. 7.2 Results of experimental measurements to be used in the Computer Graphics 3D Modeling of measured coordinates of the object to create the 3D Modeling. The coordinates of the positions where margin of error level is low. The margin of error at a level that still be able viewed into the 3D Modeling and 3D Modeling is similar to the 3D Modeling of the prototype object model that can be applied in the Computer Graphics. Fig.8 3D Modeling. Fig.9 3D Modeling of the prototype object model. References: [1] Kittisak Bunyungkun, A Portable 3- Dimensional Digitizer in axis joints 6, Thesis Master of Engineering, Mechanical Engineering, Chulalongkorn University, Thailand, 2002. [2] Attawish Sudsang, A robotic arm, [Online], Available: http://www.cp.eng.chula.ac.th/ ~ attawith / class / mani.pdf, [27 June 2011]. [3] Principles of Denali- Hindenburg, [Online], Available: http://ptkrobot.blogspot.com/2009/ 08/blog-post_3610.html, [27 June 2011]. [4] Suchin Suachoice, Feedback Device, [Online], Available: http://www.9engineer.com/index. php?m=article&a=print&article_id=2176, [27 June 2011]. [5] Motion Control Hardware, [Online], Available: http://eestud.kku.ac.th/~u4316562/hardware. html, [30 June 2011]. [6] Kittikorn Suksiripongvasri, The servo system training and maintenance of CNC machines, [Online], Available: http://www.bpcd.net/ machine/cnc_training/cnc_sdi.pdf, [30 June 2011]. [7] OMRON, Slim Incremental 50-mm-dia. Rotary Encoder E6C2-C, [Online], Available: http://www.omronap.co.th/product_info/e6c2-c/index.asp, [30 June 2011]. [8] UTCCT, Microprocessors and microcontrollers MCS-51, Technology Association. (Thailand - Japan), Bangkok, Thailand, 2004. [9] Team Smart Learning, PIC Microcontroller Learning-By-Doing with C,.Smart Learning Center, Bangkok, Thailand, 2007. ISBN: 978-1-61804-138-8 58
[10] Suchat Supap, in three-dimensional vector, the graduates, Bangkok, Thailand, 2007. [11] Pisan Molistkunmongkul, Computer graphics using OpenGL = Computer Graphics using OpenGL, Thai Charoen Print, Bangkok, Thailand, 2007. [12] Chapter 7 three-dimensional (PICTORIAL VIEW), [Online], Available: http:// www.bspwit.ac.th/link PAGE / Art Group / Drawing Tech / D-TECH UNIT-07.php, [10 September 2011]. [13] ETT Co., Ltd, Article on ATmega1280, [Online], Available: http://www.etteam.com/ product2009/et-avr/introduction to ATmega1280.pdf, [10 September 2011]. [14] OFFICE NATIONAL RESEARCH COUNCIL OF THAILAND, NRCT. ISBN: 978-1-61804-138-8 59