[x3d-public] X3D Particle System Emitter for generating random numbers [ Example requested ] Was: Re: x3d-public Digest, Vol 153, Issue 11

John Carlson yottzumm at gmail.com
Sun Dec 5 00:49:24 PST 2021


It's kind of sad if I search on "standard particle system" that X3D is 
not right on the top of the results.

John

On 12/5/21 01:32, John Carlson wrote:
>
> Turns out, some examples are on my local file system!
>
> Holger provided:
>
> ./Library/Tests/Components/ParticleSystems/VolumeEmitter-U.x3d
> ./Library/Tests/Components/ParticleSystems/VolumeEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/ConeEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/Fire.x3d
> ./Library/Tests/Components/ParticleSystems/GeometryLine.x3d
> ./Library/Tests/Components/ParticleSystems/DolphinQuadSurfaceEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/Bubbles.x3d
> ./Library/Tests/Components/ParticleSystems/Geometry.x3d
> ./Library/Tests/Components/ParticleSystems/BoundedPhysicsModel.x3d
> ./Library/Tests/Components/ParticleSystems/Smoke.x3d
> ./Library/Tests/Components/ParticleSystems/PointEmitter.x3d
>
>
> ./Library/Tests/Components/ParticleSystems/ExplosionEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/DolphinPointSurfaceEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/DolphinLineSurfaceEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/PolylineEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/DolphinSurfaceEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/DolphinPointVolumeEmitter.x3d
> ./Library/Tests/Components/ParticleSystems/Waterfall.x3d
> ./Library/Tests/Components/ParticleSystems/SurfaceEmitter.x3d
>
> That's all folks!  Well, there are some emitters in Vrml2Sourcebook, 
> but they seems to be related to sound, and don't use particle system 
> that I know of.
>
> Does X3DOM, FreeWRL or CastleEngine have examples of Emitters or 
> ParticleSystems?
>
> Holger provides various kinds
> ConeEmitter
> ExplosionEmitter
> PointEmitter
> PolylineEmitter
> SurfaceEmitter
> VolumeEmitter
>
> Would one of these be suitable for PRNG?  Ideally, I'd like a ROUTE I 
> can "push out" one or more random numbers from
>
> Here are some of my uses of using Math.random in ECMAScript:
> X3DJSONLD/src/main/data$ grep -h Math.random *x3d|grep -v new|sed 's/[ 
>    ]*//'| sed 's/[     ]*$//'|sort -u
> a = a + Math.floor(Math.random() * 2) * 2 - 1;
> a += Math.random() * 0.2 - 0.1;
> b = b + Math.floor(Math.random() * 2) * 2 - 1;
> b += Math.random() * 0.2 - 0.1;
> c = c + Math.floor(Math.random() * 2) * 2 - 1;
> c += Math.random() * 2 - 1;
> d = d + Math.floor(Math.random() * 2) * 2 - 1;
> d += Math.random() * 2 - 1;
> e += Math.floor(Math.random() * 2) * 2 - 1;
> f += Math.floor(Math.random() * 2) * 2 - 1;
> g += Math.floor(Math.random() * 2) * 2 - 1;
> h += Math.floor(Math.random() * 2) * 2 - 1;
> lastKey = Math.round(Math.random()*(positions.length-1));
> Math.random() - 0.5);
> Math.random() - 0.5);
> Math.random() - 0.5,
> Math.random() - 0.5,
> radians = 6.28*Math.random();
> randomphi = 1.57079*Math.random();
> randomphi = .7854*Math.random();
> randomradius = 90 + 5*Math.random();//the first whole number should be 
> close to the sectionradius
> randomtheta = 6.28319*Math.random();
> scale = Math.round(9+maxscale*Math.random());
> val = Math.floor(Math.random()*2);
> var choice = Math.floor(Math.random() * 4);
> velocity.x + Math.random() * 0.2 - 0.1,
> velocity.x += Math.random() * 0.2 - 0.1;
> velocity.x += Math.random() * 0.2 - 0.1;
> velocity.y + Math.random() * 0.2 - 0.1,
> velocity.y += Math.random() * 0.2 - 0.1;
> velocity.y += Math.random() * 0.2 - 0.1;
> velocity.z + Math.random() * 0.2 - 0.1
> velocity.z += Math.random() * 0.2 - 0.1;
> velocity.z += Math.random() * 0.2 - 0.1;
> X = 50000*Math.random();          //  X horizontal range
> Y = 1000 + 300*Math.random();    //  Y vertical base + range
> Y = 2*Math.random();
> Y = 8000 + 1000*Math.random();   //  Y vertical base + range
> Z = 50000*Math.random();         // z horizontal range
>
> On 12/5/21 00:50, John Carlson wrote:
>> If no one saw this before, I am asking for examples now:
>>
>> On 12/4/21 19:12, John Carlson wrote:
>>> 6.  I request examples of particle system emitters for creating 
>>> random numbers.
>>
>> This will greatly aid my conversions from imperative to declarative X3D.
>>
>> Thanks!  Will do some googling now!
>>
>> John
>>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211205/b7fcc3fc/attachment.html>


More information about the x3d-public mailing list