Rafi, sorry I've had no time to look at the curve problem yet - it's a tricky one and probably needs some time to figure the logics of it. Basically you need to look at a distance to point length and vector to curve direction relationship. Have you had a look at the grasshopper field definition?
Dirk Anderson
Jul 16, 2009