This week, we are sharing a new batch function – which will help you to display a circle in command prompt. The circle function 1.0 is created by kvc. However, the algorithm to print the pixels on the right spot on the Command Prompt console is a bit complex. So, we used the algorithm they are using in C programs. Just convert the C code into the Batch format with some Batch tweaks to make it much fast and quick.
DISPLAY CIRCLE IN COMMAND PROMPT
Simply, I parsed all the knowledge into the Batch Programming language format, to a text document. And after a few formatting steps, It results in a beautiful and properly functioning Batch Plugin, Which can easily fix most of the GUI issues in the CUI world of Batch programming. So, Basically – You can say – this is not entirely created by kvc.
“The beginning is the most important part of the work.”Plato
The algorithm really seems to be a work of genius. Because we don’t have Sin(θ) or Cos(θ) functions in Batch. There is a need for a maths library in Batch Programming, TheBATeam is working on it too.
This algorithm is so mathematically simple that it allows displaying a circle on the Command Prompt without making complex mathematical calculations. We like its simple and effective nature.
How does Circle Notepad Script work?
The circle seems to be Elliptical in shape. So, Why is TheBATeam calling it a circle each time we are using it? The reason for its elliptical nature is that cmd uses Mono-spaced Fonts. and they are longer in height than in width. Hence, the circle (which is created using characters, not pixels) appears longer in height than the width and thus, appear as an ellipse.
But, With some Fn.dll Plugin usage, we can adjust this property of the font and make them squared, then we can have our official circle on the console. We can use the ‘Font’ parameter of Fn.dll plugin and have our desired result as shown in the demo below.
Now you can see the difference in the output, from the above images. The function is very healthy in this environment and works perfectly fine. This may result in a milestone in the advancement of batch programming. And making it one step ahead towards the future.
So, now without wasting any time, let’s jump to my favorite section, Where you can know about using the Circle function and download it and use it in your personal projects. Let’s have a look.
How to Use Circle Function?
Finally, we are talking sense. Now, to use this awesome function. We think the legendary help menu will do most of our work here. We only need to put a simple image and our work is over. You can have an idea about its usage below.
From The Editor’s Desk
If you couldn’t get anything or needed a little help. Just throw a question at us, via the comment field below. Or, join our Discord and WhatsApp in the tab above. We’ll be there for you within 24 hours. Finally, you can download the Function from the link given below.
HASH Code - For Verification - (SHA-256)
Keep learning, keep sharing….TheBATeam
Be happy, spread happiness…