Rhinoscript, Spirals

This codes do that. Spirals.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Option Explicit
'Script written by 
'Script version martes, 16 de septiembre de 2008 13:59:59

Call Main()
Sub Main()
	Dim i, j
	Dim Spcount, count, h, p
 
	count = 45
	Spcount = 12
	h = 20
 
	ReDim arrpt(count)
 
	For i = 0 To Spcount
		For j = 0 To count
 
			Dim shift: shift = 360 / Spcount * i
			Dim rad: rad = 10 * Cos(count * j)
			Dim X: X = Cos((360 / count * j) + shift) * rad
			Dim Y: Y = Sin((360 / count * j) + shift) * rad
			Dim Z: Z = h / count * j
 
			arrpt(j) = Array(X, Y, Z)
 
		Next
		Call Rhino.Addcurve(arrpt)
	Next
 
End Sub

Leave a Reply