![]() After the trunk has been drawn, the program resets the console color and prints a message wishing everyone a "Merry Christmas!". ![]() After the top of the tree has been drawn, the program draws the trunk using the of DarkRed. The ornaments are given random colors by setting the property to a random color before printing each ornament. For each row, it calculates the number of asterisks and spaces needed, chooses a random number of ornaments, creates a list of ornaments and asterisks, shuffles the ornaments, and finally draws the row. The program then enters a loop to draw the top of the tree. Next, it creates a random number generator to use for choosing the colors of the ornaments and shuffling their positions. It then calculates the number of rows needed for the top of the tree based on the width. The program starts by parsing the first command line argument as the width of the tree. Here is the complete source code for the program: How It Works Let's begin! Blogpost by ChatGPTĬhristmas is just around the corner, and what better way to get into the holiday spirit than by drawing a beautiful Christmas tree using ASCII art? In this article, we'll go through the steps of creating a C# program that draws a colorful Christmas tree with randomly placed ornaments and a brown trunk. The first generated fully by ChatGPT (including the code), the second written by me, explaining the steps I took to arrive at this result. To go one step further, I asked it to write the accompanying blogpost as well! This post then consists of two parts. Impressed by what it can do, I decided to push its limits and ask it to write a Christmas tree generator program in C#, going through several rounds of improvements to arrive at the final result. It has the ability to write articles, stories, and code, and can engage in conversations with users in a natural and believable way. This December I spent considerable time playing with ChatGPT - an AI language model developed by OpenAI that can generate human-like text when given a prompt. Groves for organizing it again this year! Source code available on my GitHub. I don't really expect very much originality in chat, so the flooding of chat with it at party scenes doesn't really unnerve me, although I do understand why it would others so I don't partake in it myself.This article is part of C# Advent 2022 event! Thanks Matthew D. I did have to change the way my viewer displays text though because otherwise it just looks like junk text. While roaming around on opensim, I stumbled upon an exhibit that showed off a bunch of ANSI art which was simply amazing, I believe it was on a region that was responsible for a customized version of the Ruth Avatar, but it has been a while. While exploring it, I thought how cool it would be if ANSI was supported through SL, although I really doubt many people would appreciate it that much.Īs far as people flooding local chat with ASCII art, it brings back a bit of that nostalgia feeling so I am okay with it all. I do recall doors just started using RIPscript when I made the switch to the web, and it never really took off. I think RIPscript was what surpassed ANSI on the BBS scene but, it was short lived as the Internet became more popularized and the web was more capable with gifs. I never had the knack for it myself, even though it never stopped me from trying. I remember well going through ANSI art on BBS' and being amazed at the skill involved with it all. The ones that make your chat window scroll like those old superfast page printers.? Not for me, thanks, but I wouldn't want to take away the warm, fuzzy feeling of those who enjoy them. Personally I limit myself to the occasional unicode character in a message (a 'thumbs up' or something), like I might us a 'LOL'. With ANSI art you could make your art animate! What better use of a 300 baud modem and expensive telephone call could there be? ![]() that's where ASCII (and, even more fun, ANSI, which most actually use but think it's ASCII) art started of course. The terminal room (which also soon housed the very earliest IBM PCs) had a glass wall with the mainframe on the other side and the lower ranks would stand with their noses pressed to the glass wondering what we were up to in there, humming the theme to Wargames. Our CompSci department had some superfast line printers that could actually throw wide carriage fanfold straight up into the air as it exited the printer's top. ![]() Wow - things buried in deep memory! Yep - I recall those days too. Reminds of the the days when people would print ASCII "Art" on long fanfold banners from dot-matrix printers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |