Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DANILIN

Pages: [1] 2 3 ... 9
1
Programs / Re: QBJS - QBasic for the Web
« on: February 23, 2022, 08:06:38 am »
graphic colors: especially RGB colors are unclear
so I think we need a table of a dozen colors

https://boxgm.itch.io/qbjs

Relief 3d multivariate parametric animate

Code: [Select]
https://v6p9d9t4.ssl.hwcdn.net/html/5279712/index.html?qbcode=BOAQAHvAMsAwmAOsAcc9AMfANb0EiJKbgFBc+xkludGVnZXLoBhkAowgArU8AWckAKcgCfEZEYW5pbGluwAM7gMnYVyZWxpZWbqAFUCRk9STAeEOpAqie7pKiA8vPN7LsAtXZnAOQUlGaBJKcqXZhKSciLQCp72cTAJNT0RYAbvuE4aokIqdqAByy163O11LdP9E6Zga7eavqABpHnRu0tKDbpiz63vjtm9quOwBpjkAClpyRbtjV5sAOM/gFoJFTkRaf5Q05FWFT98tcb08B0dWYEzNScD2rgNLq7yqVmuAFLxAanWlDRnb2H+2IdcjkF18Te9bqEfCs/IM9E0cEhpim70KltU2tGqd/oULap9adPCxBpiSnIsz25QsA3dSoTCT6k/AFLOlGj6s6qRd+8AGNKlmyu7Qp46Xm+ZYSPvkrfHbfqRB63p6gv+jGP67AX+OEpI6FStov1/NcV6iVYewdg7XYBi2GrfAmdqsIVbpngBMgsyjZPG3J+tT4/b8UOX7fqpCCF3z515ik+Y26inOf18Pn7vzVfp+vZF35qpFc99B59yzVJiyDTPUVVGLXm83zOfzfo9pRfYBw2HDYcbxCIiKmIKyjmAF3vJ05O31
https://qb64forum.alephc.xyz/index.php?topic=4398.msg138349#msg138349

 
relup.gif


Code: QB64: [Select]
  1. N = 200: q = 15: DIM As Integer a(q + 1, N) ' Danilin 3d relief
  2. FOR x = 1 TO q: FOR y = 1 TO N - 5:
  3.         IF INT(RND * 100) MOD 7 = 5 THEN
  4. a(x, y) = 5:a(x, y + 1) = 10
  5. a(x, y + 2) = 20: a(x, y + 3) = 40
  6. a(x, y + 4) = 80
  7.         END IF
  8.  
  9. FOR t = 1 TO N - q
  10.     FOR i = 1 TO q - 1
  11.         FOR j = 1 TO q - 1
  12. a(i, j) = a(i, j + t)
  13.         NEXT
  14.     NEXT
  15.     FOR y = 1 TO q - 1
  16.         FOR x = 1 TO q - 2
  17. LINE (30 + 20 * x + 20 * y, 400 - 20 * y - a(x, y))-(30 + 20 * (x + 1) + 20 * y, 400 - 20 * y - a(x + 1, y)), _RGB(((y + t) MOD 5) * 70, 0, 0)
  18.         NEXT
  19.     NEXT
  20.  
  21.     FOR x = 1 TO q - 1
  22.         FOR y = 1 TO q - 2
  23. LINE (30 + 20 * x + 20 * y, 400 - 20 * y - a(x, y))-(30 + 20 * (x + 1) + 20 * y, 400 - 20 * (y + 1) - a(x, y + 1)), _RGB(0, 0, 250)
  24.         NEXT
  25.     NEXT

2
Programs / Re: QBJS - QBasic for the Web
« on: February 21, 2022, 01:05:57 am »
2d arrays matrix are supported?

simply in "Bubble Sorting" replace "d(" on "d(5, "

Javascript without variables:
 
var d = QB.initArray([ 5], }); //


update:
Code: QB64: [Select]
  1. Dim As Integer matrix(5, 5)
  2. matrix(1, 1) = 3: matrix(2, 2) = 5: matrix(3, 3) = 7
  3.      
  4. for i = 1 to 5: for j = 1 to 5
  5.     Print matrix(i, j);

