# Rolling Spiral

![Rolling Spiral](https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MSWDF0IGCw2CUfcxR7m%2F-MSWDUL7KyWkcOT0IQ8q%2FsinCosSpiral.gif?alt=media\&token=48a0ded0-465d-4bde-bc11-20b0e2930a2a)

```d
a = Dictionary.ValueAtKey(DateTime.Components(d), "second")*12;

x1 = (0..(Math.PiTimes2)..#500);
y1 = Math.Sin(a..(a+360)*3..#500);
z1 = Math.Cos(a..(a+360)*3..#500);
n1 = NurbsCurve.ByPoints(Point.ByCoordinates(x1,y1+4));
n2 = NurbsCurve.ByPoints(Point.ByCoordinates(x1,0,z1+4));
n3 = NurbsCurve.ByPoints(Point.ByCoordinates(x1,y1+4,z1+4));
l1 = Line.ByStartPointEndPoint(n1.StartPoint,n3.StartPoint);
l2 = Line.ByStartPointEndPoint(n2.StartPoint,n3.StartPoint);
c1 = GeometryColor.ByGeometryColor([n1,l1],Color.ByARGB(255,0,0,255));
c2 = GeometryColor.ByGeometryColor([n2,l2],Color.ByARGB(255,255,0,0));
```

![](https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MSWEdFo5OQnGGymeKZm%2F-MSWEtxPhm6x5eC13t17%2Fspiral_2021-01-31_01-39-20.png?alt=media\&token=06d54b94-fa2a-4c0d-93a1-a44270f93552)

{% file src="<https://1430428134-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ld8QK19sjP1I9rhLouo%2F-MSWDF0IGCw2CUfcxR7m%2F-MSWDt-Q8pf_ofqE8Kzh%2FrollingSpiral.zip?alt=media&token=62fde05c-1322-4791-b872-b3107eb779b2>" %}
