Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- RADIUS = 8
- ANGLES = 32
- XOffset = [0]*ANGLES
- YOffset = [0]*ANGLES
- for i in range(ANGLES):
- angle = (i/ANGLES)*2*math.pi
- XOffset[i] = round(math.cos(angle)*RADIUS)
- YOffset[i] = round(math.sin(angle)*RADIUS)
- print('const signed char CIRCLEX[]={', end='')
- for i in range(ANGLES):
- print('%2d,' % XOffset[i], end='');
- print('};')
- print('const signed char CIRCLEY[]={', end='')
- for i in range(ANGLES):
- print('%2d,' % YOffset[i], end='');
- print('};')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement