@@ -0,0 +1,2597 @@
+import java.awt.BorderLayout;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.JButton;%0Aimport javax.swing.JFrame;%0Aimport javax.swing.JPanel;%0Aimport javax.swing.SwingUtilities;%0A%0A%0Aimport vtk.vtkActor;%0Aimport vtk.vtkConeSource;%0Aimport vtk.vtkNativeLibrary;%0Aimport vtk.vtkPanel;%0Aimport vtk.vtkPolyDataMapper;%0A%0A//Author: Bharatesh Chakravarthi%0A//Affiliation: VE Lab, Chung Ang University, Seoul, South Korea. %0A%0A%0Apublic class Cone extends JPanel implements ActionListener %7B%0A%09  private static final long serialVersionUID = 1L;%0A%09  private vtkPanel renWin;%0A%09  private JButton exitButton;%0A%0A%09  // -----------------------------------------------------------------%0A%09  // Load VTK library and print which library was not properly loaded%0A%09  static %7B%0A%09    if (!vtkNativeLibrary.LoadAllNativeLibraries()) %7B%0A%09      for (vtkNativeLibrary lib : vtkNativeLibrary.values()) %7B%0A%09        if (!lib.IsLoaded()) %7B%0A%09          System.out.println(lib.GetLibraryName() + %22 not loaded%22);%0A%09        %7D%0A%09      %7D%0A%09    %7D%0A%09    vtkNativeLibrary.DisableOutputWindow(null);%0A%09  %7D%0A%09  // -----------------------------------------------------------------%0A%09  %0A%09  %0A%09  public Cone() %7B%0A%09    super(new BorderLayout());%0A%0A%09    %0A%09  //create a Cone%0A%09  vtkConeSource ConeSource = new vtkConeSource();%0A%09 //Uncomment below line to set the Resolution of Cone%0A%09 // ConeSource.SetResolution(100);%0A%09  ConeSource.Update();%0A%09  %0A%09  %0A%09 %0A%09  //Create a Mapper and Actor%0A%09  vtkPolyDataMapper Mapper = new vtkPolyDataMapper();%0A%09  Mapper.SetInputConnection(ConeSource.GetOutputPort());%0A%0A%09  vtkActor Actor = new vtkActor();%0A%09  Actor.SetMapper(Mapper);%0A%09  %0A%09   %0A%09  renWin = new vtkPanel();%0A%09  renWin.GetRenderer().AddActor(Actor);%0A%09  renWin.resetCamera();%0A%0A%09  // Add Java UI components%0A%09  exitButton = new JButton(%22Exit%22);%0A%09  exitButton.addActionListener(this);%0A%0A%09  add(renWin, BorderLayout.CENTER);%0A%09  add(exitButton, BorderLayout.SOUTH);%0A%09  %7D%0A%0A%09  /** An ActionListener that listens to the button. */%0A%09  public void actionPerformed(ActionEvent e) %7B%0A%09    if (e.getSource().equals(exitButton)) %7B%0A%09      System.exit(0);%0A%09    %7D%0A%09  %7D%0A%0A%09  public static void main(String s%5B%5D) %7B%0A%09    SwingUtilities.invokeLater(new Runnable() %7B%0A%09      public void run() %7B%0A%09        JFrame frame = new JFrame(%22Cone%22);%0A%09        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%09        frame.getContentPane().setLayout(new BorderLayout());%0A%09        frame.getContentPane().add(new Cone(), BorderLayout.CENTER);%0A%09        frame.setSize(400, 400);%0A%09        frame.setLocationRelativeTo(null);%0A%09        frame.setVisible(true);%0A%09      %7D%0A%09    %7D);%0A%09  %7D%0A%09%7D %0A

Create Circle.java