randomPointsInBufferGeometry

Hi,

There used to be a randomPointsInBufferGeometry function in three.js/examples/jsm/utils/GeometryUtils.js, as mentioned by loowee in this post but it’s no longer there.

I’ve looked around in other files, but couldn’t find it. Did I just miss it or has it been removed? If so, is there a reason I should be aware of?

Is there any similar function to randomly fill a volume (not a surface) with points?

Thanks!

Hi!
Approach 1: How fill a loaded STL mesh ( NOT SIMPLE SHAPES LIKE CUBE ETC) with random particles and animate with this geometry bound in three.js - #6 by prisoner849 . Awfully slow, imperfect.
Approach 2: Three-mesh-bvh: A plugin for fast geometry raycasting and spatial queries! . Fast, perfect, awesome, easy-to-use.
Used the second one here: Sand Nefertiti (three-mesh-bvh)

3 Likes

Fascinating. I had a look at the code from sand Nefertiti, but it would help me if you could elaborate on how to fill a mesh with the plugin? Many thanks in advance