When using rgl, I am trying to get smooth lines drawn in 3D space. At certain view angles, the lines join smoothly together; at other view angles, they look completely disjointed.
For example, using 3dlines
to draw the following:
x = c(-32.76755,-32.84534,-32.90371,-32.94217,-32.96003,-32.95662,-33.04784,-33.03502,-32.98490,-32.86505,-32.79418,-32.59470,-32.52399,-32.44813,-32.23378,-32.18913)
y = c(13.15037,12.38736,11.65954,10.9627,10.29022,9.6338,8.67939,7.70395,7.04928,6.05184,5.37749,4.35355,3.64888,2.92609,1.86025,1.11037)
z = c(1.54869,2.22778,2.94911,3.70456,4.48397,5.27592,5.11489,4.94259,5.70322,5.48567,6.18623,5.90521,6.53304,7.12764,6.74987,7.29049)
with a line width of 10
:
lines3d(x=x, y=y, z=z, lwd=10)
at this angle, it looks ok:
par3d(userMatrix = matrix(data = c(0.7643722, -0.0511867, -0.6427402, 0, -0.5819589, 0.3744012, -0.7219055, 0, 0.2775946, 0.9258529, 0.2563933, 0, 0, 0, 0, 1), nrow=4, ncol=4))
but here, there is an issue with the joining between the lines:
par3d(userMatrix = matrix(data = c(0.85497350, -0.02970354, -0.51782036, 0, -0.4698080, 0.3786791, -0.7974223, 0, 0.2197740, 0.9250512, 0.3098056, 0, 0, 0, 0, 1), nrow=4, ncol=4))
Is this just a limitation of rgl, or is there a setting I'm missing here?