Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ASCII cube
#1
ASCII cube

ASCII theme + cube theme = ASCII cube theme

Given: enter the sides of the cube and build a pseudo 3d

I think 7 layers are possible

Code: (Select All)
'12345678x12345x KUB.bas
'********x=====x 1
'*******/*****/1 2
'******/*****/*2 2
'*****/*****/**3 2
'****/*****/***X 3
'***/*****/***1  4
'**/*****/***2   4
'*/*****/***3    4
'1234567***4     5
'1*****1**5      6
'2*****2*6       6
'3*****37        6
'1234567         7
KUB.bas program works if a b c is successfully selected

Does anyone have any experience in creating a parametric ASCII cube?

Code: (Select All)
a = 7: b = 5: c = 8 ' KUB.bas
For i = 1 To c: Print "*";: Next
Print "x";: For i = 1 To a - 2: Print "=";: Next: Print "x 1"

For i = 1 To c - 0 - b:
    For j = c - i To 1 Step -1: Print ".";: Next:

    Print "/";: For k = 1 To a - 2: Print "-";: Next: Print "/";
    For n = 1 To i - 1: Print "o";: Next: Print "| 2"
Next

For j = c - i To 1 Step -1: Print ".";: Next:
Print "/";: For k = 1 To a - 2: Print "-";: Next: Print "/";
For n = 1 To i - 1: Print "o";: Next: Print "x 3"

For m = i To 2 Step -1
    For j = m - 1 To 1 Step -1: Print ".";: Next:
    Print "/";: For k = 1 To a - 2: Print "-";: Next: Print "/";
    For n = 1 To i - 1: Print "o";: Next: Print "/ 4"
Next

Print "x";: For i = 1 To a - 2: Print "=";: Next: Print "x";
For n = 1 To i - 3: Print "o";: Next: Print "/ 5"

For p = 1 To b - 2: Print "|";
    For k = 1 To a - 2: Print "-";: Next: Print "|";
    For n = 1 To b - p - 2: Print "o";: Next: Print "/ 6"
Next

Print "x";: For i = 1 To a - 2: Print "=";: Next: Print "x 7"


Code: (Select All)
**********x=====x 1
........./-----/| 2
......../-----/o| 2
......./-----/oo| 2
....../-----/ooo| 2
...../-----/ooox 3
..../-----/ooo/ 4
.../-----/ooo/ 4
../-----/ooo/ 4
./-----/ooo/ 4
x=====xooo/ 5
|-----|oo/ 6
|-----|o/ 6
|-----|/ 6
x=====x 7

https://jdoodle.com/ia/PXs and press Execute

Variant to shift diagonally from top right to left down
in cycle has not yet been developed
and there are apparently 3 layers of cycles
and possibly a shift to right down
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic

Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Reply


Messages In This Thread
ASCII cube - by DANILIN - 11-05-2023, 06:29 AM
RE: ASCII cube - by DANILIN - 11-05-2023, 04:05 PM
RE: ASCII cube - by bplus - 11-05-2023, 08:03 PM
RE: ASCII cube - by bplus - 11-06-2023, 07:37 PM
RE: ASCII cube - by mnrvovrfc - 11-06-2023, 11:19 PM
RE: ASCII cube - by bplus - 11-07-2023, 12:49 AM
RE: ASCII cube - by bplus - 11-07-2023, 01:06 AM



Users browsing this thread: 2 Guest(s)