Tan Curve
Ascending Tan Curve
Tan Curve Graph
1
a = Dictionary.ValueAtKey(DateTime.Components(d), "second")*(1000/60);
2
3
x1 = 0..Math.PiTimes2..#1000;
4
y1 = Math.Tan(0..360..#1000);
5
p1 = Point.ByCoordinates(List.TakeItems(x1,a),List.TakeItems(y1,a));
6
7
//Visualization
8
p2 = Point.ByCoordinates(-1,List.LastItem(p1).Y);
9
a1 = Circle.ByCenterPointRadius(Point.ByCoordinates(-2),1);
10
l1 = Line.ByStartPointEndPoint(Point.ByCoordinates(-2),p2);
11
l2 = Line.ByStartPointEndPoint(List.LastItem(p1),p2);
12
l3 = Line.ByStartPointEndPoint(p2,Point.ByCoordinates(p2.X));
13
l4 = Line.ByStartPointEndPoint(List.LastItem(p1),Point.ByCoordinates(List.LastItem(p1).X));
14
c1 = GeometryColor.ByGeometryColor(p1,Color.ByARGB(255,255,0,0));
15
c2 = GeometryColor.ByGeometryColor([l1,l2],Color.ByARGB(255,0,0,255));
16
c3 = GeometryColor.ByGeometryColor([l3,l4],Color.ByARGB(255,255,165,0));
Copied!
tanCurve.zip
2KB
Binary
Dynamo Version 2.11
Rising Tan
1
a = Dictionary.ValueAtKey(DateTime.Components(d), "second")-1;
2
3
x = Math.Tan(280..440..#60);
4
y = (0..Math.PiTimes2..#60)/5;
5
yy1 = List.Flatten(List.Transpose([List.OfRepeatedItem(0,60-(1..60)),List.TakeItems(y,(1..60))])<1>,-1);
6
pt1 = Point.ByCoordinates(x,yy1<1>);
7
nc1 = NurbsCurve.ByPoints(pt1,1);
8
nc2 = List.LastItem(nc1).Translate(Vector.YAxis(),List.LastItem(yy1));
9
nc3 = List.GetItemAtIndex(nc2,a).Translate(Vector.YAxis(),(0..#4..1.3));
10
nc4 = List.GetItemAtIndex([nc1,nc2]<1>,a);
11
12
//Visualization
13
ln1 = Line.ByStartPointEndPoint(nc1[0].StartPoint,nc1[0].EndPoint);
14
ln2 = Line.ByStartPointDirectionLength(Point.ByCoordinates(0,-2.5),Vector.YAxis(),9);
15
pt2 = List.GetItemAtIndex(List.Reverse(pt1<1>),a);
16
pt3 = List.GetItemAtIndex(pt2,List.IndexOf(Math.Round(pt2.Y,3),0.0));
17
ln3 = Line.ByStartPointEndPoint(Point.ByCoordinates(0,-1),Point.ByCoordinates(pt3.X)).ExtendStart(1);
18
ci1 = Circle.ByCenterPointRadius(Point.ByCoordinates(0,-1),1);
19
ci2 = Circle.ByCenterPointRadius([ln3.StartPoint,ln3.EndPoint],0.1).Patch();
20
ln4 = ln3.ExtendStart(10);
21
22
//Color
23
cl1 = GeometryColor.ByGeometryColor(ci1,Color.ByARGB(255,0,0,255));
24
cl2 = GeometryColor.ByGeometryColor(ci2,Color.ByARGB(255,255,0,0));
25
cl3 = GeometryColor.ByGeometryColor(ln4,Color.ByARGB(255,0,255,0));
26
cl4 = GeometryColor.ByGeometryColor([ln1,ln2],Color.ByARGB(255,0,255,255));
Copied!
risingTan.zip
3KB
Binary
Dynamo Version 2.11
Last modified 11mo ago
Copy link