Skip to content

Instantly share code, notes, and snippets.

View angellinares's full-sized avatar

Ángel Linares García angellinares

View GitHub Profile
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
:: Config parameters
SET groupsize=100
:: initial counter, everytime counter is 1, we create new folder
SET n=1
:: folder counter
SET nf=0
import Rhino.Geometry as rg
from Grasshopper import DataTree as Tree
from Grasshopper.Kernel.Data import GH_Path as Path
ptList = []
ptTree = Tree[object]()
pl = []
for i in range(uDiv+1):
ptListTemp = []
"""
Author: Ángel Linares García.
Date: 150821
Description: This scripts takes
selected text objects in Rhino and creates
3dpoints located at the height contained in
the text object.
"""
##############################
/* passable motion blur effect using frame blending
* basically move your 'draw()' into 'sample()', time runs from 0 to 1
* by dave
* http://beesandbombs.tumblr.com
*/
int samplesPerFrame = 32; // more is better but slower. 32 is enough probably
int numFrames = 48;
float shutterAngle = 2.0; // this should be between 0 and 1 realistically. exaggerated for effect here
int[][] result;
@angellinares
angellinares / gist:4625230
Created January 24, 2013 17:11
Simple translation (without OOP) of the random walker explained by @shiffman in #TheNatureOfCode book to #rhinopython.
#Small ramdom walk agent v3.0
#Added custom step scale per direction.
#@Angel - Pythones 2013.
#Importing modules.
import rhinoscriptsyntax as rs
import math as m
import random as r
def walker (strLocation, dblStepSizeX, dblStepSizeY, dblStepSizeD, strMode):