Hi. Im having a hard time understanding some math behind particle effects especially the explosion thing. I really dont know how the explosion is generated. I wonder if its a random direction or it does use a math formula which i dont know. So im asking if does anyone knows a very well detailed explanation of this that is for beginner. Ive been searching the net but most of them use an engine or a c++. I really looking for java because i am much comfortable with that.
Thanks
Advance happy new year
3 Replies  324 Views  Last Post: 31 December 2013  07:58 AM
#1
Detailed explanation of particles effects with all of its math formula
Posted 28 December 2013  11:28 PM
Replies To: Detailed explanation of particles effects with all of its math formula
#2
Re: Detailed explanation of particles effects with all of its math formula
Posted 29 December 2013  02:04 PM
This is how I do my explosions. In this case I'm using a Sphere3d object, but you can use anything. I use this for creating little splashes such as when a raindrop hits the ground, or for blood when something gets shot, and basically anything involving droplets.
I use spherical coordinates to generate a velocity vector in random directions.
I use spherical coordinates to generate a velocity vector in random directions.
public LinkedList<Sphere3d> createExplosion(Vector3d position, Vector3d velocity, double outwardSpeed, int count, double radius) { LinkedList<Sphere3d> list = new LinkedList<Sphere3d>(); for (int i = 0; i < count; i++) { list.add(new Sphere3d(position, Vector3d.getRandomUnitVector().mulLocal(outwardSpeed).addLocal(velocity), // < the velocity of the Sphere3d radius)); } return list; } . . . . public class Vector3d { // code removed for brevity public static final Vector3d getRandomUnitVector() { return getRandomUnitVector(MathConsts.PI, MathConsts.TWO_PI); } public static final Vector3d getRandomUnitVector(double thetaRange, double phiRange) { return fromSpherical(1, RandLookUp.nextDouble(thetaRange), RandLookUp.nextDouble(phiRange)); } public static Vector3d fromSpherical(double r, double theta, double phi) { return new Vector3d(r * Math.sin(theta) * Math.cos(phi), r * Math.sin(theta) * Math.sin(phi), r * Math.cos(theta)); } }
This post has been edited by carnivroar: 29 December 2013  02:16 PM
#3
Re: Detailed explanation of particles effects with all of its math formula
Posted 29 December 2013  09:00 PM
I've found some good articles on Particles which include some math formulas.
Applied Mathematics and Scientiﬁc Computing in the Visual Eﬀects Industry
Smoothedparticle hydrodynamics
Particle system
Particles tutorial part1  get something on the Screen
Particle System  Step by Step
Chapter 4. Particle Systems In Detail
These are just a few articles out of thousands available on the internet. I hope this helps in your understanding of particle effects and particle systems.
Applied Mathematics and Scientiﬁc Computing in the Visual Eﬀects Industry
Smoothedparticle hydrodynamics
Particle system
Particles tutorial part1  get something on the Screen
Particle System  Step by Step
Chapter 4. Particle Systems In Detail
These are just a few articles out of thousands available on the internet. I hope this helps in your understanding of particle effects and particle systems.
#4
Re: Detailed explanation of particles effects with all of its math formula
Posted 31 December 2013  07:58 AM
aaron1178, on 29 December 2013  09:00 PM, said:
I've found some good articles on Particles which include some math formulas.
Applied Mathematics and Scientiﬁc Computing in the Visual Eﬀects Industry
Smoothedparticle hydrodynamics
Particle system
Particles tutorial part1  get something on the Screen
Particle System  Step by Step
Chapter 4. Particle Systems In Detail
These are just a few articles out of thousands available on the internet. I hope this helps in your understanding of particle effects and particle systems.
Applied Mathematics and Scientiﬁc Computing in the Visual Eﬀects Industry
Smoothedparticle hydrodynamics
Particle system
Particles tutorial part1  get something on the Screen
Particle System  Step by Step
Chapter 4. Particle Systems In Detail
These are just a few articles out of thousands available on the internet. I hope this helps in your understanding of particle effects and particle systems.
Wow Cool.. Thank you very much for the links
Page 1 of 1