30000
05000
00700
00000
00000

3
Programs / Re: QBJS - QBasic for the Web
« on: February 20, 2022, 07:55:58 am »
https://boxgm.itch.io/qbjs

Bubble Sorting

10 ^ 3 = 0,81 s
10 ^ 4 = 78 s
10 ^ 5 = ? 780 seconds ?
10 ^ 6 = ??? 8100 seconds ??? 1,5 hours

Code: [Select]
https://v6p9d9t4.ssl.hwcdn.net/html/5279712/index.html?qbcode=BOAQAHvAM8A6QDCjgGNAMEAXlQ8JESU1gDJYBRagCmAAr4SMnqWwDTjdqCqJ/NfUd38+wklOVM0CUk5E2gFX6vuQacirCpRJh316doBq+ERQUklOVNwEFad6G9AD1zxiKiSmoqkyC8ueDppUAWo2/cwGpDz8AVtvm6AHUFJRnk+zegD55n3wzhqiQipy4AHEB0QtrmLgAW3zSWN9tYAAz/31TQ4ANASKnIjX3q6o9GTaFWjM6xNe5z637P/N19R6rDNSXtnfdy0jCWK3SVzS43A=
Code: QB64: [Select]
  1. N = 3: a = 10 ^ N: DIM d(a)
  2. FOR i = 1 TO a: d(i) = INT(RND * a): NEXT
  3. FOR i = 1 TO 5: PRINT d(i): NEXT: PRINT: z = TIMER
  4.  
  5. FOR i = 1 TO a - 1: FOR j = i + 1 TO a
  6.         IF d(i) > d(j) THEN
  7.             t = d(i)
  8.             d(i) = d(j)
  9.             d(j) = t
  10.         END IF
  11.  
  12. FOR i = 1 TO 5: PRINT d(i): NEXT: PRINT
  13. FOR i = a - 5 TO a: PRINT d(i): NEXT

error ":" without "end if"
IF d(i) > d(j) THEN t = d(i): d(i) = d(j): d(j) = t

4
Programs / Re: QBJS - QBasic for the Web
« on: February 19, 2022, 08:37:06 am »
theoretically it works and there will still be uncovered functions

Code: [Select]
https://v6p9d9t4.ssl.hwcdn.net/html/5279712/index.html?qbcode=BOAQAHvAN8AKgkRJTdAZAAoXAKeoqmhqSKipyQDEAGU8JGT1J4BrvX7QVRPmANV/mKmJ6GgqiLuQBZhedrgNLi5u74BUByQkEkpypd+EpJyI3AKngBzqAYOgCt17aAOnpc0Mr2uQC1+rKy2AJCIaemJ6ldgL5ASkjoWv85k1Dw9iQxYBOIoKSSnKiqwahpyKsKhmRj386O3dc5evgfr8ARWQlNVTat3cAdo7R4sO6CrTu2sA3zLCr3M8MABel2HGdsigqCT3N2gCUCkoyfp9fIB9d+o/eeqAaokIqct+vmkcP8XlAhAF16wFBAdEABqbZcVdbdgamqIqg7PyAaSAf02mT63kAD6u2cYSanojLrLaBnlFQ0lSQ0xFevQDPXcbjl77g6eKWR+y6nvunuY7+59bZr2j71+/1r2s8+o51fcs7iIepdVa/OF86kziuad/vll7bv9/cAAxgkVORGFwADqfyx7vySbA5ev3nc6Rgz7Ss1qgbQXP1u95alLv23f866+47/n2+h/HjfEZt+4rdxsziXF++5akvvuWtR77557OuvYfez3YAHdXfsA72wCjqiIiKmIKy1d1xIBtsMXYUcSrvT4=
 
dia.PNG


This is Danilin Russian Circle Diagram
https://qb64forum.alephc.xyz/index.php?topic=4367.msg138214#msg138214

5
Programs / Re: QBJS - QBasic for the Web
« on: February 19, 2022, 01:42:03 am »
https://boxgm.itch.io/qbjs

