I want to draw a Y-shaped branch in Mathematica. I am trying to draw a line of length L. In step II, I want to translate to the ending point of the line. Then I want to rotate at an angle of 45 deg to the right and draw a line of length L*0.66. Then translate back to the ending point of the first line and draw a line to the left by rotating left at an angle of 45deg. I have tried four several hours but got no success. Below is the code which I have tried:
L = 100;
Graphics[
line = Line[{{0, 0}, {0, -L}}];
Translate[line, {L/2, L}],
line = Line[{{0, 0}, {0, - L*0.66}}];
Rotate[line, -30 Degree]
]
p
is undefined. And afterGraphics
, you want the graphics elements to be enclosed in aList
or{..}
$\endgroup$ – Michael E2 Sep 2 '18 at 0:48Graphics[{Line[{{{0, 0}, {0, -1}}, {{0, 0}, {1/2, 1}}, {{0, 0}, {-1/2, 1}}}]}]
? $\endgroup$ – Michael E2 Sep 2 '18 at 1:05