fat edges in linepatterns in 3D

This commit is contained in:
Zeno Rogue
2020-01-28 17:58:55 +01:00
parent f20a6bf2f6
commit 9f947c70a7
5 changed files with 49 additions and 1 deletions
+10
View File
@@ -3592,8 +3592,18 @@ EX ld precise_width = .5;
int grid_depth = 0;
EX bool fat_edges = false;
EX void gridline(const transmatrix& V1, const hyperpoint h1, const transmatrix& V2, const hyperpoint h2, color_t col, int prec) {
ld d = hdist(V1*h1, V2*h2);
if(WDIM == 3 && fat_edges) {
transmatrix T = V1 * rgpushxto0(h1);
transmatrix S = rspintox(inverse(T) * V2 * h2);
queuepoly(T * S, cgi.generate_pipe(d, vid.linewidth), col);
return;
}
while(d > precise_width && d < 100 && grid_depth < 10) {
if(!eqmatrix(V1, V2, 1e-6)) { gridline(V1, h1, V1, inverse(V1) * V2 * h2, col, prec); return; }
hyperpoint h = midz(h1, h2);