Java Video Rental Store App - Part 1

One of the last computer engineering course works I had to do was to code a simple Java application. This application should use a database to store and retrieve its data. The discipline was Advanced Computing Topics. The teacher Luís Henrique Campos Braune sent the class an e-mail explaining what he wanted us to do. The following lines are a transcript of what he wanted us to do initially.

The basic idea was that we would study a sample java application1, a very simple one, and starting with it we would program another one. The work would be done in teams and the teacher orientation was that we should only use the allotted class time because we were also preparing our computer engineering final project and he didn't want us to spend time at home with course work related to his discipline. He thought that the time allotted to the classes would be sufficient for this task.

1 The sample Java application can be downloaded at the end of this post. The initial code and instructions were written in Portuguese. I translated all the code and instructions to the English language, so that it can reach a broader audience.

The Java Sample Application
The Java sample application is a functional and really rudimentary one and uses the Swing User Interface Toolkit.

We didn't use an Integrated Development Environment (IDE) to work with it. All the preliminary changes to the code was done using a simple text editor as the Windows Notepad. The purpose of this application was to introduce the students to the object oriented programming world based on windows and user events. We should compile and run it according to the following steps:

1st step - Download and decompress the .zip file provided by the teacher.

The sample application should be uncompressed in the root dir C:\ on the classroom computer to facilitate the work.

The following table shows the content of the .zip file:

.ZIP file content
File Description
MainMenu.java Class pertaining to the main menu
ClientRecord.java Class pertaining to Retrieve/Change/Save/Delete client
VideoRecord.java Class pertaining to Retrieve/Change/Save/Delete video
VideoRental.java Class pertaining to video rental
VideoDevolution.java Class pertaining to video devolution
DatabaseAccess.java Class pertaining to the database connection and functions
VideoRentalStore.mdb Microsoft Access database file
README.txt A read me file with instructions

2nd step - Compile the sample app To do this we should open a command prompt, navigate to the sample app directory and type: javac MainMenu.java

In case the above command didn't work for you, refer to the The Java Platform section bellow.

3rd step - Run the sample app After compiling the the Sample app it's necessary to run the same. To do this, again in the command prompt, type: java MainMenu

In both cases it's important to type observing UPPER and lower case letters. It's case sensitive.

The Java Platform
Evidently, to do the the last two steps we should have the Java Platform installed. The Java platform consists of several programs, each of which provides a distinct portion of its overall capabilities. The principal portions are: the Java compiler, the Java Virtual Machine (JVM), the Java Development Kit (JDK), the Java Runtime Environment (JRE), and the just-in-time (JIT) compiler.

If the 2nd step above didn't work, we have two possibilities:

- The JDK is installed but not configured

A simple tip to see if the JDK is already installed is to look for some version of the JDK in "C:\Program files\Java"; if there is a version but on trying to compile you get an error, then you need to configure it first. That's what we'll do in the Installing the Java Development Kit section bellow.

- The JDK isn't installed

There are different "editions" of the Java Platform, including:

  • Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices which are sufficiently limited that supplying the full set of Java libraries would take up unacceptably large amounts of storage.
  • Java SE (Standard Edition): For general purpose use on desktop PCs, servers and similar devices.
  • Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client-server enterprise applications.

The one that would fit our necessity was the J2SE edition without the NetBeans IDE, that is usually offered with the Java Platform when you download it.

To download the J2SE go at http://java.sun.com/javase/downloads/index.jsp (select JDK 6 Update 5).

There are several flavors, each one suitable for a specific type of operating system. For this post I used the Windows offline installation file called jdk-6u2-windows-i586-p.exe (65.5 MB).

Installing the Java Development Kit
The following are the steps we used to install the JDK. It's really easy! You practically have to click on next, next and next.

Just pay attention to the fact that, after the installation of the JDK, the JRE will also be installed in case you don't have it.

The trick is to configure the Java Platform after the JDK has been installed. To do that, check where the installation was done. Usually it is in C:\Proram files\Java\jdk...

Now, right click on My computer, Properties, Advanced tab, Environment variables. Click on New variable. Can be in User variables or System variables. Create the two variables according to the following table:

