Trying to learn how Opacity
works, I found a possible issue.
Generating points in a square spiral with:
sqrSpiral[rev_, inc_] := Module[{x, y, z, dx, dy, list = {}},
x = y = z = 0;
dx = {0, 1, 0, -1}; dy = {1, 0, -1, 0};
Do[
Do[
list = Append[list, {x += dx[[i]], y += dy[[i]], z += inc}], {i, 4}
], {rev}]; list
]
and applying it in Graphics like so:
pts = sqrSpiral[50, 0.005];
line = Line[pts];
Graphics3D[{Thickness[0.01], Opacity[0.5], Red, line}, Boxed -> False]
gives the following strange appearence:
As you can see, of all the overlapping lines from the current viewpoint, only the far left corners, seem to be rendered correctly. While turning the spiral as to view it from below, seem to render the lines in a more expected way.
Why is this the case?
(If you have an answer, please feel free to refine my procedural code:)
Style[%, "RenderingOptions" -> {"Graphics3DRenderingEngine" -> "BSPTree"}]
$\endgroup$