I need help with this really hard question and I can’t seem to construct it properly. Can someone help me out with this one?
This looks like blatant homework, doesn’t it? Had you typed
Remove[taF]
taF[{n_Integer, p_List}, \[Alpha]_, \[Beta]_] :=
Block[{e1 = {1, 0}, e2 = {4/10, 0}, p1, p2},
p1 = RotationTransform[n \[Alpha]][e1];
p2 = RotationTransform[n \[Beta]][e2];
{n + 1, {Last[p] + p1, Last[p] + p1 + p2}}
] /; Length[p] == 2
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 62 \[Degree], 60 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 180]]], 1]]], Frame -> True]
you had have the joy of having solved it on your own.
Had your teacher switched the angles, it had looked a bit more interesting
Inputs to probe
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 60 \[Degree], 90 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 180]]], 1]]], Frame -> True]
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 60 \[Degree], 30 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 180]]], 1]]], Frame -> True]
they give archaic looking pictograms. Experiment a bit, check for errors. Another one
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 30 \[Degree], 19 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 180]]], 1]]], Frame -> True]
is filigree and the last one:
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 62 \[Degree], 31 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 180]]], 1]]], Frame -> True]
This
Graphics[Line[Join[{{0, 0}}, Flatten[Last[Transpose[
NestList[taF[#, 22.5 \[Degree], 122.5 \[Degree]] &, {1, {{1, 0}, {7/5, 0}}}, 177]]], 1]]]]
gives
the angles appear in From Close to Perfect: A Triangle Problem by Ed Pegg Jr. As a replacement - not so blatant - homework you could try to replace the current implementation by an application of AnglePath only.
As a replacement - not so blatant - homework you could try …
Remove[taF]
taF[\[Alpha]_, \[Beta]_, n_?Positive, len1_: 1, len2_: 2/5] :=
Graphics[Line[
Join[{{0, 0}}, AnglePath[{len1 + len2, 0},
Transpose[{Flatten[ConstantArray[{len1, len2}, n], 1],
Join[{\[Alpha]}, Differences[Flatten[Table[{o \[Alpha], o \[Beta]}, {o, 1, n}], 1]]]}]]]]]
compare it with yesterday’s implementation
I can’t thank you enough haha XD
I really appreciate this !




