add arc display for direction visualization
This commit is contained in:
parent
1361451d7b
commit
b7dd466f02
|
@ -300,7 +300,7 @@ public class Direction extends Visualization {
|
|||
ellipseMode(RADIUS); //centerx, centery, width,height for ellipse
|
||||
ellipse(super.posOrigin.x, super.posOrigin.y, this.size,this.size);
|
||||
}else{
|
||||
arc(super.posOrigin.x, super.posOrigin.y, this.size*2,this.size*2, 0+this.angleoffset-PI, 2*PI+this.angleoffset-PI, PIE);
|
||||
arc(super.posOrigin.x, super.posOrigin.y, this.size*2,this.size*2, this.angleoffset+2*PI -this.minvisiblevalue/super.valueMin*PI, 2*PI+this.angleoffset +this.maxvisiblevalue/super.valueMax*PI, PIE);
|
||||
}
|
||||
|
||||
stroke(super.cmain);
|
||||
|
|
|
@ -300,7 +300,7 @@ public class Direction extends Visualization {
|
|||
ellipseMode(RADIUS); //centerx, centery, width,height for ellipse
|
||||
ellipse(super.posOrigin.x, super.posOrigin.y, this.size,this.size);
|
||||
}else{
|
||||
arc(super.posOrigin.x, super.posOrigin.y, this.size*2,this.size*2, 0+this.angleoffset-PI, 2*PI+this.angleoffset-PI, PIE);
|
||||
arc(super.posOrigin.x, super.posOrigin.y, this.size*2,this.size*2, this.angleoffset+2*PI -this.minvisiblevalue/super.valueMin*PI, 2*PI+this.angleoffset +this.maxvisiblevalue/super.valueMax*PI, PIE);
|
||||
}
|
||||
|
||||
stroke(super.cmain);
|
||||
|
|
|
@ -13,7 +13,7 @@ void setup() {
|
|||
//vis = new BarH(150,150,100,10,0,100);
|
||||
//vis = new Tacho(150,150,100,0,100);
|
||||
//vis = new Direction(150,150,100,-127/30*360,127/30*360,0,2000,PI/2+PI);
|
||||
vis = new Direction(150,150,100,-127/30*360,127/30*360,0,2000,PI/2+PI, 0,2*PI); //uses arc
|
||||
vis = new Direction(150,150,100,-127/30*360,127/30*360,0,2000,PI/2+PI, -127,127); //uses arc
|
||||
//vis = new GraphRoll(150,150,200,100,0,100, 1);
|
||||
|
||||
vis.setShowMinMax(false);
|
||||
|
|
Loading…
Reference in New Issue