This is the ASCII version of this challenge. The initial post was separated per request by Martin Ender
Introduction
Similar to the Fibonacci Sequence, the Padovan Sequence (OEIS A000931) is a sequence of numbers that is produced by adding previous terms in the sequence. The initial values are defined as:
P(0) = P(1) = P(2) = 1
The 0th, 1st, and 2nd terms are all 1. The recurrence relation is stated below:
P(n) = P(n - 2) + P(n - 3)
Thus, it yields the following sequence:
1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, ...
Using these numbers as side lengths of equilateral triangles yields a nice spiral when you place them all together, much like the Fibonacci Spiral:
Image courtesy of Wikipedia
Task
Your task is to write a program that recreates this spiral by ASCII art, with input corresponding to which term. Since a triangle of side length 1 (1 character) is impossible to represent nicely in ASCII, the side lengths have been dilated by a factor of 2. Thus, the triangle of side length 1 is actually represented like so:
/\
/__\
So, for example, if the input was 5 (the 5th term), the output should be:
/\
/ \
/ \
/______\
\ /\
\ /__\
\ /\ /
\/__\/
The first 5 terms were 1, 1, 1, 2, 2, so the triangle had side lengths 2, 2, 2, 4, 4 due to dilation. Another example for input 8:
__________
/\ /\
/ \ / \
/ \ / \
/______\ / \
\ /\ / \
\ /__\/ \
\ /\ / \
\/__\/______________\
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\ /
\/
Rules
- You must print the result, and input must be an integer corresponding to term number
- Trailing and leading newlines are allowed, trailing spaces after lines are allowed also
- Your submission must be able to handle at least up to the 10th term (9)
- Your submission must be a full program or function that takes input and prints the result
- Rotations of the output are allowed, in 60 degree multiples, but the size of the triangles must remain the same, along with the representation
- Going counter-clockwise is also allowed
- Standard loopholes are forbidden
You may assume that input will be >0 and that correct format of input will be given.
Scoring
This is code-golf, so the shortest code in bytes wins. Happy New Years everyone!