Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code snippets of Tsunami
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2010 - 2014, Hailei Wang. All rights reserved.
cornu = ximport("cornu")
colors = ximport("colors")
# Painting waves
palette_for_wave = [ colors.hex( “#020034”, “dark blue” ), colors.hex( “#0A5CD6”, “aqua blue” ), colors.hex( “#FEFFFF”, “milk white” ) ]
# Draw Wave
def draw_wave( path, palette_for_wave ) :
stroke_width( choice( [ random( 0.1, 100 ), random( 1, 1000 ) ] ) )
stroke( choice( palette_for_wave ) )
cornu.draw_path( path, close = False, flat = True )
@genidma

This comment has been minimized.

Copy link

commented Mar 26, 2018

Hi Hailei,

Do you know why I am getting the following error?
File "cstsunami.py", line 11 def draw_wave( path, palette_for_wave ) : ^ SyntaxError: invalid syntax

Many thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.