"""

Rhino Python Script Tutorial
Exercise 05

Yet more for.

How about points along a circle?
Let's set the number of points as n, at the very top.
  It's a good idea to have these numbers at the very beginning of the program.
    You'll find and modify them much more quickly, especially as your script grows.

"""

import rhinoscriptsyntax as rs

import math

def Main():
    
    n = 50
    radius = 3
    
    for i in range(0, n): # notice how range() accepts variables
    
    	# a little trick here: as i goes from 0 to n-1, k will go from 0 to 1
    	k = i / (n - 1) 
    	
    	# traverse the full circle
        angle = k * 2 * math.pi 
        
        # and now, work that trigonometry
        rs.AddPoint([radius * math.cos(angle), radius * math.sin(angle),0])
        

Main()
"""

Rhino Python Script Tutorial
Exercise 05

Yet more for.

How about points along a circle?
Let's set the number of points as n, at the very top.
  It's a good idea to have these numbers at the very beginning of the program.
    You'll find and modify them much more quickly, especially as your script grows.

"""

import rhinoscriptsyntax as rs

import math

def Main():
    
    n = 50
    radius = 3
    
    for i in range(0, n): # notice how range() accepts variables
    
    	# a little trick here: as i goes from 0 to n-1, k will go from 0 to 1
    	k = i / (n - 1) 
    	
    	# traverse the full circle
        angle = k * 2 * math.pi 
        
        # and now, work that trigonometry
        rs.AddPoint([radius * math.cos(angle), radius * math.sin(angle),0])
        

Main()
Rhino Python Script Tutorial
 Exercise 05
 
 Yet more for.
 
 How about points along a circle?
 Let's set the number of points as n, at the very top.
   It's a good idea to have these numbers at the very beginning of the program.
     You'll find and modify them much more quickly, especially as your script grows. # notice how range() accepts variables # a little trick here: as i goes from 0 to n-1, k will go from 0 to 1 # traverse the full circle # and now, work that trigonometry