2 Комити da85f2d3cf ... 03b128399a

Аутор SHA1 Порука Датум
  Andreas Völker 03b128399a Added horrible looking description пре 5 година
  Andreas Völker ac5e272321 Minor cleanup пре 5 година

+ 2 - 2
src/de/andreasvoelker/BlochFrame.java

@@ -9,8 +9,8 @@ import com.jogamp.opengl.util.Animator;
 import java.awt.event.*;
 
 public class BlochFrame extends GLCanvas {
-    BlochRenderer renderer;
-    Animator animator;
+    final BlochRenderer renderer;
+    final Animator animator;
 
 
     class MyMouseMotionListener implements MouseMotionListener {

+ 1 - 1
src/de/andreasvoelker/BlochRenderer.java

@@ -13,7 +13,7 @@ import java.io.IOException;
 public class BlochRenderer implements GLEventListener {
 
     private BlochSphere blochSphere;
-    private GLU glu = new GLU();
+    private final GLU glu = new GLU();
     Texture colormap;
 
     private float radius = 3;

+ 0 - 2
src/de/andreasvoelker/BlochSphere.java

@@ -1,7 +1,5 @@
 package de.andreasvoelker;
 
-import java.util.ArrayList;
-
 public class BlochSphere {
     private static final int INITIAL_RESERVED = 20;
     private static final float GOLDEN_RATIO = 1.618f;

+ 0 - 2
src/de/andreasvoelker/Main.java

@@ -1,7 +1,5 @@
 package de.andreasvoelker;
 
-import javax.swing.*;
-
 public class Main {
 
     public static void main(String[] args) {

+ 10 - 8
src/de/andreasvoelker/MainWindows.java

@@ -1,19 +1,13 @@
 package de.andreasvoelker;
 
-import com.jogamp.opengl.GLCapabilities;
-import com.jogamp.opengl.GLProfile;
-import com.jogamp.opengl.awt.GLCanvas;
-import com.jogamp.opengl.util.Animator;
 import net.miginfocom.swing.MigLayout;
 
 import javax.swing.*;
 import java.io.*;
-import java.util.Locale;
-import java.util.Scanner;
 
 public class MainWindows extends JFrame {
-    JButton button;
-    BlochFrame blochFrame;
+    final JButton button;
+    final BlochFrame blochFrame;
 
     MainWindows(){
         super("BlochRender");
@@ -24,10 +18,18 @@ public class MainWindows extends JFrame {
         button = new JButton("Select File");
         button.addActionListener(e -> chooseFile());
 
+        JLabel label = new JLabel("<html>Select a file with a trajectory to visualize it on a bloch sphere.<br>" +
+                "Each line consist of four floats separated by spaces.<br>"+
+                "The floats should be: time, occupation, real part of polarization, imaginary part of polarization.<br><br>"+
+                "The time is encoded as color and can be changed by changing the file \"colormap.png\".<br>"+
+                "Changes to the colormap currently require to restart this application.</html>");
+
+
         setLayout(new MigLayout("fill"));
 
         add(blochFrame, "grow, span 1 2");
         add(button, "wrap");
+        add(label);
         this.pack();
 
     }