Lecture 17: Physical Simulation (70)
jamespear

Vector fields have always been a representation of math I found interesting, especially after learning about gradient descent. Seeing how it can be implemented to represent different pixels is interesting, but also begs the question for me of how to optimize taking all these gradients? I imagine it take a lot of computational power.

CLV-Iclucia

@jamespear Actually taking the numerical approximation of derivatives is very fast on grids/pixels. Some simple linear combinations can just do that and can achieve a convincing result. This is very different from taking derivatives in NN, which often requires an automatic differentiation. However, sometimes accessing nearby data often cause cache miss(like if you store the matrix in row major order but you need to use (x, y-1) and (x, y+1)) and can harm performance. We can combat this by changing the memory layout to make it cache friendly.

You must be enrolled in the course to comment