Build a Digital Plotter Problem adapted from the book Fortran 77 by Donald M. Monro

Introduction

Digital plotting machines are widely used to produce various forms of drawings, graphs and other pictorial results. Most such machines can move their pens only in certain directions, usually as single steps in the X and Y direction or both. A typical machine would move in one of the eight directions shown in Fig. 1:


Fig. 1

Challenge

Write a program without trigonometric functions which takes a number from 0 to 7 (inclusive) as input and outputs the corresponding coordinates of the endpoints in Fig. 1.

Output should as an array or list with two elements (i.e. (1, 0) or [0,-1])

Table of I/O

0 (1, 0)
1 (1, 1)
2 (0, 1)
3 (-1, 1)
4 (-1, 0)
5 (-1, -1)
6 (0, -1)
7 (1, -1)


Winning

Shortest code in bytes wins
Python 2, 29 bytes

lambda n:1j**(n/2)*(1+n%2*1j)


Returns the coordinates as a complex number.