algorithmic modeling for Rhino
Hi,
I am attempting to 'cull' through rows of points with the modulo operator. Essentially, I wish to partition the grid like in native GH. As can be seen in the screenshot, when I calculate y % 2, I am choosing the left column. Also, can this be made parametric?
When I adjust the step multiplier, the row selection becomes variable.
#input 10 for x and y inputs
import rhinoscriptsyntax as rsdef grid():
for i in range(X):
for j in range(Y):
x = i*step
y = j*step
if x % X and y % (Y-8):
pt1 = rs.AddPoint(x,y,0)
a.append(pt1)
else:
p2 = rs.AddPoint(x,y,0)
b.append(p2)
grid()
Tags:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by