add xyz axes
This commit is contained in:
parent
b544c486af
commit
61e26dc007
@ -7,6 +7,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
import lsystem.screen.MainFrame;
|
||||
import lsystem.screen.SwingGLCanvas;
|
||||
|
||||
public class Main {
|
||||
|
||||
@ -16,6 +17,7 @@ public class Main {
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
|
||||
SwingGLCanvas canvas = new SwingGLCanvas();
|
||||
|
||||
final Scanner scanner = new Scanner(System.in);
|
||||
String axiom = null;
|
||||
|
@ -66,11 +66,21 @@ public class JoglEventListener implements GLEventListener {
|
||||
0.0f, 1.0f, 0.0f
|
||||
);
|
||||
|
||||
gl.glRotatef(angle, 0f, 1f, 0f);
|
||||
/* gl.glRotatef(angle, 0f, 1f, 0f);
|
||||
|
||||
gl.glColor3f(1.0f, 0.0f, 0.0f);
|
||||
glut.glutSolidSphere(1.0f, 20, 20);
|
||||
|
||||
glut.glutSolidSphere(1.0f, 20, 20); */
|
||||
gl.glColor3f(1f, 1f, 1f);
|
||||
gl.glBegin(GL2.GL_LINES);
|
||||
gl.glVertex3f(0f, 0f, 0f);
|
||||
gl.glVertex3f(1f, 0f, 0f);
|
||||
gl.glVertex3f(0f, 0f, 0f);
|
||||
gl.glVertex3f(0f, 1f, 0f);
|
||||
gl.glVertex3f(0f, 0f, 0f);
|
||||
gl.glVertex3f(0f, 0f, 1f);
|
||||
gl.glEnd();
|
||||
gl.glRasterPos3f(1.1f, 0.0f, 0.0f);
|
||||
glut.glutBitmapCharacter(GLUT.BITMAP_HELVETICA_18, 'X');
|
||||
angle += 0.1f;
|
||||
angle %= 360f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user