Author Topic: Relief 3d multivariate parametric  (Read 5476 times)

0 Members and 1 Guest are viewing this topic.

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Relief 3d multivariate parametric
« on: November 17, 2021, 11:18:56 am »
Relief 3d multivariate parametric

3d relief of 2019 suddenly developed
and, in principle, there are developments of displacement in different directions
using mod function quantitatively and qualitatively

Next, an infinite 1-sided relief
or a 2-sided relief from array is possible

And it is also logical that colored grid should move
and angles can be changed axonometric

Code: QB64: [Select]
  1. 'relorto.bas 5d relief orto
  2. N = 200: q = 15: SCREEN 12: RANDOMIZE TIMER: DIM a(q+1, N)
  3. FOR x = 1 TO q: FOR y = 1 TO N: a(x, y) = INT(RND*20): NEXT: NEXT
  4.  
  5. FOR t = 1 TO N-q
  6.     FOR i = 1 TO q-1: FOR j = 1 TO q-1: a(i, j) = a(i, j+t): NEXT: NEXT: CLS
  7.  
  8.     FOR y = 1 TO q-1: FOR x = 1 TO q-2
  9.         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)), (y+t MOD 7)+1
  10.     NEXT: NEXT
  11.  
  12.     FOR x = 1 TO q-1: FOR y = 1 TO q-2
  13.         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)), 7

Animation 300 kB

 
relorto.gif


Changed a little and edges of field became undulating
and colored grid should move
relorto.gif
* relorto.gif (Filesize: 284.14 KB, Dimensions: 560x300, Views: 468)
« Last Edit: November 19, 2021, 05:14:07 am by DANILIN »
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Marked as best answer by DANILIN on November 25, 2021, 07:16:55 am

Offline DANILIN

  • Forum Regular
  • Posts: 128
    • View Profile
    • Danilin youtube
Re: Relief 3d multivariate parametric
« Reply #1 on: November 22, 2021, 06:10:42 am »
main thing: formula inside array
feature: increment of cycle by simply adding a step probably accelerates

Code: QB64: [Select]
  1. N = 200: q = 15: SCREEN 12: RANDOMIZE TIMER: DIM a(q+1, N)'relup.bas 5d relief up
  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: a(x, y+2) = 20: a(x, y+3) = 40: a(x, y+4) = 80: y = y+5
  5.         END IF
  6. FOR t = 1 TO N-q
  7.     FOR i = 1 TO q-1: FOR j = 1 TO q-1: a(i, j) = a(i, j+t): NEXT: NEXT: CLS
  8.  
  9.     FOR y = 1 TO q-1: FOR x = 1 TO q-2
  10.             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)), (y+t MOD 7)+1
  11.     NEXT: NEXT
  12.  
  13.     FOR x = 1 TO q-1: FOR y = 1 TO q-2
  14.             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)), 7

 
relup.gif


animation 300 KB

variant: CLS or
LINE (50, 30)-(600, 400), 0, BF
« Last Edit: November 24, 2021, 07:08:15 am by DANILIN »
Russia looks world from future. big data is peace data.
https://youtube.com/playlist?list=PLBBTP9oVY7IagpH0g9FNUQ8JqmHwxDDDB
i never recommend anything to anyone and always write only about myself

Offline dbox

  • Newbie
  • Posts: 80
    • View Profile
Re: Relief 3d multivariate parametric
« Reply #2 on: February 23, 2022, 09:27:53 am »
Hey @DANILIN, great example.  I will plan to include the color table for the various screen modes so the simple indexed color numbers can be used in the next build.  I'm compiling a list of bugs and requests that I'm planning to add to the Roadmap page on the qbjs github so we can keep track of what's coming in upcoming releases.

Ooops, I posted this to the wrong thread.