Environment variables
Variable Name Value
1 CLASSPATH ;.;C:\Program files\Java\jdk1.6.0_02
2 PATH ;C:\Program files\Java\jdk1.6.0_02\bin

Notes: - A dot (.) is part of the CLASSPATH variable value. - The path here presented are for mere illustration. What really matter is the current path you have on your computer. - Each value has a semicolon in its beginning. - I used the value jdk1.6.0_02 because this is the JDK version I have on my machine. This explains why I used ... to point the JDK installation path. If you have a different version, make the appropriate change.

Save everything clicking OK.

To test if the Java Platform was installed/configured correctly, try to compile and run the sample application executing the 1st and 2nd steps of The Java Sample Application section above.

Configuring the database connection
It wasn't enough for our Java sample application. We then should configure the database, more precisely, the alias used to reference the Microsoft Access VideoRentalStore.mdb database file.

What we needed to do was to create an ODBC connection so that the database file would be referenced through the alias used within the DatabaseAccess.java source code file. To do this we should do the following:

Go to Control Panel, Administrative Tools, ODBC Data Sources, click on the Add connection and choose Microsoft Access driver; in data source name value we should type the alias "VideoRentalStore" used in the DatabaseAccess.java source code file and in Database we should select/point to the VideoRentalStore.mdb database file that is inside the uncompressed directory.

Doing so we should be able to Retrieve/Change/Save/Delete data using the sample application.

Any doubts should be reported to the teacher. That's what he's there for, right?!

OK that was the first class we had and so is the first post in this series.

Next post in this series
Come back to see a next post in which I'll start to drill down what I particularly did, that is, what path I followed to take advantage of and master my skills while developing the other version of such application.

Get the Java Video Rental Store sample application at:

http://leniel.googlepages.com/VideoRentalStoreSampleApp.zip

Computer Virus: Types, Sources and Harms

Computer virus
A computer virus is a computer program that can copy itself and infect a computer without permission or knowledge of the user. The term virus is commonly used to refer to many different types of malware programs.

Types
The following table shows the most common types of computer viruses and their characteristics.

Common types of computer virus
Type Characteristic
File Attaches or associates its code to a file. Usually, this type of plague adds the code to a file of a normal program or overwrites the file. The virus infects Windows executable files, especially the ones with .com and .exe extension types and doesn't act directly over data files. In order for its destructive power to take effect, it's necessary that the contaminated files be executed.
False Alarm Does not cause damage to the computer, but consumes connection time and bandwidth of the internet connection to make the user send the alarm to a larger number of people. Can be classified as Hoax or Chain Letter.
Backdoor As its name states, it's a virus that open the computer's "back door" enabling hackers to take the computer control. Normally, the backdoor virus comes embedded in files received through e-mail or downloaded from the internet. When the file is executed, the user free the virus, that opens a computer port for the virus creator so that he can gain the complete or restrict control of the computer.
Boot Infects the initialization area of floppy discs and hard disks. Vital system files are found on these areas. This virus has a high destruction power, even blocking the user from starting the computer operating system.
Trojan Horse Apparently inoffensive virus that brings embedded another program that is the malign virus.
Encrypted Codified virus that complicates antivirus actions.
Hoax Messages that usually arrive in e-mails alerting the users about a showy, highly destructive virus.
Macro Infects macros (executable code used in text processors and spreadsheets to automate tasks). Disables essential functions as Save, Close and Exit.
Multipartite Infects the master boot record (MBR), boot tracks and files.
Mutant Programmed to complicate its detection by antivirus software. Is capable of altering itself after each execution of the infected file.
Polymorphic More intelligent variation of the mutant virus. Tries to impede the antivirus action modifying its internal structure or its codification techniques.
Program Infects only executable files, blocking the user from initializing the operating system.
Script Programmed to execute commands without user interaction. There are two categories of the script virus: VB based on the programming language and the JS based on JavaScript. This kind of virus can come embedded in images and in files with uncommon extensions as .vbs.doc, vbs.xls or js.jpg.
Stealth Invisible virus that uses one or more techniques to avoid its detection. Can redirect system indicators and infect a file without altering the same.

