ipyvolume icon indicating copy to clipboard operation
ipyvolume copied to clipboard

Scatter markers disappear after rotation when the number of elements are multiples of 256

Open herrlich10 opened this issue 6 years ago • 4 comments

I've just come across ipyvolume, and want to say thank you for creating such an impressive package.

I encounter a strange bug though, that the scatter elements disappear after using mouse to rotate the scene, if and only if the number of elements are multiples of 256 (i.e., for 256, 512, 25600, etc., but not for 128, 255, 257, etc.). The following snippet should repeat this peculiar behavior on macOS 10.14, Anaconda 2019.03, Python 3.7, ipyvolume 0.5.2.

import ipyvolume as ipv
from numpy.random import randn

N = 256*7 # The multiplier can be other integer...
ipv.figure()
ipv.scatter(randn(N), randn(N), randn(N))
ipv.show()

herrlich10 avatar Jul 18 '19 09:07 herrlich10

Can anyone else replicate this unexpected behavior? Thank you for trying!

herrlich10 avatar Jul 28 '19 10:07 herrlich10

Same issue.

walsvid avatar Aug 08 '19 09:08 walsvid

Same here.

maximilianreimer avatar Sep 10 '19 14:09 maximilianreimer

Thanks for reporting this, the same seen in #289 I think. Thanks for your patience on this, I have spend a considerable amount of time on this already, but haven't been able to find the reason for this.

My hope is that if we use the new InstanceMesh, see

  • https://github.com/mrdoob/three.js/pull/17505
  • https://github.com/maartenbreddels/ipyvolume/issues/276

The problem will resolve itself, a possible workaround is to append (x, y, z) = NaN NaN NaN to it the positions.

maartenbreddels avatar Apr 07 '20 07:04 maartenbreddels