14
2
Introduction
The Sierpinski Arrowhead Curve is a curve that's limit is Sierpinski's Triangle.
It first starts like this:
_
/ \
Then, each line is replaced with a rotated version of the first one:
_
/ \
\ /
_/ \_
Next:
_
/ \
\ /
_/ \_
/ \
\_ _/
_ \ / _
/ \_/ \_/ \
Your task
Given a number n, output the n-th iteration of the Sierpinski Arrowhead Curve.
You may choose to 0- or 1-index, but please specify in your answer.
You may generate an image, or use Ascii Art in the format I have above.
You may not use built-ins to generate this curve.
Remember, this is code-golf, so the code with the fewest bytes wins.
u=.5;v=3^u/2;B=[u,v];C=[-u,v];A=C<0;
is 16 bytes shorter :) You can also doaxis off equal
to save another 5 bytes. – Stewie Griffin – 2016-11-23T11:57:36.670