does work... goto & labels ?
does work... circle ? 

Circle (100,150),25,5
QB.sub_Circle(false, 100, 150, 25, 5);

so far: has been calculated in this shell only ... factorial

6
Programs / Re: Binary Sequence Predictor "game"?
« on: February 17, 2022, 09:25:44 am »
shuffle and make sure that number does not take its place
so far without control has array become binomially better

we create an array of numbers in a row
and in 1 pass we rearrange serial number and a random number
and if numbers of rearranged ones match: spinning line is my handwriting

check array and if there are numbers in their places:
we count number and write array as defective
marking matched ones with a minus sign

first and last numbers are displayed on screen but it is possible to write everything to file

how to copy text results from window is unknown therefore:
picture shows: 9 numbers were qualitatively shuffled from 6th attempt
in 0 seconds

next I plan to calculate whether sequence has become truly random
and apparently I will have to switch to index indexes as excel cells

 
tas_xod.PNG


+ update by 10%
result is visible if saved to disk or ram disk
between cells at least 10%
and number of repeated shuffles: up to 25% of array length

Code: QB64: [Select]
  1. a = 100: DIM d(a): x=0: k=0: t$=CHR$(9): RANDOMIZE TIMER 'tas_ten.bas
  2. PRINT ,: FOR i = 1 TO a: d(i)=i: NEXT
  3. FOR i = 1 TO 5: PRINT d(i);: NEXT: PRINT ,
  4. FOR i = a-3 TO a: PRINT d(i);: NEXT: z = TIMER
  5. OPEN "b:/control.txt" FOR OUTPUT AS #1 ' ram disk
  6. WHILE x < 1
  7.     v = 0: FOR i = 1 TO a
  8.        1 m = INT(RND*a)+1: IF ABS(d(i)-d(m)) < .1*a THEN v = v+1: GOTO 1
  9.         PRINT #1, ABS(d(i)-d(m)); t$; d(i); t$; d(m); t$; i; t$; m; t$; d(i)/d(m); t$; d(m)/d(i)
  10.         t = d(i): d(i) = d(m): d(m) = t
  11.     NEXT
  12.  
  13.     s = 0: FOR i = 1 TO a
  14.         IF d(i) = i THEN s = s+1
  15.     NEXT
  16.    5 k = k+1: PRINT: PRINT s; v,: IF s=0 THEN x = x+1
  17.  
  18.     FOR i = 1 TO 5
  19.         IF d(i) = i THEN PRINT -d(i); ELSE PRINT d(i);
  20.     NEXT: PRINT ,
  21.     FOR i = a-3 TO a
  22.         IF d(i) = i THEN PRINT -d(i); ELSE PRINT d(i);
  23.     NEXT
  24. WEND: PRINT: PRINT "    = "; k, TIMER-z: END

result control: open in notepad and search 1.0
as ratio is less than 10% and desired is missing
this means that elements are shuffled at a distance of at least 10% of array from each other

Code: [Select]
41 70 29 91 18 2.413793 .4142857
 59 24 83 92 38 .2891566 3.458333
 14 32 46 93 44 .6956522 1.4375
 23 10 33 94 88 .3030303 3.3
 29 19 48 95 36 .3958333 2.526316
 11 41 30 96 11 1.366667 .7317073
 38 1 39 97 21 2.564103E-02 39
 60 26 86 98 55 .3023256 3.307692
 17 4 21 99 58 .1904762 5.25
 26 100 74 100 59 1.351351 .74

returning to topic: binary arise if you identify parity and odd
and comparing relative average: less or more

7
Programs / Re: Ken's U.S. Flag version 4 - With moving clouds
« on: February 09, 2022, 06:10:00 am »
Realistic Flag Logo
https://renderforest.com/en/template/Realistic-flag-logo-bonus-version
renderforest.com/en/template/Realistic-flag-logo-bonus-version

8
Programs / Re: Tool to convert word list to DATA lines
« on: February 05, 2022, 05:47:13 pm »
in short: using favorite "mod" function

