colorlab
clone your own copy | download snapshot

Snapshots | iceberg

Inside this repository

TEST19.py
text/x-python

Download raw (913 bytes)

#creates a circle made of waves - not too succesful

from chiplotle import *
import random
import math

plotter = instantiate_plotters( )[0]
plotter.select_pen(1)


amplitude = 500
frequency = 0.5
center_of_wave_1 = 3000
center_of_wave_2 = 3500

coords = []
coords_2 = []

for i in range (50):
    x1 = i*100
    y1 = amplitude * math.sin(frequency * x1) + center_of_wave_1
    x2 = i*100
    y2 = amplitude * math.sin(frequency * x2) + center_of_wave_2
    if i % 4 == 0:
        coords.append((x1,y1))
        coords_2.append((x2,y2))
    elif (i+2) % 4 == 0:
        coords_2.append((x1,y1))
        coords.append((x2,y2))
wave_coords = coords + list(reversed(coords_2))
path = shapes.catmull_path(wave_coords,10)

degree = 20
radian = degree * (math.pi/180)
for i in range(19):
    transforms.rotate(path,radian)
    transforms.center_at(path,(16158/2,11040/2))
    plotter.write(path)

plotter.select_pen(0)