Gaussian Representations for Differentiable Rendering and Optimization