Posts tagged: parquet deformation

Mathematica code:
ID = ImageData[Binarize[Rasterize[Import["Erwin.jpg"], RasterSize -> 100], .7], DataReversed -> True]Tile[k_, rx_, ry_, x_, y_, r_] :=Table[ Translate[  Rotate[   {AbsoluteThickness[k],    Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},   r, {.5, .5}],  {x, y}], {i, 0, 1, 1}]Parquet[IS_, X_, Y_, u_, v_, k_, rx1_, rx2_, ry1_, ry2_, f_, t_] :=Graphics[ Table[  Tile[ k, rx1 + rx2*x/X, ry1 + ry2/2*(1 + Sin[2 Pi (f*y/Y - t)]), x, y,  ID[[1 + v*y, 1 + u*x]] Pi/2],  {x, 3, X, 1}, {y, 5, Y, 1}], ImageSize -> IS, PlotRange -> {{3, X + 1}, {5, Y + 1}}]Manipulate[Parquet[500, 56, 60, 2, 2, 2, .5, 0, 0, .5, .5, t],{t, 0, 17/18, 1/18}]

Mathematica code:

ID = ImageData[
Binarize[Rasterize[
Import["Erwin.jpg"],
RasterSize -> 100], .7],
DataReversed -> True]

Tile[k_, rx_, ry_, x_, y_, r_] :=
Table[
Translate[
Rotate[
{AbsoluteThickness[k],
Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},
r, {.5, .5}],
{x, y}],
{i, 0, 1, 1}]

Parquet[IS_, X_, Y_, u_, v_, k_, rx1_, rx2_, ry1_, ry2_, f_, t_] :=
Graphics[
Table[
Tile[
k,
rx1 + rx2*x/X,
ry1 + ry2/2*(1 + Sin[2 Pi (f*y/Y - t)]),
x, y,
ID[[1 + v*y, 1 + u*x]] Pi/2],
{x, 3, X, 1}, {y, 5, Y, 1}],
ImageSize -> IS, PlotRange -> {{3, X + 1}, {5, Y + 1}}]

Manipulate[
Parquet[500, 56, 60, 2, 2, 2, .5, 0, 0, .5, .5, t],
{t, 0, 17/18, 1/18}]
Mathematica code:
Tile[k_, rx_, ry_, x_, y_, r_] := Table[  Translate[   Rotate[    {AbsoluteThickness[k],     Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},    r, {.5, .5}],   {x, y}],  {i, 0, 1, 1}]rr[Q_] := (SeedRandom[Q]; RandomReal[])GCOS[k_, rx1_, rx2_, ry1_, ry2_, X_, Y_, Q_, t_] := Graphics[  Table[    Tile[k,        .75 + .25 Cos[2 Pi*Mod[rx1 + rx2*x/X + t, 1]],        .75 + .25 Cos[2 Pi*Mod[ry1 + ry2*y/Y + t, 1]],        x, y, Floor[3*rr[Q*x*y]] Pi/2],   {x, 1, X, 1}, {y, 1, Y, 1}],  ImageSize -> 500, PlotRange -> {{1, X + 1}, {1, Y + 1}}]Manipulate[   GCOS[2, .5, .5, .5, .5, 30, 42, 4, t],{t, .05, 1, .05}]

Mathematica code:

Tile[k_, rx_, ry_, x_, y_, r_] :=
Table[
Translate[
Rotate[
{AbsoluteThickness[k],
Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},
r, {.5, .5}],
{x, y}],
{i, 0, 1, 1}]

rr[Q_] := (SeedRandom[Q]; RandomReal[])

GCOS[k_, rx1_, rx2_, ry1_, ry2_, X_, Y_, Q_, t_] :=
 Graphics[
Table[
Tile[k,
 .75 + .25 Cos[2 Pi*Mod[rx1 + rx2*x/X + t, 1]],
 .75 + .25 Cos[2 Pi*Mod[ry1 + ry2*y/Y + t, 1]],
 x, y, Floor[3*rr[Q*x*y]] Pi/2],
{x, 1, X, 1}, {y, 1, Y, 1}],
ImageSize -> 500, PlotRange -> {{1, X + 1}, {1, Y + 1}}]

Manipulate[
GCOS[2, .5, .5, .5, .5, 30, 42, 4, t],
{t, .05, 1, .05}]
1000x1000
Mathematica code:
Tile[k_, rx_, ry_, x_, y_, r_] := Table[  Translate[   Rotate[    {AbsoluteThickness[k],     Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},    r, {.5, .5}],   {x, y}],  {i, 0, 1, 1}]rr[Q_] := (SeedRandom[Q]; RandomReal[])Manipulate[Graphics[ Table[  Tile[4, .5 + .5*x/1000, y/1000, x, y, Floor[3*rr[x*y]] Pi/2],  {x, 1, 100, 1}, {y, 1, 100, 1}], ImageSize -> 1000, PlotRange -> {{1, 101}, {1, 101}}],{r, 0, 1, .25}]

