Code Sketch
SCENERY WITH TEXT
Category: Programming
clear
showAxes()
showGrid()
setSpeed(superFast)
//tangram-scenery
setBackgroundV(Color(17, 209, 44), Color(5, 168, 243))
setPosition(300, 500)
right(180)
hop (215)
right()
hop(-15)
setPenColor(black)
setPosition(-300, -250)
right(90)
setPenFont(Font("bold",55))
write("Scenery!!")
setSpeed(medium)
setPenColor(black)
setPenThickness(4)
setPosition(-300,250)
repeat(9){
right()
right(85,20)
right(185)
right(85,20)
hop(20)
left(85)
}
setPenColor(yellow)
setPosition(350, 260)
setFillColor(yellow)
arc(30, 360)
penUp()
hop(50)
tangram.draw
def tangram = picStack(
Picture {},
triangle1.thatsFilledWith(green).thatsTranslated(-346, -30),
triangle1.thatsFilledWith(cm.gray).thatsTranslated(-372, 0).withFlippedY,
triangle2.thatsFilledWith(blue).thatsRotated(-90).thatsScaled(1).thatsTranslated(-349, 65),
triangle2.thatsFilledWith(pink).thatsRotated(90).thatsTranslated(-370, 0).withFlippedY,
parallelogram.thatsFilledWith(brown).thatsRotated(90).thatsTranslated(-290, 28).withFlippedY,
triangle4.thatsFilledWith(orange).thatsRotated(45).thatsTranslated(-300, -67).withFlippedY,
square.thatsFilledWith(red).thatsRotated(-45).thatsTranslated(-320, -65),
square09.thatsFilledWith(Color(242, 80, 17))thatsRotated(45)thatsTranslated(40, 0),
triangle11.thatsFilledWith(Color(226, 234, 32)).thatsRotated(585).thatsTranslated(40, 0),
triangle12.thatsFilledWith(Color(236, 7, 35)).thatsRotated(405),
triangle12.thatsFilledWith(Color(255, 73, 242)).thatsRotated(135),
triangle13.thatsFilledWith(ColorMaker.hsl(123, 0.74, 0.47)).thatsRotated(585).thatsTranslated(-100, -70),
parallelogram1.thatsFilledWith(Color(57, 26, 236)).thatsTranslated(50, 95),
triangle14.thatsFilledWith(Color(60, 230, 224)).thatsRotated(45).thatsTranslated(40, 0),
triangle21.thatsFilledWith(green).thatsRotated(135).thatsTranslated(400, -300),
triangle21.thatsFilledWith(cm.gray).thatsRotated(30).thatsTranslated(398, -188),
triangle22.thatsFilledWith(blue).thatsRotated(45).thatsTranslated(240, -250),
triangle22.thatsFilledWith(pink).thatsRotated(-135).thatsTranslated(402, -190),
parallelogram2.thatsFilledWith(brown).thatsRotated(-45).thatsTranslated(-242,-142).withFlippedX,
triangle24.thatsFilledWith(orange).thatsRotated(45).thatsTranslated(245,200).withFlippedY,
square2.thatsFilledWith(red).thatsRotated(-45).thatsTranslated(295,-250),
)
def square = Picture{
right(135)
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
}.thatsStrokeColored(black)
def triangle1 = Picture{
right()
forward(60)
left(135)
forward(40)
left(90)
forward(40)
}.thatsStrokeColored(black)
def triangle2 = Picture{
right(135)
forward(90)
left(135)
forward(130)
left(135)
forward(90)
}.thatsStrokeColored(black)
def triangle3 = Picture{
left(45)
forward(70.71)
left(135)
forward(100)
left(135)
forward(70.71)
}.thatsStrokeColored(black)
def parallelogram = Picture{
forward(50)
right(135)
forward(50)
right(45)
forward(50)
right(135)
forward(50)
}.thatsStrokeColored(black)
def triangle4 = Picture {
left(45)
forward(100)
left(135)
forward(70)
left(90)
forward(70)
}.thatsStrokeColored(black)
def square09 = Picture{
right(135)
forward(70.71)
right(90)
forward(70.71)
right(90)
forward(70.71)
right(90)
forward(70.71)
right(90)
}.thatsStrokeColored(Color(242, 80, 17))
def triangle11 = Picture{
right()
forward(100)
left(135)
forward(70.71)
left(90)
forward(70.71)
}.thatsStrokeColored(Color(226, 234, 32))
def triangle12 = Picture{
right(135)
forward(141.42)
left(135)
forward(200)
left(135)
forward(141.42)
}.thatsStrokeColored(Color(255, 73, 242))
def triangle13 = Picture{
left(45)
forward(70.71)
left(135)
forward(100)
left(135)
forward(70.71)
}.thatsStrokeColored(ColorMaker.hsl(123, 0.74, 0.47))
def parallelogram1 = Picture{
forward(100)
right(135)
forward(70.71)
right(45)
forward(100)
right(135)
forward(70.71)
}.thatsStrokeColored(Color(57, 26, 236))
def triangle14 = Picture {
left(45)
forward(141.42)
left(135)
forward(100)
left(90)
forward(100)
}.thatsStrokeColored(Color(200,60,50))
def square2 = Picture{
right(135)
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
forward(50)
right(90)
}.thatsStrokeColored(black)
def triangle21 = Picture{
right()
forward(70)
left(135)
forward(50)
left(90)
forward(50)
}.thatsStrokeColored(black)
def triangle22 = Picture{
right(135)
forward(110)
left(135)
forward(150)
left(135)
forward(109)
}.thatsStrokeColored(black)
def triangle23 = Picture{
left(45)
forward(70.71)
left(135)
forward(100)
left(135)
forward(70.71)
}.thatsStrokeColored(black)
def parallelogram2 = Picture{
forward(68)
right(135)
forward(60)
right(45)
forward(68)
right(135)
forward(60)
}.thatsStrokeColored(black)
def triangle24 = Picture {
left(45)
forward(100)
left(135)
forward(70)
left(90)
forward(70)
}.thatsStrokeColored(black)