Swing

Reset all Swings

@farrarscott
www.scottfarrar.com

H = (100, 100)
G = (0, 100)
F = (100, 0)
C = (0, 0)
swingZone = Polygon({C, F, H, G})
t = 0 (slider from 0 to 1, step 0.001)
h = Function({-6.071416208277649, -1.1960270455105806, -0.0130824935696429, -7.709047747765778E-4, 0.011540684020089745, 0.023852272814956065, 0.07925442239185451, 0.09156601118672082, 0.10387759998158715, 0.11618918877645347, 0.12234498317388665, 0.1285007775713198, 0.13465657196875297, 0.16235764675720218, 0.1900587215456514, 0.20237031034051775, 0.21468189913538405, 0.22699348793025037, 0.23314928232768353, 0.2393050767251167, 0.24546087112254986, 0.2577724599174162, 0.2700840487122825, 0.2823956375071488, 0.3377977870840473, 0.3439535814814804, 0.35010937587891355, 0.35626517027634674, 0.40243362825709544, 0.44860208623784414, 0.5040042358147426, 0.5317053106031918, 0.559406385391641, 0.6148085349685395, 0.6425096097569887, 0.670210684545438, 0.7256128341223363, 0.7533139089107856, 0.7810149836992348, 0.8364171332761333, 0.8641182080645825, 0.8918192828530317, 0.9472214324299302, 0.9533772268273634, 0.9595330212247966, 0.9656888156222296, 1.0118572736029785, 1.0580257315837271, 1.1134278811606255, 1.131895264352925, 1.1503626475452244, 1.168830030737524, 1.174985825134957, 1.1811416195323903, 1.1872974139298234, 1.233465871910572, 1.2796343298913209, 1.285790124288754, 1.291945918686187, 1.2981017130836203, 1.3904386290451178, 1.396594423442551, 1.4027502178399842, 1.4089060122374173, 1.4827755450066151, 1.5566450777758132, 1.6120472273527116, 1.6397483021411607, 1.66744937692961, 1.7967210592757064, 1.8244221340641555, 1.8521232088526047, 1.9075253584295033, 1.9444601248141022, 1.9813948911987014, 2.0183296575833003, 2.129133956737097, 2.239938255890894, 2.3322751718523915, 2.3599762466408407, 2.38767732142929, 2.4430794710061883, 2.5538837701599855, 2.664688069313782, 2.73855760208298, 2.812427134852178, 2.8862966676213757, 3.0155683499674724, 3.0432694247559215, 3.0709704995443707, 3.126372649121269, 3.1940863874930336, 3.2618001258647986, 3.3295138642365636, 3.357214939025013, 3.384916013813462, 3.45878554658266, 3.486486621371109, 3.514187696159558, 3.5695898457364565, 3.5972909205249057, 3.624991995313355, 3.6803941448902537, 3.708095219678703, 3.735796294467152, 3.7911984440440505, 3.8188995188324997, 3.846600593620949, 3.9020027431978472, 3.9297038179862964, 3.9574048927747456, 3.969716481569612, 3.9820280703644784, 3.994339659159345, 4.049741808736243, 4.077442883524693, 4.105143958313142, 4.16054610789004, 4.1790134910823395, 4.197480874274639, 4.2159482574669385, 4.243649332255387, 4.271350407043837, 4.326752556620735, 4.332908351018168, 4.339064145415602, 4.345219939813035, 4.372921014601484, 4.400622089389933, 4.4129336781848, 4.425245266979665, 4.437556855774532, 4.511426388543731, 4.523737977338597, 4.536049566133463, 4.54836115492833, 4.576062229716779, 4.603763304505228, 4.609919098902661, 4.616074893300095, 4.622230687697527, 4.677632837274426, 4.689944426069292, 4.702256014864158, 4.714567603659025, 4.733034986851324, 4.751502370043624, 4.769969753235923, 4.776125547633356, 4.78228134203079, 4.7884371364282226, 4.800748725223088, 4.813060314017956, 4.8253719028128215, 4.843839286005121, 4.86230666919742, 4.88077405238972, 4.9084751271781695, 4.936176201966618, 4.936176201966618, 4.936176201966618, 4.936176201966618, 4.936176201966618, 4.963877276755067, 4.991578351543517, 4.9977341459409494, 5.003889940338383, 5.010045734735816, 5.022357323530682, 5.034668912325549, 5.046980501120415, 5.053136295517848, 5.059292089915282, 5.065447884312714, 5.077759473107581, 5.090071061902447, 5.102382650697313, 5.108538445094747, 5.11469423949218, 5.120850033889613, 5.133161622684479, 5.145473211479345, 5.157784800274212, 5.163940594671645, 5.170096389069079, 5.176252183466512, 5.188563772261379, 5.200875361056244, 5.213186949851111, 5.219342744248544, 5.225498538645977, 5.23165433304341, 5.243965921838277, 5.256277510633143, 5.268589099428009, 5.268589099428009, 5.268589099428009, 5.268589099428009, 5.268589099428009, 5.274744893825442, 5.280900688222876, 5.287056482620309, 5.294443435897229, 5.301830389174148, 5.309217342451068, 5.316604295727988, 5.323991249004908, 5.323991249004908, 5.323991249004908, 5.323991249004908, 5.323991249004908, 5.330147043402341, 5.336302837799774, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.342458632197207, 5.354770220992073, 5.3670818097869395, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.379393398581806, 5.38554919297924, 5.391704987376673, 5.3978607817741056, 5.3978607817741056, 5.397860781774105, 5.397860781774105, 5.3978607817741056, 5.3978607817741056, 5.410172370568972, 5.422483959363838, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.434795548158705, 5.434795548158705, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.434795548158705, 5.434795548158705, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045, 5.4347955481587045})
animEnd = Point(h)
animStart = Point(h)
animP: (x(animStart) + (t * (x(animEnd) - x(animStart))), h(x(animStart) + (t * (x(animEnd) - x(animStart)))))
A = PointIn(swingZone)
swingT: y(animP) / (y(animEnd) - y(animStart))
d = Circle(C, A)
D, E = Intersect(d, xAxis)
e = CircleArc(C, E, A)
B: (x(A), 0)
poly1, b, c, a = Polygon(C, A, B)
r = Length(b)
progressArc: ((1 - swingT) * e)
P: ((r * cos(progressArc / r)), (r * sin(progressArc / r)))
g = Segment(C, P)
swings = 0
blanks = Sequence("", n, 1, swings)
LengthsBeenDone = Sequence((Cell[3, n], 0), n, 1, swings)
pointsBeenDone = Sequence((Cell[1, n], Cell[2, n]), n, 1, swings)
swingArcs = Sequence(CircleArc[C, Element[LengthsBeenDone, n], Element[pointsBeenDone, n]], n, 1, Length[LengthsBeenDone])
list3 = Sort(Unique[x(LengthsBeenDone)])
pythTrip = IsInteger(r)
PTP = (4, 3)
showPTP = false
text1: " You found 
 an integer 
 at " + PTP + " ! "