tmp.set(o.yAxis).scaleSelf(cosStart);
Vec3D t0 = new Vec3D(o.xAxis).scaleSelf(-sinStart).addSelf(tmp);
Vec4D[] cps = new Vec4D[n + 1];
cps[0] = new Vec4D(p0, 1);
int index = 0;
double angle = thetaStart;
Vec3D p1 = new Vec3D();
Vec3D p2 = new Vec3D();
Vec3D t2 = new Vec3D();
for (int i = 1; i <= narcs; i++) {
angle += dtheta;
final double sin = Math.sin(angle);
final double cos = Math.cos(angle);
tmp.set(o.xAxis).scaleSelf((float) (r * cos));
p2.set(o.origin).addSelf(tmp);
tmp.set(o.yAxis).scaleSelf((float) (r * sin));
p2.addSelf(tmp);
cps[index + 2] = new Vec4D(p2, 1);
t2.set(o.xAxis).scaleSelf((float) -sin);
tmp.set(o.yAxis).scaleSelf((float) cos);
t2.addSelf(tmp);
lineIntersect3D(p0, t0, p2, t2, p1, p1);
cps[index + 1] = new Vec4D(p1, (float) w1);
index += 2;
if (i < narcs) {
p0.set(p2);
t0.set(t2);
}