What is the gradient symbol for
Where did the extra factor of `rlen' come from?
Its the distance vector between two particle positions and rlen is the magnitude of this vector.
My youtube channel: https://www.youtube.com/user/F1nalspace
Where did the extra factor of `rlen' come from?
Its the distance vector between two particle positions and rlen is the magnitude of this vector.
What I mean is that
final float term = 45.0f / ((float)Math.PI * (float)Math.pow(kH, 6) * rlen);
should probably befinal float term = 45.0f / ((float)Math.PI * (float)Math.pow(kH, 6));
Unless you can explain where "the extra factor of rlen" came from.
Where did the extra factor of `rlen' come from?
Its the distance vector between two particle positions and rlen is the magnitude of this vector.
What I mean is thatshould probably befinal float term = 45.0f / ((float)Math.PI * (float)Math.pow(kH, 6) * rlen);
Unless you can explain where "the extra factor of rlen" came from.final float term = 45.0f / ((float)Math.PI * (float)Math.pow(kH, 6));
Observe the different symbols in his equations: the argument to the function is r (bold and upface) which is presumably a vector, whereas the equations contain r (normal weight and slanted) that is used in a scalar context. His code maps to his equation under the assumption that r=|r|.

Never mind. The code does seem correct. Using variations of the letter r to mean different things was too subtle for me.
That was something which had confused me too, the bold r and the normal r but now i now what they mean :)
My youtube channel: https://www.youtube.com/user/F1nalspace