Code Sketch
RAJIV MALIK
Category: Art
cleari
showAxes()
showGrid()
def shape3 = Picture{
right(135)
forward(70.71)
right(90)
forward(70.71)
right(90)
forward(70.71)
right(90)
forward(70.71)
right(90)
}.thatsStrokeColored(black)
def shape4 = Picture{
right()
forward(100)
left(135)
forward(70.71)
left(90)
forward(70.71)
}.thatsStrokeColored(black)
def shape1 = Picture{
right(135)
forward(141.42)
left(135)
forward(200)
left(135)
forward(141.42)
}.thatsStrokeColored(black)
def shape5 = Picture{
left(45)
forward(70.71)
left(135)
forward(100)
left(135)
forward(70.71)
}.thatsStrokeColored(black)
def shape6 = Picture{
forward(100)
right(135)
forward(96.71)
right(45)
forward(100)
right(135)
forward(96.71)
}.thatsStrokeColored(black)
def shape7 = Picture {
left(45)
forward(141.42)
left(135)
forward(100)
left(90)
forward(100)
}.thatsStrokeColored(black)
def tangram = picStack(
Picture {},
shape1.thatsTranslated(-100,0).thatsFilledWith(red),
shape3.thatsRotated(45).thatsTranslated(0, 70).thatsFilledWith(black),
shape4.thatsTranslated(0, 0).thatsRotated(-45).thatsFilledWith(yellow),
shape6.thatsTranslated(0, -100).thatsFilledWith(Color(95, 240, 86)),
shape4.thatsTranslated(-100, 0).thatsRotated(-135).thatsTranslated(0, 70).thatsFilledWith(Color(255, 53, 203)),
shape1.thatsRotated(180).thatsTranslated(170, 0).thatsFilledWith(Color(54, 0, 201)),
shape5.thatsRotated(180).thatsTranslated(170,0).thatsFilledWith(Color(2, 123, 0)),
)
tangram.draw
setBackground(Color(16, 169, 215))