Code: QB64: [Select]
  1. t = -1 'column2line.bas
  2. filename$ = "input.txt": filename2$ = "print.txt"
  3. OPEN filename$ FOR INPUT AS #1: OPEN filename2$ FOR OUTPUT AS #2
  4. DO UNTIL EOF(1): t = t + 1: INPUT #1, a$
  5.     IF t MOD 10 = 0 THEN PRINT #2,: PRINT #2, "DATA " + a$ + ", "; ELSE PRINT #2, a$ + ", ";
  6.     LOCATE 1, 1: PRINT "Number of words or numbers: "; t: LOOP: CLOSE: END


Code: QB64: [Select]
  1. DATA Area, Army, Baby, Back, Ball, Band, Bank, Base, Bill, Body,
  2. ... ... ...
  3. DATA Tara, This, Urgh, Wall, Waly, Wham, Whoa, Word, Yuck,

similar topic September 02, 2020: Rebus of Letters
https://qb64forum.alephc.xyz/index.php?topic=2961.msg122317#msg122317

9
Programs / Re: Radix Sorting
« on: February 04, 2022, 04:56:25 pm »

10
Programs / Re: Russian Circle Diagram
« on: January 22, 2022, 04:31:05 am »
Visualization resembles theory:

60kB 
pirasun55.gif


LAYERS of DECEPTION and WE

Pyramid: visualization is convenient in many areas

Belonging to a minority in pyramid does not make it higher

Narrow layers of pyramid can be higher or lower
wide layers of pyramid and it is always possible
to depict any number of them as a trapezoid inside pyramid

Looking at visually multi colored layered pyramids
being in one pyramid above it is possible to be same people
in a different environment in another pyramid in layer below

New visualization: a ball where pyramids are like spikes
where each turn of ball brings up 1 pyramid
and makes maxima of vertices of other pyramids lower

Almost at top of pyramids capable of deceiving
located higher up in a separate pyramid and deception
requires more information than deceived ones

Other visualization: lever and torque

Product of force on shoulder creates a moment and knowing
moment and lever are calculated as an increase in force
and force field is plotted on inverse function graph

Curves of constant products of different points are obtained
viewpoints that differ vertically and horizontally

To understand vertically it is important to have more
information and be an outstanding person such as
a billionaire or a minister or a champion or a scientist

But horizontally same secret data can really
be thought out by yourself without slightest hints
possibly spending more time

3 kB 
sloi.PNG

11
Programs / Re: Pendula
« on: January 06, 2022, 12:38:38 am »
improvement:

for colorize:
Randomize Timer

thik lines:
_glLineWidth 0.0

or symbol ':
'_glBegin _GL_LINES 

12
Programs / Re: OneColor - coloring puzzle game & level editor
« on: January 05, 2022, 08:27:25 am »
Yes it is a victory

Pictures by 70 KB

 
dacolor13.png


 
dacolor15.png


I'm color professional: Middle Line of Integral:



INTEGRAL for school is just a kindergarten Danilin

Integral of Life: Path

Constant value: time seconds
Variable value: speed of meters per second
Time periods: one second

Each square: product of time of seconds multiplied by speed of meters per second
is path in a given second

...

Summing up entire path of a given time
and distributing it evenly vertically:
average speed of 3 meters per second

Is identical to average value of integral

13
Programs / Re: Map Projections (of the Earth): Any Experts?
« on: January 03, 2022, 10:27:14 am »
Earth is spinning counterclockwise

Sun is first in Russia
and further Atlantic and further Alaska

14
Programs / Re: Binary Sequence Predictor "game"?
« on: December 30, 2021, 11:09:54 pm »
? have you calculated 25ooo 0\1 ?
from message above: 25000.zip

15
Programs / Re: ArcRings
« on: December 25, 2021, 04:47:40 pm »
Next step: Anaglyph red-cyan

240 KB =1000x1000

 
Don-Davis-3d-anaglyph-of-Saturn-Rings-3d-photo-3d-.jpg


+ en.wikipedia.org/wiki/Anaglyph_3D

https://en.wikipedia.org/wiki/Anaglyph_3D

Pages: [1] 2 3 ... 9