Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c1 = Darker@ColorData["DarkRainbow"][0.1];
- c2 = Lighter@ColorData["Rainbow"][0.8];
- c3 = ColorData["DarkRainbow"][1];
- c4 = Black;
- frame[t1_, t2_, t3_, t4_, t5_, t6_, t7_, t8_, t9_] := (Graphics[
- Translate[
- Scale[Rotate[
- {EdgeForm[Lighter@c4], FaceForm[c1],
- Table[
- {
- If[t3 > 0,
- Table[FaceForm[
- Blend[{c1, col}, t3 - 2 t8]], {col, {c1, c2, c3}}][[
- Mod[Mod[(x - 1)/2, 2, 1] + 2 y, 3, 1]]]
- , {}],
- {
- Polygon[
- Table[{x + (1 - t2) Mod[y, 2] - (x - 1) t3 /4 -
- t7 (x - 1)/4,
- y - If[Mod[(x + 1)/2, 2] == 0, t3/2, 0] +
- t7 (x - 1)/4} + p,
- {p, {
- {0, 0},
- {1 - t6, 0},
- {1 + t1/2 - t6, 0.5},
- {1 - t6, 1},
- {0, 1},
- {-t1/2, 0.5}
- }}]]
- }
- }
- , {x, -1, 11, 2}, {y, -1, 7}]
- , If[t4 > 0 && t7 == 0,
- {Opacity[t4],
- Table[
- {c4, FaceForm[],
- Line[Table[{x - (x - 1.5)/4,
- y - If[Mod[(x - 1.5)/2, 2] == 0, 1/2, 0]} + p
- , {p, {{-0.5, 0.5}, {0, 0}, {-0.5, -0.5}, {-1,
- 0}, {-0.5, 0.5}}}]],
- Line[Table[{x - (x - 1.5)/4,
- y - If[Mod[(x - 1.5)/2, 2] == 0, 1/2, 0]} + p
- , {p, {{0, 0}, {1 - t6, 0}}}]]
- },
- {x, 1.5, 9, 2}, {y, 1, 7, 1}]}
- , {}]
- }, Pi t5/4, {4, 3}],
- 1 + t9 (Sqrt[2] - 1), {4, 3}
- ],
- {0, t9}
- ]
- , PlotRange -> {{1, 6.5}, {1, 5}}, Background -> White]);
- Manipulate[frame[t1, t2, t3, t4, t5, t6, t7, t8, t9],
- {{t1, 1}, 0, 1},
- {{t2, 1}, 0, 1},
- {{t3, 1}, 0, 1},
- {{t4, 1}, 0, 1},
- {{t5, 1}, 0, 1},
- {{t6, 1}, 0, 1},
- {{t7, 1}, 0, 1},
- {{t8, 1}, 0, 1},
- {t9, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement