attractor point
check your knowledge
[Pause the video and take a moment to practice using attractor points]
Use the attractor point system in the Nested Loop: 2D Point Matrix code to manipulate the rotational angle of the transformed geometry.
tutorial code
#ATTRACTOR POINT
import rhinoscriptsyntax as rs
#create an empty list
ptList = []
#input a point to use as an attractor
attrPt = rs.GetObject('select an attractor point',rs.filter.point)
#incremental loop to generate points
for i in range(10):
for j in range(10):
#define x in terms of i
#define y in terms of j
x = i
y = j
z = 0
rs.AddPoint(x,y,z)
#rs.AddTextDot((x,y,z), (x,y,z))
#save point values in a list
ptList.append((x,y,z))
#loop through point list and print out index number and values
for i in range(len(ptList)):
# print i, ':', ptList[i]
# rs.AddTextDot(i, ptList[i])
####CREATE TRANSFORMATION OF GEOMETRY####
#measure distance between attractor point and current point in the list
distance = rs.Distance(ptList[i], attrPt)
print distance/20
#create circle using distance value as radius
rs.AddCircle(ptList[i], distance/20)
Design Computing: 3D Modeling in Rhinoceros with Python Rhinoscript

Our purpose is to transform access to education.
We offer a diverse selection of courses from leading universities and cultural institutions from around the world. These are delivered one step at a time, and are accessible on mobile, tablet and desktop, so you can fit learning around your life.
We believe learning should be an enjoyable, social experience, so our courses offer the opportunity to discuss what you’re learning with others as you go, helping you make fresh discoveries and form new ideas.
You can unlock new opportunities with unlimited access to hundreds of online short courses for a year by subscribing to our Unlimited package. Build your knowledge with top universities and organisations.
Learn more about how FutureLearn is transforming access to education