Recent content by johnnyk427

  1. J

    Gradient question for fluid simulation

    Thanks :) It's actually in Cartesian coordinates, x and y (it's 2d, not 3d). When I calculate this function, I first compute the distance from 0,0 to x,y, and assign that to 'r'. 'h' is a constant (representing the size of the kernel I'm applying). So maybe I want something like...
  2. J

    Gradient question for fluid simulation

    Simple gradient question.. I have a kernel function that determines the influence of each water droplet given a radius r: (10/pi*h^5)*(h-r)^3 The gradient of that is: (-30/pi*h^5)*(h-r)^2 But 'r' is not a vector, its a scalar, its just the distance to the point in question. So how do...
Back
Top