Welcome back to my blog. For the past few Tech classes I have learned how to draw with JavaScript. It took me a while to get used to it, but after multiple tutorials from Khan Academy (you should try some tutorials yourself!) I learned how to program. The photo below is my first coded drawing. It took me three class to make and I am happy with the result. I drew a snowflake because it's very cold here in Korea and it's always snowing. It's actually snowing as I am writing this. The code for this drawing is pasted below this photo and I hope you enjoyed coding as much as I did. background(138, 28, 28);
color(0, 0, 0); line(442, 443, -17, -18); line(-271, 678, 419, -17); line(201, 678, 202, -17); line(-271, 219, 419, 194); noFill(); triangle(149, 56, 202, 201, 2, -1); triangle(45, 136, -1, -3, 201, 200); translate(203, 202); triangle(156, 56, 202, 201, 2, -1); triangle(45, 136, -1, -3, 201, 200); translate(194, -198); rotate(89.5); triangle(149, 55, 202, 201, 2, -1); triangle(45, 136, -1, -3, 201, 200); translate(202, 203); rotate(0.2); triangle(149, 56, 202, 201, 2, -1); triangle(45, 136, -1, -3, 201, 200); line(244, 52, 134, -6); line(244, -67, 134, -7); translate(-18, -3); rotate(183); line(246, 52, 135, -1); line(244, -67, 134, -3); rotate(266); translate(3, -4); line(244, 52, 134, -6); line(244, -67, 134, -7); translate(-16, -3); rotate(183); line(246, 52, 135, -1); line(244, -67, 134, -3);
0 Comments
This assignment is pretty similar to my recent post. However, it includes more features like line breaks, horizontal rule tags, bold text, and italicized text. I wrote three poems to show how to use those markups. Here is the code and the results.
For this assignment, I had to create an HTML code. This was my first time doing something like this and it was very interesting. I have inserted an image of my code and the second image is the code as a file in Chrome.
|
Archives
January 2021
Categories
All
|