Sanchez- Crab Ridge

Ridge

import rhinoscriptsyntax as rs

import math as mt

def makeClawOutline ():

p1 = 15, .4000, 0
p2 = 5, 6.777, 0
p3 = 4.345, 2.714, 0
p4 = 8.845, 1.752, 0

parc1 = 12.00, 9.000, 0
parc2 = 4.035, 5.569, 0
parc3 = 6.673, 1.721, 0
parc4 = 11.389, 0.325, 0

crv1 = (p1, parc1, p2)
crv2 = (p2, parc2, p3)
crv3 = (p3, parc3, p4)
crv4 = (p4, parc4, p1)

degree = 3

curve1 = rs.AddCurve(crv1, degree)
curve2 = rs.AddCurve(crv2, degree)
curve3 = rs.AddCurve(crv3, degree)
curve4 = rs.AddCurve(crv4, degree)

curves = curve1, curve2, curve3, curve4
rs.JoinCurves(curves, True)

def MakeSpotPattern():
attractor = rs.GetPoint()
print attractor
xlist = rs.frange(1,30, 0.5)
ylist = rs.frange(1,30, 0.5)
for x in xlist:
for y in ylist:
#calculate distance
pt1 = attractor
pt2 = x,y,0
distance = rs.Distance(pt1, pt2)
#make a circle
center = x,y,0
rad = distance/30
rs.AddCircle(center,rad)


def makeTriangles():
ori = 0, 0, 0
p1 = ori
p2 = 1, 2, 0
p3 = 3,0,0

points = p1, p2, p3
Triangle = rs.AddPolyline(points)

rs.JoinCurves(Triangle, True)

def makeInitialShape():
id = rs.GetObject()
return id

def makeRidge():
#make a for loop using a list

id = makeInitialShape()
mylist = range(20)
for item in mylist:
makeTriangles(item, id)

def MakeClaw ():
#makeClawOutline()
#MakeSpotPattern()
makeTriangles()
makeInitialShape()
makeRidge()

MakeClaw()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s