Search found 181 matches

by IcarusLives
21 Mar 2025 19:17
Forum: DOS Batch Forum
Topic: 3D points to 2D projection
Replies: 1
Views: 21327

Re: 3D points to 2D projection

I have revisited this project. @echo off & setlocal enableDelayedExpansion call :Set_Font "lucida console" 2 nomax %1 || exit call :init call :constructStars for /l %%# in () do ( for /l %%i in (1,1,%stars%) do ( set /a "tz[%%i]-=speed[%%i]" if !tz[%%i]! lss 1 ( set /a "x=-wid, y=wid, tx[%%i]=%rnd(x...
by IcarusLives
15 Mar 2025 06:02
Forum: DOS Batch Forum
Topic: 3D rotating donut
Replies: 3
Views: 314

3D rotating donut

https://i.imgur.com/iJDR34Q.gif @echo off & setlocal enableDelayedExpansion rem Empty environment, but keep some essentials for /f "tokens=1 delims==" %%a in ('set') do ( set "pre=true" for %%b in (cd Path ComSpec SystemRoot temp windir) do ( if /i "%%a" equ "%%b" set "pre=" ) if defined pre set "%...
by IcarusLives
11 Feb 2025 18:02
Forum: DOS Batch Forum
Topic: Dos Batch Math Library
Replies: 73
Views: 196003

Re: Dos Batch Math Library

atan2 set "atan2(x,y)=I0=(((~(0 - x) >> 31) & 1) & ((~(x - 0) >> 31) & 1)), $atan2=I0 * (9000 * ((y >> 31) - ((-y) >> 31))) + (1 - I0) * (^!Atan(x):x=(1000 * y) / x^! + 18000 * (-(x >> 31)) * (1 + 2 * (y >> 31)))" This is based on atan provided by einstein1969 set "Atan(x)=( r=x, t=((((r>>31|1)*r)-1...
by IcarusLives
06 Dec 2024 08:07
Forum: DOS Batch Forum
Topic: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update
Replies: 9
Views: 7885

Re: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update

With the one you're using now, just give it a value from 0-255 call :subroutine 0-255 0-255 "TEXT" If you want full 24bit rgb, you can do that, too. @echo off for /f %%a in ('echo prompt $E^| cmd') do set "\e=%%a" %= \e =% call :subroutine_text 255 0 0 "Hello World" call :subroutine_text 0 255 0 "He...
by IcarusLives
06 Dec 2024 05:44
Forum: DOS Batch Forum
Topic: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update
Replies: 9
Views: 7885

Re: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update

This line of code gives you the ESC character. The character necessary for VT100. for /f %%a in ('echo prompt $E^| cmd') do set "\e=%%a" %= \e =% @echo off for /f %%a in ('echo prompt $E^| cmd') do set "\e=%%a" %= \e =% call :subroutine 196 15 "Hello World" call :subroutine 226 196 "Hello World" cal...
by IcarusLives
05 Dec 2024 13:08
Forum: DOS Batch Forum
Topic: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update
Replies: 9
Views: 7885

Re: :SetColor <nul SET /P "= [%~1;%~2m" needs a little more cosmetic update

@echo off for /f %%a in ('echo prompt $E^| cmd') do set "\e=%%a" %= \e =% set "text=%\e%[38;5;xm" set "back=%\e%[48;5;xm" set "noColor=%\e%[0m" rem red background/white text echo %back:x=196%%text:x=15%Hello World%noColor% rem yellow background/red text echo %back:x=226%%text:x=196%Hello World%noCo...
by IcarusLives
11 Aug 2024 04:29
Forum: DOS Batch Forum
Topic: Mandelbrot Set, 14 levels of zoom - Pure batch
Replies: 0
Views: 23937

Mandelbrot Set, 14 levels of zoom - Pure batch

https://raw.githubusercontent.com/IcarusLivesHF/Batch-Script-Projects/main/mandelbrot/mandelbrot_screenshots/cmd_23sZuUPG68.png https://raw.githubusercontent.com/IcarusLivesHF/Batch-Script-Projects/main/mandelbrot/mandelbrot_screenshots/cmd_ZCFO81Xq5I.png You can find the code for them here: https:...
by IcarusLives
06 Aug 2024 19:48
Forum: DOS Batch Forum
Topic: 3D Cube Orthographic Projection
Replies: 4
Views: 33293

Re: 3D Cube Orthographic Projection

Update: created %@box% for read/usability angleX, angleY, and angleZ are now independent from each other Uses DDALine instead of BresenhamLine now This version you can change each angle by using keys QA, WS, ED,and size based on RF. Press T to quit @echo off & setlocal enableDelayedExpansion if "%~1...
by IcarusLives
30 Jul 2024 11:53
Forum: DOS Batch Forum
Topic: Reduced-Flicker in dos batch. It's possible?
Replies: 40
Views: 161454

Re: Reduced-Flicker in dos batch. It's possible?

He is more than well aware of vt100 and escape sequences. If he was trying to use them to avoid flicker in window *7*, then it just *wouldn't work*. Why would he bother writing "for windows *7* or later" if he planned on using vt100?
by IcarusLives
30 Jul 2024 11:21
Forum: DOS Batch Forum
Topic: Reduced-Flicker in dos batch. It's possible?
Replies: 40
Views: 161454

Re: Reduced-Flicker in dos batch. It's possible?

miskox wrote:
30 Jul 2024 01:46
What happens if you remove CLS (only one CLS at the beginning) and move cursor with escape sequences?

Saso
It would probably help you if you read his code. It's not for windows 10.
by IcarusLives
13 Jun 2024 05:50
Forum: DOS Batch Forum
Topic: Detect/Correct Window size
Replies: 1
Views: 23402

Re: Detect/Correct Window size

I withdraw my question. Please close. Sorry, and thank you.
by IcarusLives
12 Jun 2024 13:54
Forum: DOS Batch Forum
Topic: Detect/Correct Window size
Replies: 1
Views: 23402

Detect/Correct Window size

Hello, I just want to see if anyone here can help me understand something. When parsing MODE, why will it detect when the window is enlarged, but when I shrink the window, it does not seem to realize it? I explicitly clear the temporary test values twid,thei(test wid test hei), yet it just.. does no...
by IcarusLives
03 Jun 2024 11:58
Forum: DOS Batch Forum
Topic: Single Pendulum
Replies: 0
Views: 23579

Single Pendulum

Hello, I just wanted to share something. Happy coding! https://github.com/IcarusLivesHF/Batch-Script-Projects/tree/main/pendulum https://imgur.com/coS9Cv1.gif @echo off & setlocal enableDelayedExpansion call :init set /a "angle=pi / 4",^ "angleA=0, angleV=0",^ "gravity=16",^ "mass=4",^ "origin.x=wid...
by IcarusLives
30 May 2024 05:07
Forum: DOS Batch Forum
Topic: Do not expand Comments
Replies: 5
Views: 19371

Re: Do not expand Comments

In batch scripting, comments are lines of text that are not executed as commands. They are used to explain and document the code, making it easier to understand and maintain. In batch scripts, comments can be created using the REM command. REM This is a comment REM this is also a comment echo Hello ...