Skip to content

Instantly share code, notes, and snippets.

@mattishi
mattishi / gist:3853209
Created October 8, 2012 15:50 — forked from bengolder/gist:1054969
Grasshopper Drain Boid Script
import Rhino
class DrainBoid(object):
def __init__(self, point3d, surface, stepsize=0.5, maxsteps=None, tolerance=0.001):
self.start = point3d
self.pos = self.start
result, self.u, self.v = surface.ClosestPoint(self.pos)
self.surface = surface
self.stepsize = stepsize
self.points = [self.start]
@mattishi
mattishi / LinqPadPrecompiler.cs
Created August 19, 2012 21:55 — forked from kiliman/LinqPadPrecompiler.cs
LinqPadPrecompiler for CS-Script http://www.csscript.net/
// Written by Michael Carter (kiliman@systemex.net)
// Copyright (c) 2012. All rights reserved.
//
// Redistribution and use of this code WITHOUT MODIFICATIONS are permitted provided that
// the following conditions are met:
// 1. Redistributions must retain the above copyright notice, this list of conditions
// and the following disclaimer.
// 2. Neither the name of an author nor the names of the contributors may be used
// to endorse or promote products derived from this software without specific
// prior written permission.