Sources
Relationship sites, torrent download sites, virtual communities as Orkut just to name a few are sources of virus. Messages or posts apparently inoffensive can have an embedded/attached virus. The virus can even be hidden in images as the one shown bellow. Take it easy. The image below doesn't have a built-in virus!

Generally, the computer virus is scattered in places of great access as is the case of pornographic sites and download networks that distribute pirate software copies (the so famous P2P networks), although nothing impedes that a virus be received in a simple e-mail message.

Harms
Most of the time the virus remains in an inactive state waiting for the user to take action. The virus can copy all the data typed by the computer user, getting a list of the visited sites, the user's preferences and even a list of all the contacts (e-mail addresses) of the user that has a virus in their computer. This forms a really dangerous virus chain in which the virus can propagate itself to other users given the e-mail addresses of the other users.

The inexperienced users don't realize the maliciousness in such appeals and end falling into the trap. They pass credit card numbers, details from where they live, where they study, what they do to have fun, etc, that is, hand over private details to a person (can be the virus creator or no) completely anonymous.

A common situation is that of an infected user that has a computer virus and not even knows about its existence till the moment that s/he receives the bank statement in which is listed the draws of tens, hundreds or thousands of dollars.

Summary
Nowadays we're witnessing an awfully race for the acquisition of new computers. Lots of inexperienced users are getting into the computer and internet world. Such users don't posses most of the time the correct information about the threats inherent to the inadequate use of computers.

Computers are excellent tools when used to legal work related tasks and healthy leisure practices,
however the inexperienced user can fall into traps when s/he decides to have fun using the computer to search for illegal tasks or practices.

With the increasingly proliferation of computer viruses it's recommended that unknown files be discarded and that visits to inappropriate sites be avoided. It's also recommend the use of an antivirus software.

In the last analysis, for those that are already familiarized with the virtual world there isn't too much danger, though the above advice must be observed. The inexperienced users must ask the experienced users for advices to gain the necessary information regarding the inherent threats present in the virtual world.

PivotTable and PivotChart with Microsoft Excel

In this post I use a sample spreadsheet that stores the grades of a college student to show how to create a pivot table and a pivot chart using Microsoft Excel 2007.

Note: Although I use Microsoft Excel 2007 to illustrate the creation process, I provide at the end of this post a spreadsheet compatible with Microsoft Excel 2003.

Pivot Table
A pivot table is extremely helpful when we want to summarize data through different forms. It gives us the possibility of arranging what data we want summarized and in what shape we want them.

The following is the sample spreadsheet I'm going to use throughout this post:

The above spreadsheet has just one sheet named Grades.

To create a pivot table go to the Insert tab on Microsoft Excel 2007 and select PivotTable.

You'll be asked about the range. In the case of this sample spreadsheet just type B2:I72.

You then can choose where to place the PivotTable. I selected New Worksheet.

After doing this, you'll have the following screen:

Note that the column headers of the sheet named Grades are included in the PivotTable Field List on the right of the screen.

Just for the sake of organization, let's rename this new sheet PivotTable.

OK. Now we can start summarizing the data as we want. To accomplish this we must choose what fields/columns to add to the report.

What I want to do in this sample case is a simple task: to average the student grades by terms.

I start by selecting the field Term and then I drag and drop it on the the Row Labels area:

It's clear that what I'm doing is to represent each term by a row in my report.

Now I'll repeat the drag and drop action but this time with the Average field. I'll put this field on the ∑ Values area.

After doing this last action, we get something like this:

At this point we start getting some results; but wait, we're getting the sum of the student's grades for each term. That is not what we want to do. To correct this we must left click the Average field on the ∑ Values area and change its settings:

On the new screen that is shown just select Average:

Now we have the average grade for each term as we wanted. Look at the final result:

The value we get in Grand Total is congruous with the already calculated GPA we have inside the Grades sheet.

Pivot Chart
A pivot chart can be used to display a pivot table's summarized data through different charting types and any changes you make to the pivot table's summarized data will be reflected on the pivot chart.

To create a pivot chart you just have to follow the above steps we used to create a pivot table, but this time instead of selecting a PivotTable you must select PivotChart on the Insert tab.

Bellow is the pivot chart after being formatted:

