Max

delta

O,f,A,g,C

path=

Initialize

z^2

f(z)=

n

magnify

Clear All

A = (4.94780230209131, 2.6471300597729495)
xM = 100 (slider from 3 to 100, step 1)
xdelta = 0.01 (slider from 0.01 to 1, step 0.01)
O: 0 + (0 * ί)
xpts1 = mkptsonseg(O, A, xdelta, xM)
B = (1.3714693909518176, 9.863658969750894)
C = (0, 0)
g = CircumcircleArc(A, B, C)
xpts2 = mkptsonarc(A, g, C, xdelta, xM)
xunits1 = Sequence(Take[xpath, (4 * k) - 3, (4 * k) + 1], k, 1, (Length[xpath] - 1) / 4)
xcurves = Zip(Element[a, 3], a, xunits1)
xcnum = Length(xcurves)
InputBox2 = Textfield(xpath)
xdummy = Segment((10^(3), 0), (10^(3), 0.01))
NK6 = NaN
KC6 = NaN
xcurves' = Append("xdummy", xcurves)
xpts = Flatten({xpts1, xpts2})
xisseg = Take(Zip[Object[a], a, xcurves'], 2)
xptsall = Append(xpts, ToComplex[C])
xunits2 = Zip(If[Defined[a], "mkptsonseg(" + (First[b]) + "," + (Last[b]) + ",xdelta,xM )", "mkptsonarc(" + (b) + ",xdelta,xM)"], a, xisseg, b, xunits1)
InputBox1 = Textfield(xfunc)
xn = 200 (slider from 1 to xpnum, step 1)
xk = 0.16 (slider from 0.01 to 5, step 0.01)
xpnum = Length(xpts)
xfz = Zip(z^(2), z, xpts)
xdz = Sequence(Vector[Element[xptsall, k], Element[xptsall, k + 1]], k, 1, xpnum)
xvf = Zip(Vector[p, p + (xk * q)], p, xpts, q, xfz)
xfdz = Zip((ToComplex[a] * ToComplex[b]), a, xfz, Vector[b], xdz)
xfoots = Append((0, 0), Sequence[Sum[xfdz, k], k, 1, xpnum])
xsumvf = Zip(Vector[p, p + q], p, xfoots, q, Take[xfdz, 1, xn])
xtotal = ToComplex(Element[xfoots, xn + 1])
xdzk = Element(xdz, xn)
xvfk = Element(xvf, xn)
xsumvfk = Element(xsumvf, xn)
xptsnamesold: {"xpts1", "xpts2"}
xtxt1: "division=" + xpnum + ""
xtxt2: "\sum_{k=1}^{ " + (LaTeX[xn]) + " } f(z_k)(z_{k+1}-z_k)\\ 
\ ={" + (LaTeX[xtotal]) + " }"
xptsnames: {"xpts1", "xpts2"}
xdelete = Remove(xptsnamesold, xptsnames)
f = Segment(O, A)

Tool: mkptsonarc
mkptsonarc[ <Point>, <Circle>, <Point>, <Number>, <Number> ]
Input: A, c, B, delta, M
Output: ptsonarc

D = Center(c)
Na: ceil(c / delta)
Narc: (1 / 2 * (Na - M - abs(Na - M))) + M
ptsonarc = If(Defined[Intersect[c, ((A - D) * ℯ^((ί * Angle[A, D, B] / 2))) + D]], Sequence[((A - D) * ℯ^(((ί * k) * Angle[A, D, B] / Narc))) + D, k, 0, Narc - 1], Sequence[((A - D) * ℯ^((((-ί) * k) * Angle[B, D, A] / Narc))) + D, k, 0, Narc - 1])

Tool: mkptsonseg
mkptsonseg[ <Point>, <Point>, <Number>, <Number> ]
Input: A, B, delta, M
Output: ptsonseg

f = Segment(A, B)
Ns: ceil(f / delta)
N: (1 / 2 * (Ns - M - abs(Ns - M))) + M
ptsonseg = Sequence(((1 - k / N) * ToComplex[A]) + (k / N * ToComplex[B]), k, 0, N - 1)