Tutorial: Zip command

Example 1

list1 = {1, 2, 3, 4, 5} L = Zip(2*k+1, k, list1) # Or equivalently Sequence(2*k+1, k, 1, 5)

Example 2

list1 = {0, 0.5, 1, 1.5, 2} L = Zip(i^2+1, i, list1) # Or equivalently Sequence(i^2, i, 0, 2, 0.5)

Example 3

list1 = Sequence(k, k, -4, 4, 0.2) L = Zip(2*k, k, list1) # Or equivalently Sequence(2*k, k, -4, 4, 0.2)

Example 4

﻿P = (-2, -2) Q = (2, -2) R = (-2, 2) S = (2, 2) Zip(Midpoint(A, B), A, {P, Q}, B, {R, S})

Example 5

A = (1, -3) B = (3, -3) C = (1, 1) D = (3, 1) E = (-3, 1) F = (-1, 1) G = (-3, -3) H = (-1, -3) Lk = {3, 4, 5, 6} Zip(Polygon(P, Q, k), P, {A, C, G, E}, Q, {B, D, H, F}, k, Lk)

Example 6

Lk = -4..4 LP = Flatten(Zip(Zip(Zip((i, j, k), i, Lk), j, Lk), k, Lk)) Lr = Zip(0.5*random(), k, 1..Length(LP)) LS = Zip(Sphere(P, r), P, LP, r, Lr)

Solution to Exercise from the video

LP = Sequence(Sequence(Sequence((i, j, k), i, -4, 4), j, -4, 4), k, -4, 4) Lr = Sequence(Sequence(Sequence(0.5*random(), i, -4, 4), j, -4, 4), k, -4, 4) LS = Sequence(Sequence(Sequence( Sphere( Element(LP,i,j,k),Element(Lr, i, j, k) ), i, 1, 9), j, 1, 9), k, 1, 9) Demo: https://geogebra.org/3d?command=LP=Sequence(Sequence(Sequence((i,j,k),i,-4,4),j,-4,4),k,-4,4);Lr=Sequence(Sequence(Sequence(0.5*random(),i,-4,4),j,-4,4),k,-4,4);LS=Sequence(Sequence(Sequence(Sphere(Element(LP,i,j,k),Element(Lr,i,j,k)),i,1,9),j,1,9),k,1,9);SetVisibleInView(LP,-1,false);SetFilling(LS,1)

Support

If you like these tutorials, you can support my work in Patreon: https://www.patreon.com/jcponce ∞ Thanks!