1000x1000

Mathematica code:

Tile[k_, rx_, ry_, x_, y_, r_] :=
Table[
Translate[
Rotate[
{AbsoluteThickness[k],
Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},
r, {.5, .5}],
{x, y}],
{i, 0, 1, 1}]

rr[Q_] := (SeedRandom[Q]; RandomReal[])

Manipulate[
Graphics[
Table[
Tile[4, .5 + .5*x/1000, y/1000, x, y, Floor[3*rr[x*y]] Pi/2],
{x, 1, 100, 1}, {y, 1, 100, 1}],
ImageSize -> 1000, PlotRange -> {{1, 101}, {1, 101}}],
{r, 0, 1, .25}]
Testing the new panorama feature on Tumblr with a parquet deformation—a kind of "geometrical tessellating metamorphosis". Douglas Hofstadter has a bit to say about them in Metamagical Themas.
Click the image to view in panorama mode. The original image is 4000 pixels wide.
more variants: 1, 2, 3
Mathematica code:
Tile[k_, rx_, ry_, x_, y_, r_] := Table[  Translate[   Rotate[    {AbsoluteThickness[k],     Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},    r, {.5, .5}],   {x, y}],  {i, 0, 1, 1}]rr[Q_] := (SeedRandom[Q]; RandomReal[])Manipulate[Graphics[ Table[  Tile[4, .5 + .5*x/200, r , x, y, Floor[3*rr[x*y]] Pi/2],  {x, 1, 200, 1}, {y, 1, 20, 1}], ImageSize -> 4000, PlotRange -> {{1, 201}, {1, 21}}],{r, 0, 1, .25}]

Testing the new panorama feature on Tumblr with a parquet deformation—a kind of "geometrical tessellating metamorphosis". Douglas Hofstadter has a bit to say about them in Metamagical Themas.

Click the image to view in panorama mode. The original image is 4000 pixels wide.

more variants: 1, 2, 3

Mathematica code:

Tile[k_, rx_, ry_, x_, y_, r_] :=
Table[
Translate[
Rotate[
{AbsoluteThickness[k],
Circle[{i, i}, {rx, ry}, {i*Pi, Pi/2 + i*Pi}]},
r, {.5, .5}],
{x, y}],
{i, 0, 1, 1}]

rr[Q_] := (SeedRandom[Q]; RandomReal[])

Manipulate[
Graphics[
Table[
Tile[4, .5 + .5*x/200, r , x, y, Floor[3*rr[x*y]] Pi/2],
{x, 1, 200, 1}, {y, 1, 20, 1}],
ImageSize -> 4000, PlotRange -> {{1, 201}, {1, 21}}],
{r, 0, 1, .25}]


Mathematica code:

Rot60 = 
Table[
Table[
RotationTransform[a, {1, 1, 0}, {0, 0, 0}][Tuples[{-1, 1}, 3][[v]]],
{v, 1, 8, 1}],
{a, 0, 2 Pi, 2 Pi/60}]

Edge := {1, 2, 4, 3, 7, 8, 6, 5, 1, 3, 4, 8, 7, 5, 6, 2}

CubeProjections[color_, pr_, b_, s_, h_, w_, m_, a_] :=
Graphics[
Table[
Translate[
{AbsoluteThickness[h], If[color == 0, Black, White],
Line[
Table[
Table[
Rot60[[1 + Mod[w (y + m*x) + a, 60]]][[Edge[[k]]]][[c]],
{c, 1, 2, 1}],
{k, 1, 16, 1}]]},
{s*x, s*y}],
{x, -6, 6, 1}, {y, -b, b, 1}],
PlotRange -> {{-pr/3, pr/3}, {-pr+1, pr-1}}, ImageSize -> 500,
Background -> If[color == 0, White, Black]
]

Manipulate[
PM = {color, pr, b, s, h, w, m, a};
CubeProjections[color, pr, b, s, h, w, m, a],
{color, 0, 1, 1}, {{pr, 17}, 1, 52}, {{b, 5}, 1, 20, 1},
{{s, 3}, 0, 5}, {{h, 1}, .01, 10},
{{w, 1}, 0, 20, 1},{{m, 1}, 0, 20, 1},
{a, 1, 60, 1}]

P = {0, 29, 20, 1.3, 2.5, 1, 0, 0}

Manipulate[
CubeProjections30[P[[1]], P[[2]], P[[3]], P[[4]], P[[5]], P[[6]],
P[[7]], a],
{a, 1, 30, 1}]

Mathematica code:

Rot = 
Table[
Table[
RotationTransform[a, {1, 1, 0}, {0, 0, 0}][Tuples[{-1, 1}, 3][[v]]],
{v, 1, 8, 1}],
{a, 0, 2 Pi, 2 Pi/100}]

