If it’s in 2D, which I guess it is, ‘cos you said circle not sphere…. how about
on the anchorPoint
circleRadius = 100; //the radius of your circle
seedRandom(this.index, true);
[random(circleRadius),value[1]];
//[random(circleRadius), value[1]]; //uncomment this for in a circle, instead of inside a circle
then on the z rotation:
seedRandom(this.index, true);
random(360);
then set the position to the centre of your circle.
It’s a fairly simplistic method, but it should work. If you don’t want to move the anchorPoint, you need a bit more math. You could put…
circleCentre = [100,100]; //your circle centre
seedRandom(this.index,true);
circleRadius = random(100); //your circle radius
//circleRadius = 100; //uncomment this if they should be in a circle rather than inside a circle!
tRnd = degreesToRadians(random(360));
circleCentre + circleRadius*[Math.cos(tRnd), Math.sin(tRnd)];
on the position property.
If it is in 3D space, just put the z rotation expression on the y and x too.
-Ben.
vfx.benrollason.com