How do I paint terrain through C# script?

Hi there,
With the recent release of Splatoon for the Wii U, I wanted to make a kind of Unity remake, to test it out. I can add different textures to the Terrain I’m using at runtime, but I don’t know how I could use code to paint a spot wherever a bullet landed. Right now I just want to add a spot at a specific point on the terrain, and am not worried about making the bullet or anything yet. My code so far looks like this.

using UnityEngine;
using System.Collections;

public class PaintTerrain : MonoBehaviour {
	public Terrain terr;
	
	// Use this for initialization
	void Start () {
		SplatPrototype[] terrainTexture = new SplatPrototype[2]; 
		terrainTexture[0] = new SplatPrototype(); 
		terrainTexture[0].texture = Resources.Load ("white") as Texture2D;
		terrainTexture[1] = new SplatPrototype(); 
		terrainTexture[1].texture = Resources.Load ("cyan") as Texture2D;
		terr.terrainData.splatPrototypes = terrainTexture;
		terr.terrainData.
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}

You could use a projector with a simple paint spalsh.