Cone patron
Author: Daniel Mentrard

Open

Close

r

n = 30 (slider from 1 to 30, step 1)
h = 6.6 (slider from 0 to 10, step 0.01)
t = 0.72 (slider from 0 to 1, step 0.01)
r = 3.6 (slider from 0 to 12, step 0.01)
φ: r / sqrt(r^(2.0) + h^(2.0)) * 2.0 * 3.141592653589793
rh: sqrt(r^(2.0) + h^(2.0))
A = (0, 0)
f = Line(A, xAxis)
B1: A + (rh, 0.0)
liste4 = Sequence(Rotate[B1, k / n * 3.141592653589793, A], k, 0.0, n, 1.0)
A0: A + (r, 0.0)
liste1 = Sequence(Rotate[A0, k / n * 3.141592653589793, A], k, 0.0, n, 1.0)
liste5 = Sequence(Rotate[Translate[Element[liste1, k], t * Vector[Element[liste1, k], Element[liste4, k]]], t * (1.0 - (k - 1.0) / n) * (3.141592653589793 - φ / 2.0)], k, 1.0, n + 1.0, 1.0)
O = (-7.013385490461468, -5.27863480859304)
View3d = (-7.612622128951889, 0.7894577132686722)
ya: y(View3d)
costheta: cos(ya)
Zoom = 1.3 (slider from 1 to 5, step 0.1)
xa: x(View3d)
sinphi: sin(xa)
cosphi: cos(xa)
sintheta: sin(ya)
xy: -(Zoom) * cosphi * sintheta
Y: (x(O) + Zoom * cosphi, y(O) + Zoom * sinphi * sintheta)
A1: A + (-1.0 * r, 0.0)
aa = OrthogonalLine(A1, xAxis)
B0: A + (-1.0 * rh, 0.0)
PN0 = Element(liste1, 1.0 + floor(2.0 * n / 3.0))
bb = OrthogonalLine(PN0, aa)
P01 = Intersect(aa, bb)
P20 = Element(liste1, 1.0 + floor(n / 3.0))
liste3 = Sequence(Mirror[Element[liste1, k], aa], k, 1.0, n + 1.0, 1.0)
P2 = Translate(Element[liste1, 1.0 + floor(n / 3.0)], Vector[t * Vector[Element[liste1, 1.0 + floor(n / 3.0)], Element[liste3, 1.0 + floor(n / 3.0)]]])
P3 = Mirror(P2, xAxis)
P3' = Translate(P3, Vector[t * Vector[A1, B0]])
P1 = Translate(Element[liste1, 1.0], Vector[t * Vector[Element[liste1, 1.0], Element[liste3, 1.0]]])
P1' = Translate(P1, Vector[t * Vector[A1, B0]])
P2' = Translate(P2, Vector[t * Vector[A1, B0]])
PN = Translate(Element[liste1, 1.0 + floor(2.0 * n / 3.0)], Vector[t * Vector[Element[liste1, 1.0 + floor(2.0 * n / 3.0)], Element[liste3, 1.0 + floor(2.0 * n / 3.0)]]])
PN' = Translate(PN, Vector[t * Vector[A1, B0]])
A1' = Translate(A1, Vector[t * Vector[A1, B0]])
I = (9.02311594628326, 6.02405133106746)
J = (8.379446306302267, 6.0087118830678055)
d_1 = Circle(O, 2.0 * r)
θ: atan(h / r)
B2: A + Rotate[B0, -(φ) / 2.0]
X: (x(O) + Zoom * sinphi, y(O) + xy)
i = Vector(O, X)
liste6 = Sequence(Mirror[Element[liste5, k], f], k, 1.0, n + 1.0, 1.0)
j = Vector(O, Y)
Z: (x(O), y(O) + Zoom * costheta)
k = Vector(O, Z)
SS: A + (1.0 - t) * h * k
L1 = Sequence(x(Element[liste5, k]) * i + y(Element[liste5, k]) * j, k, 1.0, n + 1.0, 1.0)
L2 = Sequence(x(Element[liste6, k]) * i + y(Element[liste6, k]) * j, k, 1.0, n + 1.0, 1.0)
liste7 = Sequence(Polygon[SS, Element[L1, k], Element[L1, k + 1.0], SS], k, 1.0, n + 1.0, 1.0)
liste8 = Sequence(Polygon[SS, Element[L2, k], Element[L2, k + 1.0], SS], k, 1.0, n + 1.0, 1.0)
B = (7.958821901869736, 6.835963520111671)
d = Conic(A1, PN, P2, P1, P3)
E1: A + x(A1') * i + y(A1') * j
E2: A + x(PN') * i + y(PN') * j + (Distance[P01, PN] - Distance[P01, PN0]) * k
E3: A + x(P2') * i + y(P2') * j + (Distance[P01, P2] - Distance[P01, P20]) * k
E4: A + x(P1') * i + y(P1') * j + (Distance[A1, P1] - 2.0 * r) * k
E5: A + x(P3') * i + y(P3') * j + (Distance[P01, P2] - Distance[P01, P20]) * k
c = Conic(E1, E2, E3, E4, E5)
PN0' = Mirror(PN0, xAxis)
EL1: A + x(A0) * i + y(A0) * j
EL2: A + x(P20) * i + y(P20) * j
EL3: x(PN0) * i + y(PN0) * j
EL4: x(A1) * i + y(A1) * j
EL5: x(PN0') * i + y(PN0') * j
e = Conic(EL1, EL2, EL3, EL4, EL5)
a = OrthogonalLine(View3d, yAxis)
b = OrthogonalLine(View3d, xAxis)
liste2 = Sequence(Rotate[B2, k / n * φ / 2.0, A], k, 0.0, n, 1.0)
liste9 = Sequence(Segment[Element[L1, k], Element[L1, k + 1.0]], k, 1.0, Length[L1])
liste10 = Sequence(Segment[Element[L2, k], Element[L2, k + 1.0]], k, 1.0, Length[L2])
g = Conic(E1, E2, E3, E4, E5)
l = Segment(SS, Element[L1, 1.0])
m = Segment(SS, Element[L2, 1.0])
liste11 = Sequence(Segment[SS, Element[L1, k]], k, 1.0, n + 1.0, 1.0)
liste12 = Sequence(Segment[SS, Element[L2, k]], k, 1.0, n + 1.0, 1.0)
p = Segment(E1, E4)
q = Segment(E2, E5)
C = Intersect(c, p, 2.0)
D = Intersect(c, q, 1.0)
E = Intersect(c, p, 2.0)
F = Intersect(c, q, 2.0)
G = Intersect(c, p, 1.0)
H = Intersect(c, q, 1.0)
K = Intersect(c, p, 2.0)
L = Intersect(c, q, 2.0)
M = Intersect(p, q)
s = Segment(M, E5)
a_1 = Segment(SS, M)
N = Midpoint(s)