/**
* A class representing arcs of BoundaryCircles which contribute to the
* boundary of a fundamental domain.
*
* @author Jonathan A. Poritz
* @version 1.7, 17 Sep 1998
*/
public class BoundaryArc extends BoundaryCircle {
/**
* The starting angle of the arc on this boundary circle.
*/
double start;
/**
* The ending angle of the arc on this boundary circle.
*/
double end;
/**
* Constructor for non-trivial BoundaryArcs.
*
* @param z11 the (1,1) entry of the current trace's generator matrix
* @param dist the current axis distance
* @param ndx the index of this BoundaryCircle
* @param domaintype the selected index of outputpanel's
* Choice fordordirichlet
* @param a starting angle of this arc
* @param b ending angle of this arc
*/
public BoundaryArc(Complex z11, double dist, int ndx, int domaintype, double a, double b) {
super(z11, dist, ndx, domaintype);
start = a;
end = b;
}
/**
* Constructor for trivial BoundaryArcs.
*/
public BoundaryArc() {
super();
start = 0D;
end = 0D;
}
/**
* Makes a negative BoundaryArc corresponding to the input of a
* positive one.
*
* @param pos the positive BoundaryArc to be copied and negated
* @returns the new negative BoundaryArc
*/
public static BoundaryArc makeNeg(BoundaryArc pos) {
// copy the input BoundaryArc
BoundaryArc neg = pos.copyArc();
// make the index negative and take one minus the center
neg.index = -pos.index;
neg.cen = Complex.subtract(Complex.ONE, pos.cen);
return neg;
}
/**
* Copies this BoundaryArc, by making a trivial BoundaryArc and
* then copying into it this's center, radius, index, start and end
*/
public BoundaryArc copyArc() {
BoundaryArc x = new BoundaryArc();
x.cen.x = this.cen.x;
x.cen.y = this.cen.y;
x.rad = this.rad;
x.index = this.index;
x.start = this.start;
x.end = this.end;
return x;
}
}