00001 package edu.tum.cs.vis; 00002 00003 public class CoordinateSystem implements Drawable { 00004 00005 public float size; 00006 00007 public CoordinateSystem(float size) { 00008 this.size = size; 00009 } 00010 00011 public void draw(Canvas c) { 00012 c.pushMatrix(); 00013 c.stroke(255, 0, 0); 00014 c.line(0, 0, 0, size, 0, 0); 00015 c.popMatrix(); 00016 c.pushMatrix(); 00017 c.stroke(0, 255, 0); 00018 c.line(0, 0, 0, 0, size, 0); 00019 c.popMatrix(); 00020 c.pushMatrix(); 00021 c.stroke(0, 0, 255); 00022 c.line(0, 0, 0, 0, 0, size); 00023 c.stroke(0, 0, 0); 00024 c.popMatrix(); 00025 } 00026 }