Code Sketch


Shardul Chavan
By: Shardul Chavan
Category: Art
// For more examples, please see: http://www.jfugue.org/examples.html
val score = MusicScore(
    Melody("Acoustic_Grand", "C6q D#6q F6q G6q D#6q F6h Rq D#6q F6q G6q F6q C6q D#6h Rq C6q D#6q F6q G6q D#6q F6h Rq D#6q F6q G6q F6q C6q D#6h Rq"),
    Melody("Pan_Flute", "X[Volume]=240000 Ri C6q D#6q F6q G6q D#6q F6h Ri Ri D#6q F6q G6q F6q C6q D#6h Ri Ri C6q D#6q F6q G6q D#6q F6h Ri Ri D#6q F6q G6q F6q C6q D#6h Ri"),
    Melody("Guitar", "X[Volume]=21000 Rw D#4majw Rw C4minw Rw D#4majw Rw C4minw Rw D#4majw Rw C4minw Rw D#4majw Rw C4minw Rw D#4majw Rw C4minw Rw D#4majw"),
    Rhythm("Acoustic_Bass_Drum", "q", "o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o.o."),
    Rhythm("Hand_Clap", "q", ".^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.^.")
)
playMusic(score)

// For REACHA Foundation Day
clear()
setSpeed(medium)
setBackground(white)

// Draw a Decorative border
setPenColor(green)
setPenThickness(10)
repeat(4){
    forward(500)
    right()
}

// Position for next
jumpTo(100, 350)
setPenColor(blue)
setPenFontSize(50)
setPenFont(Font("Brush Script MT",50))

// Celebration Message
write("Happy REACHA")
jumpTo(110, 290)
write("Foundation Day!")

// Details
jumpTo(130, 230)
setPenColor(Color(51, 51, 51))
setPenFontSize(30)
write("Celebrating 34 Years")

jumpTo(160, 190)
write("Since March 9 1992")

// Draw a simple celebratory star
def drawStar(size: Int) {
    repeat(5) {
        forward(size)
        right(144)
    }
}

setPosition(28, 24)
setPenColor(red)
setFillColor(yellow) 
    drawStar(50)

setPosition(421, 34)
repeat(5) {
        forward(50)
        right(144)
    }
setPosition(227,424)
repeat(5) {
        forward(50)
        right(144)
    }

// For drawing of computer
setPenThickness(2)
setPenColor(black)
setFillColor(black)
setPosition(371,420)
right(90)
forward(90)
right(90)
forward(3)
right(45)
forward(3)
right(45)
forward(86)
right(45)
forward(3)
right(45)
forward(3)
right(90)
setPenColor(Color(51, 51, 51))
setFillColor(Color(51, 51, 51))
hop(5)
left(90)
forward(45)
right(90)
forward(80)
right(90)
forward(45)
right(180)

// For computer screen
setPenColor(blue)
setFillColor(blue)
setPosition(378,425)
forward(37)
right(90)
forward(75)
right(90)
forward(37)
right(90)
forward(75)
right(90)
setPenColor(black)
setPosition(413,422)
dot(3)
setPosition(419.6,440.1)
// For kojo sign
// 1. Turtle on the left (using the built-in turtle shape)
jumpTo(404, 441)
setPenColor(green)
setFillColor(green)
val t0 = newTurtle(401,441)

// 2. Draw a Triangle
setPosition(403.1,441.0)
setPenColor(Color(255, 0, 0))
setFillColor(Color(255, 0, 0))
right(30)
repeat(3){
    forward(20)
    right(120)
}
left(30)

// 3. Draw a Circle
setPenColor(yellow)
setFillColor(yellow)
setPosition(410.39,440.49)
right(360,10)

// for AI sign
// 1. for AI plate
setPenColor(black)
setFillColor(black)
setPosition(68, 394)
repeat(2){
forward(60)
right(90,10)
forward(60)
right(90,10)
}

// 2. for AI Text 
setPenFontSize(40)
setPenFont(Font("Algerian", 40))
setPosition(84,448)
setPenColor(white)
setFillColor(noColor)
write("AI")
setPosition(75,400)
repeat(2){
forward(45)
right(90,10)
forward(45)
right(90,10)
}
setPenColor(black)
setFillColor(black)
setPosition(124,465)  
repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
left(90,6)
forward(8)
hop(8)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
left(90,9)
forward(8)
hop(8)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
left(90,6)
forward(8)
hop(8)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)
hop(25)
right(90)

repeat(2) {
    forward(20)
    right(90)
    forward(10)
    right(90)
}
left(90)

// For decoration of flowers
setPenThickness(10)
setPosition(114,29)
setPenColor(red)
setFillColor(yellow) 
    drawStar(50)

setPosition(211,34)
repeat(5) {
        forward(50)
        right(144)
}

setPosition(320,37)
repeat(5) {
        forward(50)
        right(144)
    }