Translate

Saturday, August 4, 2012

Forensic Engineering – A probe into what the country should produce as Materials Engineers to compete global.


Failures in Engineering Materials are accountable for majority of catastrophic engineering failures. However the Engineering students who study Materials Engineering in the country are drastically loosing this very interesting area of research. One could identify this as an area where you need expertise with better training and comprehensive practical exposure along with the professional association which definitely have earn better global prospects to this tiny island. The area of “Forensic Engineering is the investigation of materials, products, structures or components that fail or do not operate or function as intended, causing personal injury or damage to property. The consequences of failure are dealt with by the law of product liability. The field also deals with retracing processes and procedures leading to accidents in operation of vehicles or machinery. The subject is applied most commonly in civil law cases, although may be of use in criminal law cases. Generally the purpose of a Forensic engineering investigation is to locate cause or causes of failure with a view to improve performance or life of a component, or to assist a court in determining the facts of an accident. It can also involve investigation of intellectual property claims, especially patents. ” – Borrowed from wiki.


I am writing this post in view of challenging and convincing the authorized individuals about the improper unproductive deployment of Materials Engineers we produce in the country. If one could even look at the local industry given the above explanation you see the legitimate use of true knowledge on the field of materials engineering in determining accountability and preventing the catastrophic engineering disasters, the nation face. I could give you hundreds of examples, among them the study of catastrophic disasters of national air force aircrafts during the war period and after, the need of testing for propellers at power plant turbines, Need of testing for the armory and careful examinations and testing of sophisticated engineering structures could be highlighted at large. However if some students who need some inspiration out of the significance of the field of materials Engineering I thought the following video give some sense. I know what you see in the video is relatively old. But it is such a very interesting application of knowledge you grabbed as a Materials Engineer.




Wednesday, August 1, 2012

Awesome Paint Brush



Well, this happens to me accidentally while I  was teaching a set of my kiddies who were indeed interested in making computer games about how to do kinda’ simulation using a computer programming language (java). On the other hand I too wanted them to show kind of multiple inheritance in action.  As you see in the code below the mistake was incredible. Miraculously I have written down a piece of code to simulate a paint brush. The code is very original and indeed may have some hidden professional mistakes. I want let em as they are and some body down who read this blog is expected to correct this code for professional mistakes. 



Picture :  An awesome art from an awesome tool


If you run the code below try whether you could draw the above paint :D.


import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class Pinsal extends JPanel implements
 MouseMotionListener {
  private int X, Y;
  private Image image1;
  private Image image2;

 
public static void main(String[] args) {
  JFrame frame = new JFrame();
  frame.getContentPane().add(new Pinsal());
  frame.setSize(500, 300);
  frame.show();
  }
  public Pinsal() {
  addMouseMotionListener(this);
  setVisible(true);
  }
  @Override
  public void mouseMoved(MouseEvent event) {
                  // implements MouseMotionListner.mouseMoved
  X = (int) event.getPoint().getX();
  Y = (int) event.getPoint().getY();
  repaint();
  }
  @Override
  public void mouseDragged(MouseEvent event) {
        // implements MouseMotionListner.mouseDragged
  mouseMoved(event);
  }
  @Override
  public void update(Graphics graphics) {
        // javax.swing.Jcomponent.update
  paint(graphics);
  }
  @Override
  public void paint(Graphics g) {
        // javax.swing.Jcomponent.paint
  Dimension dim = getSize();
  draw();
  Graphics graphics1 = image1.getGraphics();
  Graphics graphics2 = image2.getGraphics();                 
  graphics1.setColor(getBackground());
  graphics1.fillRect(0, 0, dim.width, dim.height);
  //colorScreen(image1.getGraphics());
  colorScreen(image2.getGraphics());
  //g.drawImage(image1, 0, 0, null);
  g.drawImage(image2, 0, 0, null);
  }                                                   
  private void draw() {
  Dimension dim = getSize();
  if (image1 == null || image1.getWidth(null) != dim.width
  || image1.getHeight(null) != dim.height) {
  image1 = createImage(dim.width, dim.height);
  }
  if (image2 == null || image2.getWidth(null) != dim.width
              || image2.getHeight(null) != dim.height) {
              image2 = createImage(dim.width, dim.height);
              }
  }
  public void colorScreen(Graphics g) {
  int size = 15;
  g.setColor(Color.CYAN);
  g.fillOval(X - size  / 2, Y - size  / 2, size , size );
  }
}