Date: 24 Octubre 2013

Enrollar

Desenrollar

r

h

VISUALIZACION DE UN CILINDRO Y SU RESPECTIVA RED

d = 2.39 (slider from -5 to 5, step 0.01)
t = 0.5 (slider from 0 to 1, step 0.1)
r = 3.4 (slider from -5 to 5, step 0.1)
h = 2.4 (slider from -5 to 5, step 0.1)
O = (2.7938983351301125, -0.3006903022070736)
Zoom = 1.2 (slider from 1 to 5, step 0.1)
Vista = (7.727468329212119, -0.16704958001975062)
ya: y(Vista)
costheta: cos(ya)
sintheta: sin(ya)
xa: x(Vista)
cosphi: cos(xa)
xy: -Zoom * cosphi * sintheta
sinphi: sin(xa)
B_1 = (-1.3601007795258435, -2.773043662672549)
Y: (x(B_1) + Zoom * cosphi, y(B_1) + Zoom * sinphi * sintheta)
v = Vector(B_1, Y)
Z: (x(B_1), y(B_1) + Zoom * costheta)
w = Vector(B_1, Z)
X: (x(B_1) + Zoom * sinphi, y(B_1) + xy)
u = Vector(B_1, X)
g = 1 (slider from -5 to 5, step 0.1)
k = 1 (slider from -5 to 5, step 0.1)
a = OrthogonalLine(Vista, yAxis)
b = OrthogonalLine(Vista, xAxis)
c: cos(ya)
n = 32 (slider from 5 to 50, step 1)
A: O + r * u + h * v
B: O + r * u - h * v
C_2: O - r * u + h * v
D: O - r * u + h * v
T = Dilate(D, t, A)
G: T - r / 3.141592653589793 * u
K: G + 2 * r / 3.141592653589793 * v
T'_1 = Translate(T, Vector[r / 3.141592653589793 * w])
T''_1 = Translate(T'_1, Vector[A, B])
liste1 = Sequence(Segment[If[i / n - t < 0, A - i / n * 2 * r * u, T'_1 - r / 3.141592653589793 * cos(((i / n - t) * 360)°) * w - r / 3.141592653589793 * sin(((i / n - t) * 360)°) * u], If[i / n - t < 0, B - i / n * 2 * r * u, T''_1 - r / 3.141592653589793 * cos(((i / n - t) * 360)°) * w - r / 3.141592653589793 * sin(((i / n - t) * 360)°) * u]], i, 0, n)
e = Segment(D, A)
E_2 = Point(e)
t' = AffineRatio(A, D, E_2)
P = If(t' - t < 0, E_2, T'_1 - r / 3.141592653589793 * cos(((t' - t) * 360)°) * w - r / 3.141592653589793 * sin(((t' - t) * 360)°) * u)
lieu1 = Locus(P, E_2)
P' = Translate(P, Vector[A, B])
lieu2 = Locus(P', E_2)
F = Midpoint(E_2, A)
f = Element(liste1, 1)
h_1 = Element(liste1, n + 1)
liste2 = Sequence(If[i / n - t < 0, A - i / n * 2 * r * u, T'_1 - r / 3.141592653589793 * cos(((i / n - t) * 360)°) * w - r / 3.141592653589793 * sin(((i / n - t) * 360)°) * u], i, 0, n)
liste3 = Sequence(If[i / n - t < 0, B - i / n * 2 * r * u, T''_1 - r / 3.141592653589793 * cos(((i / n - t) * 360)°) * w - r / 3.141592653589793 * sin(((i / n - t) * 360)°) * u], i, 0, n)
liste4 = Sequence(Polygon[Element[liste3, i], Element[liste3, i + 1], Element[liste2, i + 1], Element[liste2, i]], i, 0, n)
F' = Mirror(F, O)
H = Midpoint(h_1)
T' = Mirror(T, H)
I: T + r / 3.141592653589793 * u
J: I + 2 * r / 3.141592653589793 * v
M: J + d * r / 3.141592653589793 * sin(1 - t) * w - 2 * r / 3.141592653589793 * sin((1 - t) * 1.57) * v
L: K + d * r / 3.141592653589793 * sin(1 - t) * w - 2 * r / 3.141592653589793 * sin((1 - t) * 1.57) * v
poly2, g_2, l, m, i_1 = Polygon(G, L, M, I)
N = Midpoint(g_2)
Q_1 = Midpoint(m)
R = Midpoint(l)
S = Midpoint(R, Q_1)
U = Midpoint(N, Q_1)
V_1 = Midpoint(R, S)
W = Midpoint(V_1, U)
A_1 = Midpoint(W, V_1)
C_1 = Mirror(A_1, V_1)
p = Conic(Q_1, C_1, R, N, T)
D_1: O - r * u - h * v
E = Dilate(D_1, t, B)
V: E + r / 3.141592653589793 * u
F_1: E - r / 3.141592653589793 * u
Q: V - 2 * r / 3.141592653589793 * v
E_1: Q + d * r / 3.141592653589793 * sin(1 - t) * w + 2 * r / 3.141592653589793 * sin((1 - t) * 1.57) * v
H_1: F_1 - 2 * r / 3.141592653589793 * v
G_1: H_1 + d * r / 3.141592653589793 * sin(1 - t) * w + 2 * r / 3.141592653589793 * sin((1 - t) * 1.57) * v
poly1, f_1, v_1, e_1, g_1 = Polygon(F_1, V, E_1, G_1)
q = Conic(Q_1, C_1, R, N, T)
C = Midpoint(F_1, E_1)
J_1 = Midpoint(g_1)
K_1 = Midpoint(e_1)
L_1 = Midpoint(K_1, J_1)
M_1 = Midpoint(L_1, K_1)
N_1 = Midpoint(C, M_1)
O_1 = Midpoint(N_1, M_1)
P_1 = Mirror(O_1, M_1)
R_1 = Midpoint(v_1)
s = Conic(E, J_1, P_1, K_1, R_1)
c_1 = Conic(E, J_1, P_1, K_1, R_1)
S_1 = Midpoint(f)
i = Segment(C, J_1)
I_1 = Midpoint(i)