Stylo Doodles

Tardis at the Seaside

Details

Author:

Stephanie Jones

Dimensions:

1920 x 1080

Stylo Version:

0.6.1
Show Source Show Notes Show Both

Source

from stylo.image import LayeredImage
from stylo.color import FillColor
from stylo.shape import Circle, Rectangle, Triangle
from stylo.domain.transform import translate
black = FillColor("000000")

white = FillColor("ffffff")
yellow = FillColor("ffff00")
red = FillColor("dd2300")
orange = FillColor("FFA500")
dark_blue = FillColor("0B2AD6")
D_blue = FillColor("051883")
grey = FillColor("AFC0C8")
skyblue = FillColor("ABF1FF")
sand = FillColor("FFDC63")
water = FillColor("28B7FF")
def make_cloud(x, y, scale=1):
    cloud = Circle(x=(x + 0), y=(y + 0.4), r=(0.75*scale), fill=True)
    cloud |= Circle(x=(x + 0.6), y=(y + 0.25), r=(0.6*scale), fill=True)
    cloud |= Circle(x=(x + -0.6), y=(y + 0.25), r=(0.6*scale), fill=True)
    cloud |= Circle(x=(x + -1.2), y=(y + -0.4), r=(0.65*scale), fill=True)
    cloud |= Circle(x=(x + 1.2), y=(y + -0.4), r=(0.65*scale), fill=True)
    cloud |= Circle(x=(x + 0), y=(y + -0.3), r=(0.8*scale), fill=True)
    
    return cloud
cloud1 = make_cloud(7, 4, 1) 
cloud2 = make_cloud(3, 3, 1) 
cloud3 = make_cloud(-5.5, 4.5, 1)
cloud4 = make_cloud(-9.5, 5, 1)
Sand = Rectangle(0, -5, 20, 4)
Sky = Rectangle(0, 0, 20, 10)
Tardis_base = Rectangle(0, -4.5, 4.5, 0.75) | Rectangle(0, -0.5, 4, 7) | Rectangle(0, 3.3, 3.5, 0.4) | Rectangle(0, 3.75, 3, 0.4) 
Light = Rectangle(0,4.3, 0.5, 0.5)  
Sign = Rectangle(0, 2.4, 3.5, 0.7) 
Tardis_Panels = Rectangle(-0.8, 1.2, 1.6, 1.25) | Rectangle(0.8, 1.2, 1.6, 1.25) | Rectangle(0.8, -0.3, 1.5, 1.25) 
Tardis_Panels2 = Rectangle(0.8, -1.7, 1.5, 1.25) | Rectangle(0.8, -3.1, 1.5, 1.25) | Rectangle(-0.8, -0.3, 1.5, 1.25) 
Tardis_Panels3 = Rectangle(-0.8, -1.7, 1.5, 1.25)| Rectangle(-0.8, -3.1, 1.5, 1.25)
Windows1 = Rectangle(-1.3, 1.5, 0.4, 0.4) | Rectangle(-0.8, 1.5, 0.4, 0.4) | Rectangle(-0.3, 1.5, 0.4, 0.4) 
Windows2 = Rectangle(-1.3, 1, 0.4, 0.4) | Rectangle(-0.8, 1, 0.4, 0.4) | Rectangle(-0.3, 1, 0.4, 0.4) 
Windows3 = Rectangle(1.3, 1.5, 0.4, 0.4) | Rectangle(0.8, 1.5, 0.4, 0.4) | Rectangle(0.3, 1.5, 0.4, 0.4) 
Windows4 = Rectangle(1.3, 1, 0.4, 0.4) | Rectangle(0.8, 1, 0.4, 0.4) | Rectangle(0.3, 1, 0.4, 0.4)
Poster = Rectangle(-0.8, -0.3, 1.5, 1.25)         

sun = Circle(x=-8, y=5, r=2, fill=True)
Sea = Rectangle(0, -2.5, 20, 1)
sails = Triangle((0.1, 0.6), (2.5, 0.6), (0.1, 3.5)) | Triangle((-0.1, 0.6), (-1.5, 0.6), (-0.1, 3.5))
boat = Rectangle(0, 0, 3.5, 1) | Triangle((1.75, -0.5), (1.75, 0.5), (2.25, 0.5))
mast = Rectangle(0, 2, 0.125, 3)
boat = boat >> translate(-6, -1.85)
sails = sails >> translate(-6, -1.85)
mast = mast >> translate(-6, -1.85)
image = LayeredImage(background="ffffff", scale=10)
image.add_layer(Sky, skyblue )
image.add_layer(Sand, sand)
image.add_layer(Sea, water)
image.add_layer(sun, yellow)
image.add_layer(cloud1, white)
image.add_layer(cloud2, white)
image.add_layer(cloud3, white)
image.add_layer(cloud4, white)
image.add_layer(sails, white)
image.add_layer(boat, red)
image.add_layer(mast, black)
image.add_layer(Tardis_base, dark_blue)
image.add_layer(Light, yellow)
image.add_layer(Sign, black)
image.add_layer(Tardis_Panels, D_blue)
image.add_layer(Tardis_Panels2, D_blue)
image.add_layer(Tardis_Panels3, D_blue)
image.add_layer(Windows1, yellow)
image.add_layer(Windows2, yellow)
image.add_layer(Windows3, yellow)
image.add_layer(Windows4, yellow)
image.add_layer(Poster, white)