This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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. |