Edge := {1, 2, 4, 3, 7, 8, 6, 5, 1, 3, 4, 8, 7, 5, 6, 2}

CubeProjections[color_, pr_, b_, s_, h_, w_, m_, a_] :=
Graphics[
Table[
Translate[
{AbsoluteThickness[h], If[color == 0, Black, White],
Line[
Table[
Table[
Rot[[1 + Mod[w (y + m*x) + a, 100]]][[Edge[[k]]]][[c]],
{c, 1, 2, 1}],
{k, 1, 16, 1}]]},
{s*x, s*y}],
{x, -b, b, 1}, {y, -b, b, 1}],
PlotRange -> {{-5*pr/14, 5*pr/14}, {-pr, pr}}, ImageSize -> 500,
Background -> If[color == 0, White, Black]
]

Manipulate[
PM = {color, pr, b, s, h, w, m, a};
CubeProjections[color, pr, b, s, h, w, m, a],
{color, 0, 1, 1}, {{pr, 17}, 1, 52}, {{b, 5}, 1, 20, 1},
{{s, 3}, 0, 5}, {{h, 1}, .01, 10},
{{w, 1}, 0, 20, 1},{{m, 1}, 0, 20, 1},
{a, 1, 100, 1}]

P = {0, 27.7, 20, 1.3, 2.75, 1, 0, 18}


Show@
CubeProjections[P[[1]],P[[2]],P[[3]],P[[4]],P[[5]],P[[6]],P[[7]],P[[8]]]


Mathematica code:
Rot =  Table[  Table[   RotationTransform[a, {1, 1, 0}, {0, 0, 0}][Tuples[{-1, 1}, 3][[v]]],  {v, 1, 8, 1}],{a, 0, 2 Pi, 2 Pi/100}]Edge := {1, 2, 4, 3, 7, 8, 6, 5, 1, 3, 4, 8, 7, 5, 6, 2}CubeProjections[color_, pr_, b_, s_, h_, w_, m_, o_] :=Graphics[ Table[  Translate[   {AbsoluteThickness[h], If[color == 0, Black, White],    Line[     Table[      Table[       Rot[[1 + Mod[w (y + m*x) + a, 100]]][[Edge[[k]]]][[c]],       {c, 1, 2, 1}],      {k, 1, 16, 1}]]},   {s*x, s*y}],  {x, -b, b, 1}, {y, -b, b, 1}], PlotRange -> {{-pr, pr}, {-pr, pr}}, ImageSize -> 500,  Background -> If[color == 0, White, Black] ]Manipulate[PM = {color, pr, b, s, h, w, m, a};CubeProjections[color, pr, b, s, h, w, m, a],{color, 0, 1, 1}, {{pr, 17}, 1, 52}, {{b, 5}, 1, 10, 1},{{s, 3}, 0, 5}, {{h, 1}, .01, 10},{{w, 1}, 0, 20, 1},{{m, 1}, 0, 20, 1},{a, 1, 100, 1}]P = {1, 28, 9, 3, 1.4, 1, 1, 30}Manipulate[CubeProjections[P[[1]],P[[2]],P[[3]],P[[4]],P[[5]],P[[6]],P[[7]],a],{a, 48, 0, -2}]



Mathematica code:

Rot = 
Table[
Table[
RotationTransform[a, {1, 1, 0}, {0, 0, 0}][Tuples[{-1, 1}, 3][[v]]],
{v, 1, 8, 1}],
{a, 0, 2 Pi, 2 Pi/100}]

Edge := {1, 2, 4, 3, 7, 8, 6, 5, 1, 3, 4, 8, 7, 5, 6, 2}

CubeProjections[color_, pr_, b_, s_, h_, w_, m_, o_] :=
Graphics[
Table[
Translate[
{AbsoluteThickness[h], If[color == 0, Black, White],
Line[
Table[
Table[
Rot[[1 + Mod[w (y + m*x) + a, 100]]][[Edge[[k]]]][[c]],
{c, 1, 2, 1}],
{k, 1, 16, 1}]]},
{s*x, s*y}],
{x, -b, b, 1}, {y, -b, b, 1}],
PlotRange -> {{-pr, pr}, {-pr, pr}}, ImageSize -> 500,
Background -> If[color == 0, White, Black]
]

Manipulate[
PM = {color, pr, b, s, h, w, m, a};
CubeProjections[color, pr, b, s, h, w, m, a],
{color, 0, 1, 1}, {{pr, 17}, 1, 52}, {{b, 5}, 1, 10, 1},
{{s, 3}, 0, 5}, {{h, 1}, .01, 10},
{{w, 1}, 0, 20, 1},{{m, 1}, 0, 20, 1},
{a, 1, 100, 1}]

P = {1, 28, 9, 3, 1.4, 1, 1, 30}

Manipulate[
CubeProjections[P[[1]],P[[2]],P[[3]],P[[4]],P[[5]],P[[6]],P[[7]],a],
{a, 48, 0, -2}]