Commit 8c518806 by Philipp Adolf

temp

parent 95d087ee
......@@ -1057,17 +1057,14 @@ QVector3D Subdivision::updateIrregularVertexForDraw(Vertex currentCorner, QVecto
QVector3D newPos(0.0, 0.0, 0.0);
double n = surroundingVertex.length() + 1;
qDebug() << n;
qDebug() << currentCorner;
qDebug() << surroundingVertex;
double n = surroundingVertex.length();
double a = 5.0/8.0 - pow((3.0 / 8.0 + 2.0/8.0 * cos(2.0 * M_PI / n)), 2.0);
double omega = 3.0 * n / (8.0 * a);
for (int i = 0; i < surroundingVertex.length(); i++) {
newPos += surroundingVertex[i].pos;
}
newPos *= a / n;
newPos += omega * a / n * currentCorner.pos;
newPos *= 1.0 / (omega + n);
newPos += omega / (omega + n) * currentCorner.pos;
return newPos;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment