final Vector2D endFaktor) {
Vector2D aktVekX;
Vector2D aktVekY;
Vector2D aktVek;
LineSegment2D p, q;
if (punkte == null || punkte.nPoints() < 2) {
throw new RuntimeException("Zu wenige Segmente für Pfeil.");
}
List<Double> dick = dicken;
if (dick == null) {
dick = new ArrayList<Double>(punkte.nPoints());
for (int i = 0; i < punkte.nPoints(); i++) {
dick.add((double) this.pfeilDicke);
}
}
Polygon2D pktList1 = new Polygon2D();
Polygon2D pktList2 = new Polygon2D();
// Pfeilanfang.
Vector2D normAnf = new Vector2D(punkte.get(0));
Vector2D orthoAnf;
normAnf.sub(punkte.get(1));
normAnf.norm();
orthoAnf = new Vector2D(normAnf);
orthoAnf.ortho();
Iterator<Vector2D> it1 = pfeilAnfang.iterator();
Polygon2D zwisch = new Polygon2D();
while (it1.hasNext()) {
aktVek = it1.next();
aktVekX = new Vector2D(orthoAnf);
aktVekY = new Vector2D(normAnf);
aktVekX.mult(aktVek.x * anfFaktor.x * dick.get(0));
aktVekY.mult(aktVek.y * anfFaktor.y * dick.get(0));
aktVek = new Vector2D(aktVekX);
aktVek.translate(aktVekY);
aktVek.translate(punkte.get(0));
zwisch.add(aktVek);
}
for (int i = zwisch.nPoints() - 1; i >= 0; i--) {
pktList2.add(zwisch.get(i));
}
Polygon2D zwischPunkte;
Vector2D c1 = new Vector2D(punkte.get(1));
Vector2D c2;
c1.sub(punkte.get(0));
c1.ortho();
c1.norm();
c1.mult(dick.get(0) / 2);
Vector2D p01 = new Vector2D(punkte.get(0));
Vector2D p02 = new Vector2D(p01);
Vector2D p11;
Vector2D p12;
p01.translate(c1);
p02.sub(c1);
pktList1.add(p01);
pktList2.add(p02);
for (int i = 1; i < punkte.nPoints() - 1; i++) {
zwischPunkte = eas.math.geometry.Geometry2D.schnPkte(
punkte.get(i - 1),
punkte.get(i),
punkte.get(i + 1),
dick.get(i));
p = new LineSegment2D(
zwischPunkte.get(0),
zwischPunkte.get(1));
q = new LineSegment2D(
pktList1.get(pktList1.nPoints() - 1),
pktList2.get(pktList2.nPoints() - 1));
if (p.intersects(q) == null) {
pktList1.add(zwischPunkte.get(0));
pktList2.add(zwischPunkte.get(1));
} else {
StaticMethods.log(StaticMethods.LOG_WARNING,
"Segment konnte nicht überschneidungsfrei "