Instead of Row Labels we have Axis Fields (Categories) inside the PivotTable Field List. I rearranged the pivot table report so that the terms are sorted accordingly. I also renamed the fields to reflect more precisely what the report data is about.

Summary
The possibilities for summarizing the data are innumerable and that's what makes a pivot table a so powerful resource.

A pivot chart is simply a chart that uses a pivot table to do data binding.

Get the sample spreadsheet at:

Microsoft Excel 2007 version - http://leniel.googlepages.com/PivotTableSpreadsheet.xlsx

Microsoft Excel 2003 version - http://leniel.googlepages.com/PivotTableSpreadsheet.xls

Breadth and depth first search - part 3

Breadth and depth first search - part 1
Breadth and depth first search - part 2

As an extra, today I'm posting the C++ code of the breadth and depth first search algorithms. Take a look at part 1 and part 2 of this series.

When I had to hand in the work for the artificial intelligence discipline, the teacher wanted the code in C++ and I had already started developing the code in C#. The result was two versions of the same functions. The good part is that I could master both languages while developing such a code.

The code presented here uses an adjacency matrix to represent the links between the cities that are part of the Romania map shown bellow.

The following is the adjacency matrix:

// Adjacency matrix
int map[21][21] = {
/*   A B C D E F G H I L M N O P R S T U V Z */
  {0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0},
  {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1}, // Arad
  {2,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,1,0,0}, // Bucharest
  {3,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0}, // Craiova
  {4,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0}, // Dobreta
  {5,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0}, // Eforie
  {6,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0}, // Fagaras
  {7,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, // Girgiu
  {8,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0}, // Hirsova
  {9,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0}, // Iasi
  {0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0}, // Lugoj
  {1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // Mehadia
  {2,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0}, // Neamt
  {3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1}, // Oradea
  {4,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0}, // Pitesti
  {5,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0}, // Rimnicu Vilcea
  {6,1,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0}, // Sibiu
  {7,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0}, // Timisoara
  {8,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0}, // Urziceni
  {9,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0}, // Vaslui
  {0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0}  // Zerind
};

Note that the first commented line represents the initial letter of each city's name. The mapping done with the adjacency matrix refers to these letters so that it's easier to understand. For example, getting the first entry of the adjacency matrix that refers to Arad: we have that Arad has paths that lead us to Sibiu, Timisoara and Zerind, thus we put a value of 1 on the columns that represent those cities, in this case, the columns beneath the letters S, T and Z. That's how the mapping is done. We put a value of 0 on the other columns to state that there is no path that leads us to those cities.

The code also has a hand made version of the stack and queue data structures. Each one of these structures is on its proper header file and are inline functions. See their implementations:

// Queue
struct Queue
{
  int start, end, tot;

  int info[max + 1];
};

void StartQueue(Queue *q)
{
  q->tot = 0;

  q->start = 1;

  q->end = 0;
}

int IsQueueEmpty(Queue *q)
{
  return q->tot == 0 ? 1 : 0;
}

int IsQueueFull(Queue *q)
{
  return q->tot == max ? 1 : 0;
}

int Adc(int x)
{
  return x == max ? 1 : x + 1;
}

void Enqueue(Queue *q, int x)
{
  if(!IsQueueFull(q))
  {
    q->end = Adc(q->end);

    q->info[q->end] = x;

    q->tot++;
  }
}

int Dequeue(Queue *q)
{
  int ret = 0;

  if(!IsQueueEmpty(q))
  {
    ret = q->info[q->start];
  
    q->start = Adc(q->start);
  
    q->tot--;
  }

  return ret;
}
// End Queue
// Stack
struct Stack
{
  int topo;

  int info[max + 1];
};

void StartStack(Stack *s)
{
  s->topo = 0;
}

int IsStackEmpty(Stack *s)
{
  return s->topo==0 ? 1 : 0;
}

int IsStackFull(Stack *s)
{
  return s->topo == max ? 1 : 0;
}

void Push(Stack *s, int x)
{
  if(!IsStackFull(s))
  {
    s->topo++;
  
    s->info[s->topo] = x;
  }
}

int Pop(Stack *s)
{
  int ret = 0;

  if(!IsStackEmpty(s))
  {
    ret = s->info[s->topo];
  
    s->topo--;
  }

  return ret;
}
// End Stack

The Breadth First Search and Depth First Search functions are written in the same fashion of the C# code, but with little modifications.

void BreadthFirstSearch(int origin, int destination)
{
  Queue *q = new Queue();

  StartQueue(q);

  Enqueue(q, origin);

  while(IsQueueEmpty(q) == 0)
  {
    int u = Dequeue(q);

    if(u == destination)
    {
      printf("Path found.");

      break;
    }
    else
    {
      visited[u] = 1;

      for(int v = 1; v <= 20; v++)
      {
        if(map[u][v] != 0)
        {
          if(visited[v] == 0)
          {
            visited[v] = 1;

            parents[v] = u;

            if(v != destination)
            {
              if(!IsQueueFull(q))
              {
                Enqueue(q, v);

                ShowPath(v);

                printf("\n");
              }
              else
              {
                printf("Queue full.");

                break;
              }
            }
            else
            {
              ShowPath(v);

              return;
            }
          }       
        }
      }
    }
  }
}
void DepthFirstSearch(int origin, int destination)
{
  Stack *s = new Stack();

  StartStack(s);

  Push(s, origin);

  while(IsStackEmpty(s) == 0)
  {
    int u = Pop(s);

    if(u == destination)
    {
      printf("Path found.");

      break;
    }
    else
    {
      visited[u] = 1;

      for(int v = 1; v <= 20; v++)
      {
        if(map[u][v] != 0)
        {
          if(visited[v] == 0)
          {
            visited[v] = 1;

            parents[v] = u;

            if(v != destination)
            {
              if(!IsStackFull(s))
              {
                Push(s, v);

                ShowPath(v);

                printf("\n");
              }
              else
              {
                printf("Stack full.");

                break;
              }
            }
            else
            {
              ShowPath(v);

              return;
            }
          }      
        }
      }
    }
  }
}

To show the travelled paths there is a recursive function called ShowPath:

void ShowPath(int u)
{
  if(parents[u] != 0)
    ShowPath(parents[u]);

  printf(" %s", cities[u]);
}

You see, I had finalized the C# code and even sent the code to the teacher, but I received his reply stating that he wanted the code in C++. I complained with him! I told him about the easiness that modern programming languages as C# offers us when writing code.

Today, the data structures (queue and stack) "hand made" in this code are present in modern and optimized fashions inside standard libraries. We just need to instantiate an object from that specific class, in this case, stack or queue, and tada, we get lots of functions that do the hard work. But the point here is not the easiness. What the teacher wanted to force us to do was to comprehend how those data structures really function.

Nothing is better than writing the data structures by yourself. Although I didn't agree at the time, I thank him for forcing me to learn. Needless to say, these are basic data structures and are used in a great amount of code. You'll see these data structures during your entire developer life.

Visual Studio C++ Console Application
You can get the Microsoft Visual Studio Project and the app executable at:

http://leniel.googlepages.com/BreadthDepthFirstSearchCPlusPlus.zip

Papers

The following list shows each paper I've already published online on this blog plus the post in which I comment about it. The list is chronologically organized.

List updated on 2/09/2009

  1. Fortran Numerical Constants Recognizer
    Reconhecedor de Constantes Númericas em Fortran
    http://www.leniel.net/2009/02/fortran-numerical-constants-recognizer.html
  2. A Syntactic Analyzer built with the CASE tools Flex and YACC
    Um Analisador Sintático Construído com as Ferramentas CASE Flex e YACC
    http://leniel.net/2008/04/syntactic-analyzer-built-with-lex-yacc.html
  3. Influence of Tonal and Spatial Resolution on the Image File Size
    Influência da Resolução Tonal e Espacial no Tamanho do Arquivo de Imagem
    http://leniel.net/2008/04/tonal-x-spatial-resolution-x-file-size.html
  4. Construction and Simulation of a Robot Arm with OpenGL
    Construção e Simulação de um Braço Robótico com OpenGL
    http://leniel.net/2008/02/robot-arm-with-opengl-in-csharp.html
  5. Development and Numerical Simulation of Algorithms to the Computational Resolution of Ordinary Differential Equations
    Desenvolvimento e Simulação Numérica de Algoritmos para Resolução Computacional de Equações Diferenciais Ordinárias
    http://leniel.net/2008/02/development-and-numerical-simulation-of.html
  6. Linguagem de Pesquisa Integrada à Linguagem de Programação
    http://leniel.net/2008/01/linq-language-integrated-query.html
  7. Top-Down Approach in Distributed Databases
    Abordagem Top-Down em Bancos de Dados Distribuídos
    http://leniel.net/2007/12/top-down-approach-in-distributed.html

New job at ITA-Petrobras

Last month was a busy one. On February 11th I started working on a project called Galileu. This project is being implemented by a joint venture between Petrobras and a group of universities. Amongst those universities is the Aeronautics Technological Institute (ITA).

I got such job opportunity through ITA's mechanical engineering department, more specifically the Computational Transport Phenomena Laboratory. I received an email from its group leader Marcelo de Lemos. I answered the email right way sending him my resume. They needed someone with expertise in programming languages and high performance computing (HPC). I was eagerly waiting a job opportunity because I finished the computer engineering course and there was no place to work. This opportunity was just what I needed.

My work is really exciting. Firstly I was given material about the message passing interface (MPI) and the Rocks clusters distribution for the Linux platform. After that I started playing with the Linux cluster, which was already installed. Who installed it was a great friend I met at the lab. His name is Arkady Petchenko.

As a lab we experiment with the available HPC platforms. The last two weeks I've been playing with the Windows Computer Cluster Server 2003. I was responsible for installing the Windows cluster.

I'm also doing development of code in C/C++ and Fortran. I compile and build applications that can explore the full potential of a cluster through the MPI API.

It's fantastic to see how a parallel program performs on different numbers of processors.

In future posts I'd like to discuss about the aspects of the technologies I work with. It's great stuff! I love programming languages and the parallel computing world is a fascinating one. With the increase of the number of processors in a single chip, we're going to see a vast amount of parallelized code being executed on distributed computing systems. Parallel APIs as the Microsoft Parallel Extensions for .NET framework are evolving rapidly. This will for sure change the way we think when working with code and specially with clusters and supercomputers.

Robot arm with OpenGL in CSharp

Robot arm
A robot arm or robotic arm can be classified as articulated and not articulated. It’s more autonomous than a simple mechanic arm and can be used to lift small parts with high precision and velocity. It’s generally used in tasks such as: welding, painting, assembling, packaging, storage, product inspection and test and even in spacecrafts as can be seen below:

OpenGL
OpenGL (Open Graphics Library) is a standard specification that defines an API (Application Program Interface) that is multi-language and multi-platform and that enables the codification of applications that output computerized graphics in 2D and 3D.

Computer graphics paper
I and a dear brother in faith of mine called Wellington Magalhães Leite wrote a paper titled: Construction and Simulation of a Robot Arm with OpenGL

We used the Tao Framework C# biding to OpenGL during the construction of the robot arm.

See one of the screenshots of our robot arm:

See the paper's abstract below:

The importance of projects related to the field of Computer Graphics in simulations has been growing a lot during the last years. Therefore it brings to life the necessity of mastering the concepts and techniques inherent to the process of elaboration, construction and simulation of a given graphical project.

The OpenGPL API specification tries to help us when we are programming the graphical details of a given project. In this article we’re showing the necessary steps and routines to the proper codification and simulation of a robotic arm in 3D, which is the most employed robot in the manufacturing industry and in areas that require a high precision rate.

With a simulation (virtual) model, we can have a closer vision of the object of study in contrast with reality, what make us capable of foreseeing how a determined object will look like and how it will behave after its proper construction in the physical world.

Keywords: robot arm, OpenGL, 3D simulation, computer graphics

You can get a PDF copy of the article at:

https://github.com/leniel/leniel.net/blob/master/Uploads/ConstructionSimulationRobotArmOpenGL.pdf

Visual Studio C# Windows Application
You can get the Microsoft Visual Studio Project and the executables at:

https://github.com/leniel/leniel.net/blob/master/Uploads/RobotArmOpenGLCSharp.zip