Code Sketch
India Gate
By: Soham Dabral
Category: Art
2


0




clear() //originBottomLeft() def gate = Picture { forward(250) back(250) right() forward(125) left() forward(450) left() forward(450) left() forward(450) left() forward(125) left() forward(250) arc(100, -180) } def curve = Picture.arc(75, -180) def line(size: Double) = Picture { forward(size) } def sun = penColor(noColor) * fillColor(sunclr) * trans(100, 325) -> Picture.circle(150) def rectangle1 = Picture.rectangle(500, 25) def rectangle2 = Picture.rectangle(350, 50) def rectangle3 = Picture.rectangle(250, 35) def rectangle4 = Picture.rectangle(150, 25) def rectangle5 = Picture.rectangle(50, 130) def rectangle6 = Picture.rectangle(20, 20) def flag = Picture.rectangle(500, 300) def flag1 = Picture.rectangle(500, 100) def font1 = Picture { setPenFont(Font("Colonna MT", 50)) write("Where the mind is without fear") } def font2 = Picture { setPenFont(Font("Segoe Print", 60)) write("Happy Republic Day!") } def font3 = Picture { setPenFont(Font("Colonna MT", 50)) write("and the head is held high...") } def font = Picture { Font("Arial", 20) write("INDIA") } val lightFilter = new com.jhlabs.image.LightFilter lightFilter.getLights.clear() val light = new lightFilter.DistantLight() light.setAzimuth(90.toRadians) light.setElevation(0.toRadians) lightFilter.addLight(light) val lg = effect(lightFilter) val sunclr = cm.radialGradient(0, 0, cm.white, 150, ColorMaker.hsla(0, 0.00, 1.00, 0.00), false) val assetsDir = "C:/Users/Soham/Downloads" val bg = Picture.image(s"$assetsDir/G1.png") val bgclr = cm.linearMultipleGradient(0, 0, 00, 550, Seq(.1, .5, 1), Seq(ColorMaker.hsl(120, 1.00, 0.30), white, cm.orange), false) val orange = cm.linearGradient(100, 100, ColorMaker.hsl(53, 1.00, 0.42), 300, 100, ColorMaker.hsl(20, 1.00, 0.64), false) val green = cm.linearGradient(100, 100, ColorMaker.hsl(120, 1.00, 0.47), 300, 100, ColorMaker.hsl(120, 1.00, 0.28), false) val clr = cm.linearGradient(-55, 180, ColorMaker.hsl(28, 0.66, 0.63), -55, 40, ColorMaker.hsl(28, 1.00, 0.24), false) val IndiaGate = lg -> picStack( penColor(black) * scale(0.75) * fillColor(ColorMaker.hsl(18, 1.00, 0.26)) * trans(-125, 250) -> rectangle1, penColor(black) * scale(0.75) * fillColor(clr) * trans(-50, 275) -> rectangle2, penColor(black) * scale(0.75) * fillColor(clr) * trans(0, 325) -> rectangle3, penColor(black) * scale(0.75) * fillColor(clr) * trans(50, 360) -> rectangle4, trans(-25, 100) * penColor(black) * fillColor(clr) -> Picture.circle(25), trans(210, 100) * penColor(black) * fillColor(clr) -> Picture.circle(25), trans(90, 290) * penColor(black) * fillColor(clr) * rot(180) -> Picture.arc(20, -180), trans(15, 220) * penColor(black) * fillColor(clr) -> Picture.circle(10), trans(180, 220) * penColor(black) * fillColor(clr) -> Picture.circle(10), scale(1.8) * penColor(cm.white) * trans(25, 135) -> font, penColor(black) * fillColor(clr) * trans(-55, -100) -> rectangle5, penColor(black) * fillColor(clr) * trans(190, -100) -> rectangle5, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(-80, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(-50, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(-20, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(10, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(40, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(70, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(100, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(130, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(160, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(190, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(220, 165) -> rectangle6, penColor(black) * fillColor(ColorMaker.hsl(18, 0.96, 0.71)) * trans(245, 165) -> rectangle6, ) val Indflag = lg * trans(90, 330) * scale(0.1) -> picStack( flag, fillColor(green) -> flag1, fillColor(white) * trans(0, 100) -> flag1, fillColor(ColorMaker.hsl(240, 1.00, 0.83)) * trans(250, 150) -> Picture.circle(50), fillColor(orange) * trans(0, 200) -> flag1, trans(0, 265) * penThickness(35) * penColor(cm.brown) -> line(-450) ) val drawing = picStack( fillColor(bgclr) * trans(-cwidth / 2, -cheight + 100) -> Picture.rectangle(cwidth * 2, cheight * 2), sun, trans(-10, -5) * lg * penColor(black) * scale(0.7) * fillColor(cm.black) * trans(225, -200) -> gate, lg * penColor(black) * scale(0.75) * fillColor(clr) * trans(225, -200) -> gate, IndiaGate, Indflag, trans(5, -150) * scale(0.5) -> bg, penColor(cm.blue) * trans(300, 100) -> font1, penColor(cm.blue) * trans(360, 50) -> font3, trans(320, -20) -> font2 ) zoom(.5) drawCentered(drawing)





Your Comment:





Login to post a comment