First and foremost, hey all. ive been to this site before for some other help with my projects and its been very informative, so thanks!

now to my problem. Im trying to make a particle system and the math is making my head hurt somewhat. i have a vector which is designated my "up" vector (ie the direction in which the particles will come out) which for the case of testing up = {x=0.57735026 y=0.57735026 z=0.57735026 } (the vector is the normalised form of (x=1, y=1, z=1). and i have a couple of other variables also, one is the spread, which is the angle that the particle will deviate from the up vector in any given direction(its a random number between 0 and the maximum spread), and there is the velocity (which is also a random between 0 and maximum velocity). which i am multiplying by the resultant vector after i do some REALLY bad math. to make it somewhat cleared (or more cloudy.. we will see) here is what i currently have (i have it in c++ so i will try to make it as universely friendly as possible)

Vector spread = (x= -maxSpread < x < maxSpread, y= -maxSpread < y < maxSpread, z= -maxSpread < z < maxSpread)

Vector direction = (up * spread) * (0 < x < maxVelocity)

i get some results, but they arent even close to what i want. its just plain... weird

if anyone knows what i am on about, and if they could explain it to me, the help would be greatly appreciated.

i apologize for the wall of text and thanks for your help