Design Script contest (2)

The challenge is to reproduce this in design script
I have a few more coming
Have fun

3 Likes

@Marcel_Rijsmus Hope I’m not killing the motive and intent of the challenge too early :smirk:
I’m assuming alternate solutions might also be provided

tanCurve

a = Dictionary.ValueAtKey(DateTime.Components(d), "second")*(1000/60);

x1 = 0..Math.PiTimes2..#1000;
y1 = Math.Tan(0..360..#1000);
p1 = Point.ByCoordinates(List.TakeItems(x1,a),List.TakeItems(y1,a));

//Visualization
p2 = Point.ByCoordinates(-1,List.LastItem(p1).Y);
a1 = Circle.ByCenterPointRadius(Point.ByCoordinates(-2),1);
l1 = Line.ByStartPointEndPoint(Point.ByCoordinates(-2),p2);
l2 = Line.ByStartPointEndPoint(List.LastItem(p1),p2);
l3 = Line.ByStartPointEndPoint(p2,Point.ByCoordinates(p2.X));
l4 = Line.ByStartPointEndPoint(List.LastItem(p1),Point.ByCoordinates(List.LastItem(p1).X));
c1 = GeometryColor.ByGeometryColor(p1,Color.ByARGB(255,255,0,0));
c2 = GeometryColor.ByGeometryColor([l1,l2],Color.ByARGB(255,0,0,255));
c3 = GeometryColor.ByGeometryColor([l3,l4],Color.ByARGB(255,255,165,0));
3 Likes

Doesn’t matter
As long as you dont post too soon on the last challenge where it all comes together.
:slight_smile:

2 Likes