Post by hedgehog7777 on Jun 4, 2021 12:33:55 GMT -5
last edit: 2024, april 18 , find:
02) proboards_FB_corner [ 2024, 4.18 ].txt
10) Asteroids.2.29.fin download
13c) .new hilbert.n.07.83.zip
PCN NEW Mexico 13c) .new hilbert.n.07.83.zip
'
Please sent information or demonstrations Basic_4Gl to : new Email_adress: summerchuck50@gmail.com
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01) PB_Fractal_tree (PCN_wHedgehog).(v1.1).zip
02) Freebasic_corner
03) fractal_tree.PB.01 (d_coding challenge)04) diverse Basic_4gl demonstrations
05) super minesweeper
06) watch computer animated movies
07) diverse downloads
08) COPY and PASTE text
09 a) rotate.PB_14.53.00.03.gb.zip
b) rotate.PB_14.53.03.21.fin.gb.zip
10) download Asteroids.2.29.fin
11) circle w angle.PB.00.11.fin
12) terrain.sph.05.45
13) a) start a hilbert curve (beginner)
b) different begin hilbert_curve
c) .new hilbert.n.07.83.zip
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
01: PB_Fractal_tree (PCN_wHedgehog).(v1.1).zip '(does not work without diverse loadings)
www.mediafire.com/file/qwxu4eq32e7kp27/PB_Fractal_tree_%2528PCN_wHedgehog%2529.%2528v1.1%2529.zip/file
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02: Freebasic corner [ PCN w Hedgehog :]
proboards_FB_corner.txt:
www.mediafire.com/file/bblvrhgjyqlhv3u/proboards_FB_corner_%255B_2024%252C_4.18_%255D.txt/file
'
any more questions or ideas ? write email to :summerchuck50@gmail.com
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
03: fractal_tree.PB.01 www.mediafire.com/file/qwxu4eq32e7kp27/PB_Fractal_tree_%2528PCN_wHedgehog%2529.%2528v1.1%2529.zip/file
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
02: Freebasic corner [ PCN w Hedgehog :]
proboards_FB_corner.txt:
www.mediafire.com/file/bblvrhgjyqlhv3u/proboards_FB_corner_%255B_2024%252C_4.18_%255D.txt/file
'
any more questions or ideas ? write email to :summerchuck50@gmail.com
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'
' thanks to
' David Watson [david@watzon.co.uk] 2011 (copyright for all) for 3D_math
' and coding_challenge (youtube) in 2023,september
'
' use: timer_08g.exe (from 02) to have :time.txt
' manual:keys up+down:fly forward,backward . F6+mouse_x() :change fractal tree
'
declare sub keys() :'declare sub draw(i0,x1,y1) :'declare sub fan1(d)
'
dim tx=80,ty=50,e0=tx-2,e1=ty-5 : e0=15:e1=15 '_Dim.2_
dim sp0:reset m5:read sp0:dim sp#(sp0)
'-----------------------------------------------------------------------------------------------------------------------------
'a
dim a2,a11(99),a1
dim a01,a02,a14#,a15#,a16
dim a$,a1$,a2$(1000)
'b
dim b0,b1
dim b$
'c
dim c0,c1,c2,cr(20),c4(999,2),c(255)
dim camX#,camY#,camZ#
dim c$
'd
dim d,d1(250),da
dim d3,d4,d9,d10,d11,d12,d13,d14,d15
dim d$,d9$,d10$,d0$="texture.00.00.98"
'e
dim e(2)
dim e$
'f
dim f0(1,255),ff2(1,255)
dim fc,fb
dim f2#(5)
dim f(2)
dim file,fe$
dim f1(e0,e1)
dim f3(166),f4(e0,e1)
dim f01,f02,f03,f04,f05,f06,f07,f08,f09,f10,f11,f12,f13,f14,f15,f16,f17,f18,f19,f99,f97
dim f33,f34,f35
'g
dim g(300)
'h
dim h1,hmk
'i
dim in,in2,in3,is3=50
dim i$,in$
dim i1,i2,i3,i4,i5,i6,i7#(5),i8
'l
dim l1,l$,l1$
'm
dim m,m$,m1$
'n
dim n,n$,n1$
'm
dim mb1,mx4,my4,mrp,mx,my,mx2,my2,mx3,my3,mx6#,my6#,mx8,my8,mx#,my#
dim mx1,my1,mx5,my5,mx6,my6,ms
'r
dim r1
dim rx0,ry0
's
dim s,sp1,st,s1
't
dim tam=17,t0(tam),t2(0),tl3,t1(100)
dim w1,wf,w2
'v
dim v1
'x
dim x,x2,x4#,x5#,x6#,x7#,x8#,x9#,xa#
dim x00,x1,x2#,x4,x5,x6,x9
dim xy
'y
dim y,y00,y1,y4,y5,y6,y9
dim y2#,y4#
'z
dim z4,z5
dim z2#
'
dim a#(10,2)
dim lsize#
dim a0,i0,x10,y10
'-----------------------------------------------------------------------------------------------------------------------------
declare sub w(i)
declare sub draw_box(i01,x#,y#,z#)
declare sub v(i00,s1,s2b,s3)
'
Function r(min,max):Return rnd()% (max - min + 1) + min:End Function
Function t(i0#,i1,i2):dim a:a=(i0#+i1)/i2:Return a:End Function
function mb(a):m=mouse_button(a):return m:end function
function skd(i0):i1=ScanKeyDown(i0):return i1:end function
'-----------------------------------------------------------------------------------------------------------------------------
wf=WindowFullscreen():w1=1200:h1=800:if wf then:w1=1920:h1=1080:endif
SetWindowWidth(w1):SetWindowHeight(h1):SetWindowBorder(true):UpdateWindow()
'-----------------------------------------------------------------------------------------------------------------------------
for a0=0 to 9:cr(a0)=a0*28:next
for i0=0 to 999:i1=i0/100:i2=i1*100:i3=(i0-i2)/10:i4=i0-i2-i3*10:c4(i0,0)=cr(i1):c4(i0,1)=cr(i3):c4(i0,2)=cr(i4):next
'
reset m6:for a0=0 to sp0:read sp#(a0):next
for i0=0 to 255:c(i0)=i0:next:reset m18:i0=0:do:read a1,b1:if a1<>-1 then c(a1)=b1:i0=i0+1:endif:loop until a1=-1 :hmk=i0-1
'-----------------------------------------------------------------------------------------------------------------------------
if wf then w2=162 else w2=260 :endif
f35=true 'f31=1:
y00=450:x00=1000:y1=(y00)/10 :x1=(x00)/10
'
st=1:xy=400:a01=st*xy:a02=a01*2
s=1:s1=10
camX# = 0:camZ# = 6
'
rx0=80:ry0=50
ms=1200
'
font(loadtex(d0$+"/font.png"))
'
'2023,july5
dim lum,mb0,mx0,my0,ox,oy,p,spread,x0,y0
dim a as single,b as single,eye as single,px(6399) as single,py(6399) as single,pz(6399) as single
dim rx as double,ry as double,xc as single,xs as single,yc as single,ys as single,z as single
'dim as any ptr fb
dim i as string
function mod(a,b):dim c,d,e:c=a/b:d=c*b:e=a-d:return e:end function
'
goto n1:
for p=0 to 6399
a=int(p/40)/25.46479 'main ring angle, 160 steps around
b=mod(p,40)/6.366198 'b=(p mod 40)/6.366198 'inner rings angle, 40 points per step
px(p)=100*cos(a)*(0.8+cos(b)*0.2)
py(p)=100*sin(b)*0.2
pz(p)=100*sin(a)*(0.8+cos(b)*0.2)
next
n1:
function r0(a):a=a+1:x2=(rnd()%a):return x2:end function
function s2():dim b3:b3=(rnd()%2):b3=(b3=0)-(b3=1):return b3:end function
function xm(a):x2=r0(a)*s2():return x2:end function '-10,0,+10
'--------------------------------------------------------------------------------------------
dim cuam=17'0-6:7
dim cl=50 'cube_lenght
dim p1,p2,cu(99,7,2) as single ',cy(0,7),cz(0,7)
reset m10:
for p1=0 to 7: read x,y,z
for p2=0 to cuam:cu(p2,p1,0)=x*cl:cu(p2,p1,1)=y*cl:cu(p2,p1,2)=z*cl :next
next
'
m10:
data -1,-1,-1 ,-1,1,-1 ,1,1,-1 ,1,-1,-1
data -1,-1, 1 ,-1,1, 1 ,1,1, 1 ,1,-1, 1
'
dim stars=2000
for p=0 to stars :px(p)=xm(1000) :py(p)=xm(1000) :pz(p)=xm(1000):next'not quad_list
'
dim a10 as single,a20 as single,a21 as single,a50 as single,a51 as single
a20=300:a21=1000
'
declare sub c_mk(a1):declare sub mk2(k0,k1)
dim f2(255),f2b(255),f2c(255),sp3
'
dim vpc(99,2),ix,iy,iz
sub vpc_(nr,x,y,z):vpc(nr,0)=x:vpc(nr,1)=y:vpc(nr,2)=z:end sub 'vec_pos_cube
'
i0=-1 '[0-5] new:17 :find here cube_amount
for iy=-500 to 500 step 1000 :for iz=-500 to 500 step 500
for ix=-500 to 500 step 500 :i0=i0+1 :vpc_(i0,ix,iy,iz) :next
next:next
'
'improved with :texture and donut.06.32
sub pcu(nr1,nr2,x,y,z):cu(nr1,nr2,0)=x:cu(nr1,nr2,1)=y:cu(nr1,nr2,2)=z:end sub '99,7
for i0=0 to cuam
for i1=0 to 7 :pcu( i0,i1,cu(i0,i1,0)+vpc(i0,0),cu(i0,i1,1)+vpc(i0,1),cu(i0,i1,2)+vpc(i0,2) ) :next
next
'
m11:
data 0,1,2,3
data 4,5,6,7
data 5,1,2,6
data 4,0,3,7
'
dim tp(99,3) :reset m11:for i0=0 to 3:for i1=0 to 3:read tp(i0,i1):next:next
'
declare sub text():declare sub time():declare sub mouse()
'2023,july6
dim cr1(10) as single,gc(999,2) as single,cb#
for a=0 to 9:cb#=a:cr1(a)=cb#/9:next'1000 gl_colors
for i0=0 to 999:i1=i0/100:i2=i1*100:i3=(i0-i2)/10:i4=i0-i2-i3*10:gc(i0,0)=cr1(i1):gc(i0,1)=cr1(i3):gc(i0,2)=cr1(i4):next'1000 gl_colors
sub glC(a as integer):glColor3f(gc(a,0),gc(a,1),gc(a,2)):end sub
sub dpt(x as single,y as single,z as single):'dim f1:f1=5-int(pz(p)/10)
glPointSize(10):glbegin(gl_points):glVertex3f(x,y,z):glend():
end sub
sub enable():glenable (GL_TEXTURE_2D):glEnable ( GL_BLEND):glColor4f(1, 1, 1, 1):end sub
'------------------------------------------------------------------------------------------------------------------------------- new vector_text
function sa$(i#):dim an$,aa,de$,ac$:an$=str$(i#):aa=len(an$):de$=right$(an$,1)
if de$ = "." then ac$=left$(an$,aa-1) else ac$=an$:endif: :return ac$:
end function
'
dim v3b,v2b,s_amount2,ca2 ',tx,ty ,e0,e1 ,sp0
v3b=98:v2b=52:s_amount2=19+28+1:ca2=40 :
dim a9$(s_amount2),i9(s_amount2),a3(s_amount2,1000),a4(v2b,16),l0(v2b,v3b),wl(s_amount2)
dim v1b
dim v#(v3b,1,2),vertex#(v3b,1,2),ver#(v3b+1,1,2),ver1#(v3b+1,1,2)
dim ver2#(2),ver3#(2),ver4#(2),ver5#(2),ver6#(2),ver7#(2),ver8#(2)
'
declare sub comp_vecTXT(a$)
dim pxz,a2b(20),a3b(20),ic,i8b,i8c as integer
reset m21:for i1=0 to v2b:read i2:a4(i1,0)=i2:for i3=0 to i2-1:read i4:a4(i1,i3+1)=i4:l0(i1,i4)=1:next:next 'vec_letter
'
reset m3:for i0=0 to v3b:
for i1=0 to 5:read i7#(i1):i7#(i1)=i7#(i1)/20:next
ver#(i0,0)=vec3 (i7#(0),i7#(1),i7#(2)):ver# (i0,1)=vec3(i7#(3),i7#(4),i7#(5)):
ver1#(i0,0)=vec3 (i7#(2),i7#(1),i7#(0)):ver1# (i0,1)=vec3(i7#(5),i7#(4),i7#(3)):
next
'
dim irr_am=16 'irrgegular amount 0-16
reset m31:for i0=0 to irr_am:read a2b(i0),a3b(i0):next
m31:data 46,36 ,44,37 ,32,38 ,58,39 ,47,40 ,45,41 ,43,42 ,95,43 ,40,44 ,41,45 ,61,46 ,63,47 ,100,48 ,35,49 ,39,50 ,105,51 ,64,52
'
reset m4:read i8b:i8c=i8b+1
for i8=0 to i8b: read a9$(i8):i9(i8)=len(a9$(i8))-1:next
for i8=0 to s_amount2:
if i8<i8c then
a$=a9$(i8):comp_vecTXT(a$) '1st 16 sentences
else
a$=sa$(i8-i8c):i9(i8)=len(a$)-1:comp_vecTXT(a$) 'i8=20:0-55
a1=0
endif
next'--->a3(sen,len(sen))
'
sub comp_vecTXT(a$)
for i1=0 to i9(i8):a2$(i1)=mid$(a$,i1+1,1):a2=asc(a2$(i1)):
if a2>47 and a2<58 then:a3(i8,i1)=a2-48:endif'0-9
if a2>64 and a2<91 then:a3(i8,i1)=a2-55:endif'A-Z
for ic=0 to irr_am:if a2=a2b(ic) then a3(i8,i1)=a3b(ic) :endif :next
next:wl(i8)=i9(i8)'0:-48,A:-65
end sub
declare sub Vtxt_xy(sen,lsize#,lcol,distx#,disty#,x,y,z):declare sub Vtxt_xz(sen,lsize#,lcol,distx#,disty#,z,y,x)
declare sub vector_text(i0) :declare sub line_loop3() :declare sub time_read()
'
const coam=19999 'gl and grid color
dim tcl(coam),tcl0,i5b,tcl1,tcl2,tcl3,tcl4,tcl5,tcr,tcy
dim tc1 'bool
'
tcl4=r0(999)
for i0=0 to coam:
tcl1=r0(6):tcl2=r0(6):tcl3=r0(6)
tcl0=tcl1*100+tcl2*10+tcl3
tcl(i0)=tcl0+222
tcl5=tcl4
do:tcl4=r0(100):loop until tcl4<>tcl5
'
if tcl4>=5 and tcl4<=8 then tcl(i0)=099:endif
if tcl4>=10 and tcl4<=11 then tcl(i0)=090:endif
if tcl4>=30 and tcl4<=31 then tcl(i0)=990:tcy=tcy+1:endif
if tcl4>=40 and tcl4<=41 then tcl(i0)=909:endif
if tcl4>=50 and tcl4<=51 then tcl(i0)=900:tcr=tcr+1:endif
next
'-------------------------------------------------------------------------------------------------------------------------------new grid
const gam=20 'grid_amount 13:0-12 'compute and draw grid
dim f31,f31a(gam),gc1(gam)
dim vg(gam,999,3),lr(gam),ud(gam),lr1(gam)
'
declare sub draw_grid4(nr,ww)
declare sub line_lr2(nr,ww)
declare sub line_ud2(nr,ww)
declare sub c_grid4(nr,ww,x3b,y3,z3b,ste,l5)
declare sub c_line_lr4(nr,ww,xb,yb,zb,l5)
declare sub c_line_ud4(nr,ww,xb,yb,zb,l5)
declare sub vg_(nr,w0,x ,y,z)
declare sub glV3fv4(n1,n2,n3,n4,n5)
'
dim x7,x8,y7,y8,z7,z8,z9 'x5,,x9,,y5,,y9,z5
for i0=0 to gam:gc1(i0)=tcl(i0):next 'grid_color gc1(i0)
'for i0=0 to gam-1:c_grid4(i0,1 ,0,-200+i0*300,0 ,20 ,800):next 'f31a(i0)=-1:
dim igr
const lg1=-2000:const lg2=2000
'
c_grid4(0,2 ,0 ,0 , 1000 ,500 ,1000):gc1(0)=990
c_grid4(1,2 ,0 ,0 , -1000 ,500 ,1000):gc1(1)=297
'f31a(i0)=-1...
dim glin as single
dim dgw(gam)
dgw1:data 0,1,2,0,1,2
reset dgw1:for i0=12 to 17:read dgw(i0):next
dim fy1,fh1,fx,fy,fz,went,cx0,cy0,cz0
dim s5 as string,s6 as string:for i0=0 to 3:s5=s5+chr$(32):next:s6=s5+s5
dim gc0(stars)
for i0=0 to stars:gc0(i0)=222+r0(777):next
sp1=4:f2c(1)=sp1:a11(9)=sp1
'2023,july7
dim px1 as single,py1 as single,pz1 as single
dim f40,zr,mx7 as single ,zr1
'2023,july8
dim ca=GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT,gltc(3,1)
reset m7:for i0=0 to 3:read gltc(i0,0),gltc(i0,1):next 'for new sub
m7:data 0,0 ,0,1 ,1,1 ,1,0
'2023,july10
dim qv(5,3,2),a100
reset m8:for i0=0 to 5 :for i1=0 to 3:read qv(i0,i1,0),qv(i0,i1,1),qv(i0,i1,2):next:next'5:sides
'2023,july25
dim zr2
'2023,september
declare sub line(x0,y0,x1,y1):declare sub branch(l0):declare sub draw2()
declare sub slider_f6()
sub disable():gldisable (GL_TEXTURE_2D) :glColor4f(1, 0.5, 0.5, 0.5):end sub
dim mx1#,my1#,mx2#
'-----------------------------------------------------------------------------------------------------------------------------
glViewport(0, 0, WindowWidth(), WindowHeight())
'
glMatrixMode(GL_PROJECTION):glLoadIdentity()
gluPerspective(60, (1*WindowWidth()) / WindowHeight(), .1, 10000000)
glMatrixMode(GL_MODELVIEW):glLoadIdentity()
'
glEnable(GL_DEPTH_TEST) :glDepthFunc(GL_LEQUAL) :glEnable(GL_TEXTURE_2D)
'
textmode(texT_OVERLAID):resizetext(rx0,ry0)
'-----------------------------------------------------------------------------------------------------------------------------
time_read()
'*************************************************************************************************************************************************
do
glClear (ca)
glLoadIdentity ()
'
glRotatef (my, 1, 0, 0) :glRotatef (mx, 0, 1, 0) 'else glRotatef (0, 1, 0, 0) :glRotatef (0, 0, 1, 0)
'
glTranslatef (-camX#, -camY#, -camZ#)
cx0=int(camx#):cy0=int(camy#):cz0=int(camz#)
'----------------------------------------------------------------------------------------------------------
time()
text()
slider_f6()
'----------------------------------------------------------------------------------------------------------
disable()
if f2(123)=0 then vector_text(0):endif
draw_grid4(0,2) :draw_grid4(1,2)
line_loop3()
for i0=0 to stars:glc(gc0(i0)):dpt(px(i0),py(i0),pz(i0)) :next
draw2()
enable()
'----------------------------------------------------------------------------------------------------------
mouse():keys()
'----------------------------------------------------------------------------------------------------------
drawtext():SwapBuffers ()
loop
'*************************************************************************************************************************************************
sub slider_f6():if f2(117) then mx2# =-30+mouse_x()*60:endif:end sub
sub branch(l0):
if l0>.1 then
line (0,0,0,l0):
glTranslatef (0, l0, 0)
glPushMatrix ()
glRotatef (45+mx2#, 0, 0, 1)
branch(l0*.67) 'line(0,0,0,100)
glPopMatrix ()
'
glPushMatrix ()
glRotatef (-45-mx2#, 0, 0, 1)
branch(l0*.67) 'line(0,0,0,100)
glPopMatrix ()
endif
end sub
sub draw2()
dim l0 as single
glLoadIdentity ()
glTranslatef (0, -100, -400)
l0=100:branch(l0) 'line(0,0,0,100)
end sub
sub line(x0,y0,x1,y1):glColor3f(1, 1, 0)
glBegin (GL_lines)
glVertex2f (x0,y0):glVertex2f (x1,y1):
glEnd ()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------
sub mk2(k0,k1):dim a,b
a =abs(k1):
if f2b(k0)=0 and ScanKeyDown(k0) then f2(k0)=not(f2(k0)):f2b(k0)=true:if k1<>0 then b=sgn(k1):f2c(a)=f2c(a)+b::endif:c_mk(k0):endif
if f2b(k0) and ScanKeyDown(k0)=0 then f2b(k0)=0 :endif 'check_mk2 k0
end sub
'
sub c_mk(a1)
if a1=112 or a1=113 then
if f2c(1)= 6 then f2c(1)=0:endif
if f2c(1)=-1 then f2c(1)=5:endif
sp1=f2c(1)
endif
if a1=123 then x10=mx:y10=my:endif
if a1=115 then if f2c(2)>7 then f2c(2)=0:endif :endif
end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub w(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'-----------------------------------------------------------------------------------------------------------------------------
sub line_loop3() 'texture.00.00.18
glc(900)
glBegin (GL_LINE_LOOP)
glVertex3f( -5 , 22 ,0) :glVertex3f((x1+1)*12+5 , 22 ,0)
glVertex3f( (x1+1)*12+5,-y1*22-5,0) :glVertex3f(-5 ,-y1*22-5,0)
glend()
end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub keys()
if f2(123)=0 then 'F12
c0=ScanKeyDown (VK_DOWN)-ScanKeyDown (VK_UP)=ScanKeyDown (VK_left)-ScanKeyDown (VK_right)
if (c0 or c0=1) then
a14#=cosd(my)/1.01: a15#=int(a14#)*2+1:a16=a15#
camX# = camX# + c0*sp#(sp1)*sind (mx) *a16
camY# = camY# - c0*sp#(sp1)*sind (my)
camZ# = camZ# - c0*sp#(sp1)*cosd (mx) *cosd(my)
x4=t(camx#,a01,a02):y4=t(camy#,a01,a02):z4=t(camz#,a01,a02)
gosub xyz2
endif
'
if g(1)=113 then camY#=camY#+sp#(sp1):endif 'qa
if g(1)= 97 then camY#=camY#-sp#(sp1):endif 'qa
'
if g(1)=119 then camZ#=camZ#+sp#(sp1):endif 'ws
if g(1)=115 then camZ#=camZ#-sp#(sp1):endif 'ws
'
if g(1)=120 then camX#=camX#+sp#(sp1):endif 'xz
if g(1)=122 then camX#=camX#-sp#(sp1):endif 'xz
endif
'-----------------------------------------------------------------------------------------------------
in = InScanKey ():if in<>0 then g(0)=in:endif :if ScanKeyDown (g(0)) =0 then g(0)=0:endif
in$= inkey$():if in$<>"" then g(1)=asc(in$):endif :if keydown(chr$(c(g(1))))=0 then g(1)=0:endif:
'-----------------------------------------------------------------------------------------------------
mk2(112,-1):mk2(113,1):
mk2(115,2) 'F4
mk2(122,0)
mk2(116,0):mk2(117,0) 'F5,F6
end sub
xyz2:x2#=camX# :y2#=camY#:z2#=camZ#:return
'-----------------------------------------------------------------------------------------------------------------------------
sub mouse(): mx=INT(mouse_x()*721-360):my=INT(mouse_y()*361-180) :end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub draw_box(i01,x#,y#,z#):a#(10)=vec3(x#,y#,z#)
v(0,-s,-s,0):v(1, s,-s,0):v(2, s, s,0):v(3,-s, s,0):
glBindTexture(GL_TEXTURE_2D, t0(i01))
glBegin(Gl_quads)
glTexCoord2f(0,0): glVertex3fv(a#(0)+a#(10))
glTexCoord2f(1,0): glVertex3fv(a#(1)+a#(10))
glTexCoord2f(1,1): glVertex3fv(a#(2)+a#(10))
glTexCoord2f(0,1): glVertex3fv(a#(3)+a#(10))
glend()
end sub
sub v(i00,s1,s2b,s3):a#(i00)=vec3(s1,s2b,s3):end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub time_read()
file = openfileread("time.txt")
if FileError () <> "" then :Locate 1,23:print FileError ():endif
b=endoffile(file):
if not(b) then
d9$ =ReadLine(file)
d10$=ReadLine(file)
a1$ =ReadLine(file)'"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
endif
d9=val(d9$):d10=val(d10$)
CloseFile (file)
end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub text()
w(777)
locate 0,1
printr "F6:";f2(117);s5
'
w(900)
if f2(123) then
printr "mb(0):";mb(0);s5
printr "Y/H:";fy1;"/";fh1;s5
printr "mb(1):";mb(1);s5
else
printr "UP or down"
printr s6
printr s6
endif
'
w(777)
printr "F4:";f2c(2);s5 'check cube_points
printr cx0;"/";cy0;"/";cz0;s6
printr "rx:";rx;s6
printr "ry:";ry;s6
printr "mx2#:";mx2#;s6
w(666) : locate 0,47
printr "----------------------------------------------------------------------------"
w(099) :print "g(0):";g(0);" "
w(909) :locate 10,48 :print "g(1):";g(1);" "
w(900) :locate 20,48 :print "mx/my:" ;mx ;"/";my ;" "
w(990) :locate 0,49:print "-F1.F2+:speed:";sp1;"/";sp#(sp1);" "
w(990) :locate 30,49:print "* Time:" ;d13;".":if d15<10 then print"0":endif:print d15;" "
end sub
'-----------------------------------------------------------------------------------------------------------------------------
sub time():d3=PerformanceCounter():d4=d3/1000:'time...d13,d14,d15
d11=d9-d10+d4:d12=d11/60:d13=d12/60:d14=d13*60:d15=d12-d14 :end sub
'-----------------------------------------------------------------------------------------------------------------------------
m5:data 12'sp#:0-11 'speed
m6:data .1,1,10,25,50,100,200,1000,10000,20000,100000 '.001,.01,
'-----------------------------------------------------------------------------------------------------------------------------
sub quads1() 'gltc(i0,0),gltc(i0,1)
glBindTexture(GL_TEXTURE_2D, t0(0))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f( 1, 1,-1)
glTexCoord2f(0,1): glVertex3f(-1, 1,-1)
glTexCoord2f(1,1): glVertex3f(-1, 1, 1)
glTexCoord2f(1,0): glVertex3f( 1, 1, 1)
glEnd()
'
glBindTexture(GL_TEXTURE_2D, t0(1))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f( 1,-1, 1)
glTexCoord2f(0,1): glVertex3f(-1,-1, 1)
glTexCoord2f(1,1): glVertex3f(-1,-1,-1)
glTexCoord2f(1,0): glVertex3f( 1,-1,-1)
glEnd()
'
glBindTexture(GL_TEXTURE_2D, t0(2))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f( 1, 1, 1)
glTexCoord2f(0,1): glVertex3f(-1, 1, 1)
glTexCoord2f(1,1): glVertex3f(-1,-1, 1)
glTexCoord2f(1,0): glVertex3f( 1,-1, 1)
glEnd()
'
glBindTexture(GL_TEXTURE_2D, t0(3))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f( 1,-1,-1)
glTexCoord2f(0,1): glVertex3f(-1,-1,-1)
glTexCoord2f(1,1): glVertex3f(-1, 1,-1)
glTexCoord2f(1,0): glVertex3f( 1, 1,-1)
glEnd()
'
glBindTexture(GL_TEXTURE_2D, t0(4))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f(-1, 1, 1)
glTexCoord2f(0,1): glVertex3f(-1, 1,-1)
glTexCoord2f(1,1): glVertex3f(-1,-1,-1)
glTexCoord2f(1,0): glVertex3f(-1,-1, 1)
glEnd()
'
glBindTexture(GL_TEXTURE_2D, t0(5))
glBegin(GL_QUADS)
glTexCoord2f(0,0): glVertex3f( 1, 1,-1)
glTexCoord2f(0,1): glVertex3f( 1, 1, 1)
glTexCoord2f(1,1): glVertex3f( 1,-1, 1)
glTexCoord2f(1,0): glVertex3f( 1,-1,-1)
glEnd()
'endif
end sub
m8:
data 1,-1, 1 ,-1,-1, 1 ,-1,-1,-1 ,1,-1,-1
data 1,-1, 1 ,-1,-1, 1 ,-1,-1,-1 ,1,-1,-1
data 1, 1, 1 ,-1, 1, 1 ,-1,-1, 1 ,1,-1, 1
'
data 1,-1,-1 ,-1,-1,-1 ,-1, 1,-1 , 1, 1,-1
data -1, 1, 1 ,-1, 1,-1 ,-1,-1,-1 ,-1,-1, 1
data 1, 1,-1 , 1, 1, 1 , 1,-1, 1 , 1,-1,-1
'-----------------------------------------------------------------------------------------------------------------------------
m18:
data 126,96,33,49,64,50,35,51,36,52,37,53,94,54,38,55,42,56,40,57,41,48,95,45,43,61,123,91,125,93,124,92,58,59,34,39,60,44,62,46,63,47,97,65,98,66,99,67,100
data 68,101,69,102,70,103,71,104,72,105,73,106,74,107,75,108,76,109,77,110,78,111,79,112,80,113,81,114,82,115,83,116,84,117,85,118,86,119,87,120,88,121,89,122,90,-1,-1
'-----------------------------------------------------------------------------------------------------------------------------
sub vector_text(i0)
' (sen,lsize#,lcol,distx#,disty#,x,y,z)
if i0=0 then
Vtxt_xy( 0,16, 46,12 ,2.2, 0, 0, -100) 'Vtxt_xy(sen,lsize#,lcol,distx#,disty#,x,y,z) 46
Vtxt_xy( 1,16, 40,12 ,3 , -3,-10, -100)
Vtxt_xy( 2,16,777,12 ,2.2, 10,-20,- 100) 'x=10 letters
Vtxt_xy( 0, 4,900,12 ,2.2, 10,-10,- 10)
'
Vtxt_xz( 2,16, 990,12 ,2.2,100,-20, 10) 'z=10 letters
endif
end sub
'
sub Vtxt_xy(sen,lsize#,lcol,distx#,disty#,x,y,z)
gllinewidth(4): glc(lcol) 'glBindTexture(GL_TEXTURE_2D, t(0)(lcol)):
glBegin (GL_lineS)
for i0=0 to wl(sen):b=a3(sen,i0):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b,0)'vertex-amount
v1b=a4(b,i1)
ver4#=vec3(x*distx#+i0*distx#,-y*disty#,z)
ver6#=ver#(v1b,0)*lsize#:ver7#=ver#(v1b,1)*lsize#
ver2#=ver6#+ver4#
ver3#=ver7#+ver4#
glVertex3fv (ver2#):glVertex3fv (ver3#)
next
next
glend()
end sub
sub Vtxt_xz(sen,lsize#,lcol,distx#,disty#,z,y,x)
gllinewidth(4): glc(lcol) 'glBindTexture(GL_TEXTURE_2D, t(0)(lcol)):
glBegin (GL_lineS)
for i0=0 to wl(sen):b=a3(sen,i0):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b,0)'vertex-amount
v1b=a4(b,i1)
ver4#=vec3(z,-y*disty#,x*distx#+i0*distx#)
ver6#=ver1#(v1b,0)*lsize#:ver7#=ver1#(v1b,1)*lsize#
ver2#=ver6#+ver4#
ver3#=ver7#+ver4#
glVertex3fv (ver2#):glVertex3fv (ver3#)
next
next
glend()
end sub
'
m3:' ver#( 0,0)_____ver#( 0,1)
data 0,10,0 , 0,20,0 '00
data 0, 0,0 , 0,10,0
data 10,10,0 , 10,20,0
data 10, 0,0 , 10,10,0
data 0,20,0 , 10,20,0
data 0, 0,0 , 10, 0,0
data 0,10,0 , 10,10,0
data 10,10,0 , 5, 5,0'07
data 5, 5,0 , 5, 1,0
data 5, 0,0 , 5,20,0
data 0,10,0 , 5,20,0'10
data 10,10,0 , 5,20,0
data 0,10,0 , 5, 0,0
data 10,10,0 , 5, 0,0
data 4.5,10,0 , 5.5,10,0
data 4.5, 0,0 , 5.5, 0,0'15
data 10,20,0 , 10,12,0'16...B
data 0,10,0 , 08,10,0'17...B
data 10,00,0 , 10,08,0'18...B
data 08,10,0 , 10,08,0'19...B
data 08,10,0 , 10,12,0'20...B
data 10,10,0 , 04,10,0'21...G
data 05,20,0 , 10,20,0'22...J
data 00,10,0 , 10,20,0'23...K
data 00,10,0 , 10,00,0'24...K
data 00,20,0 , 05,10,0'25...M
data 10,20,0 , 05,10,0'26...M
data 00,20,0 , 10,00,0'27...N
data 08,02,0 , 11,-1,0'28...Q
data 00,10,0 , 10,00,0'29...R
data 00,20,0 , 05,00,0'30...V
data 10,20,0 , 05,00,0'31...V
data 00,00,0 , 05,09,0'32...W
data 10,00,0 , 05,09,0'33...W
data 00,00,0 , 10,20,0'34...X
data 00,20,0 , 05,12,0'35...y
data 10,20,0 , 05,12,0'36...y
data 05,00,0 , 05,12,0'37...y
data 00,20,0 , 08,20,0'38...D
data 00,00,0 , 08,00,0'39...D
data 10,02,0 , 10,18,0'40...D
data 10,02,0 , 08,00,0'41...D
data 08,20,0 , 10,18,0'42...D
data 4.8,0,0 , 5.2,0,0'43 .
data 5,1,0 , 4.5,-3,0'44 ,
data 0,0,0 , 0,0,0 '45 spc
data 4.5,12,0 , 5.5,12,0'46 :
data 4.5,08,0 , 5.5,08,0'47 :
data 1,00,0 , 9,19,0'48 /
data 1,10,0 , 9,10,0'49 -
data 5,15,0 , 5,05,0'50 +
data 0, 0,0 , 10,00,0'51 _
data 8,0,0 , 5,03,0'52 (
data 5,3,0 , 5,17,0'53 (
data 5,17,0 , 8,20,0'54 (
'
data 2, 0,0 , 5,03,0'55 )
data 5, 3,0 , 5,17,0'56 )
data 5,17,0 , 2,20,0'57 )
'
data 0, 8,0 , 10, 8,0'58 =
data 0,12,0 , 10,12,0'59 =
data 2,10,0 , 8,10,0'60 Z
'
data 4.5,0,0 , 5.5,0,0 '61 ?
data 5.5,0,0 , 5.5,1,0 '62 ?
data 5.5,1,0 , 4.5,1,0 '63 ?
data 4.5,1,0 , 4.5,0,0 '64 ?
'
data 5,3,0 , 5,10,0 '65 ?
data 5,10,0 , 10,10,0 '66 ?
data 10,10,0 , 10,20,0 '67 ?
data 10,20,0 , 4,20,0 '68 ?
'
data 0,0,0 , 10,0,0 '69 d
data 0,0,0 , 0,10,0 '70 d
data 0,10,0 , 10,10,0 '71 d
data 10,0,0 , 10,20,0 '72 d
'
data 2,5,0 , 4,15,0 '73 #
data 6,5,0 , 8,15,0 '74 #
'
data 0, 0,0 , 0,20,0 '75 B
data 0,20,0 , 8,20,0 '76 B
data 0, 0,0 , 8, 0,0 '77 B
data 8,20,0 , 10,18,0 '78 B
data 8,0,0 , 10, 2,0 '79 B
data 10,12,0 , 10,18,0 '80 B
data 10, 2,0 , 10, 8,0 '81 B
'
data 9,16,0 , 11,20,0 '82 '
data 5, 0,0 , 5, 8,0 '83 i
data 5,10,0 , 5,11,0 '84 i
'@
data 8, 3,0 , 4,17,0 '85 @_start
data 4,17,0 , 2,16,0 '86
data 2,16,0 , 2, 5,0 '87
data 2, 5,0 , 4, 3,0 '88
data 4, 3,0 , 8,17,0 '89
data 8, 3,0 ,10, 5,0 '90
data 10, 5,0 ,10,18,0 '91
data 10,18,0 , 8,20,0 '92
data 8,20,0 , 2,20,0 '93
data 2,20,0 , 0,16,0 '94
data 0,16,0 , 0, 4,0 '95
data 0, 4,0 , 2, 0,0 '96
data 2, 0,0 , 8, 0,0 '97
data 8, 0,0 ,10, 2,0 '98 @_end
'*******************************************************************************************************************
m21:
data 7,0,1,2,3,4,5,34 '0
data 1,9 '1
data 5,1,2,4,5,6 '2
data 5,2,3,4,5,6 '3
data 4,0,2,3,6 '4
data 5,0,3,4,5,6 '5
data 6,0,1,3,4,5,6 '6
data 3,2,3,4 '7
data 7,0,1,2,3,4,5,6'8
data 6,0,2,3,4,5,6 '9
data 6,0,1,2,3,4,6 'A...10
data 9,0,1,4,5,16,17,18,19,20 'B...11
data 4,0,1,4,5 'C...12
data 7,0,1,38,39,40,41,42 'D...13
data 5,0,1,4,5,6 'E...14
data 4,0,1,4,6 'F...15
data 6,0,1,3,4,5,21 'G...16
data 5,0,1,2,3,6 'H...17
data 1,9 'I...18
data 4,2,3,5,22 'J...19
data 4,0,1,23,24 'K...20
data 3,0,1,5 'L...21
data 6,0,1,2,3,25,26 'M...22
data 5,0,1,2,3,27 'N...23
data 6,0,1,2,3,4,5 'O...24
data 5,0,1,2,4,6 'P...25
data 7,0,1,2,3,4,5,28 'Q...26
data 6,0,1,2,4,6,29 'R...27
data 5,0,3,4,5,6 'S...28
data 2,4,9 'T...29
data 5,0,1,2,3,5 'U...30
data 2,30,31 'V...31
data 6,0,1,2,3,32,33 'W...32
data 2,27,34 'X...33
data 3,35,36,37 'Y...34
data 3,4,5,34 'Z...35
data 1,43 '. 36
data 1,44 ', 37
data 1,45 'spc.38
data 2,46,47 ': 39
data 1,48 '/ 40
data 1,49 '- 41
data 2,49,50 '+ 42
data 1,51 '_ 43
data 3,52,53,54 '( 44
data 3,55,56,57 ') 45
data 2,58,59 '= 46
data 8,61,62,63,64,65,66,67,68 '? 47
data 4,69,70,71,72 'd 48
data 4,73,74,58,59 '# 49
data 1,82 '' 50
data 2,83,84 'i 51
'
data 14,85,86,87,88,89,90,91,92,93,94,95,96,97,98 '@ 52
'
m4:
data 19
data "012 OPL DEF GHI JKL MNO PQR STU VWX YZ0 ?" '0
data "178.,456.,7890.,DARKRED.,8B0000.,BMP +" '1
data "154.205.050.YELLOWGREEN.9ACD32.BMP_" '2
data "MERCURY (2_24473_P)" '3
data "VENUS (5_45570_P)" '4
data "EARTH (5_63291_P)" '5
data "MARS (3_96203_P)" '6
data "JUPITER (60_328692_P)" '7
data "SATURN (51_602110_P)" '8
data "URANUS (22_1211392_P)" '9
data "NEPTUNE (21_1897468_P)" '10
data "PLUTO (1_2491983_P=2.5 MILLION PLUTO_DIAMETER_UNITS AWAY FROM THE SUN.1 PLUTO DIAMETER IS :2370 KM.) "'11
data "DISTANCE FROM PLANET TO PLANET IS 100 TIMES BIGGER ." '12
data "PLUTO DIAMETER IS: 2370 KM (1481 MILES) .THAT IS ONE UNIT (P). (FOR PLANET_SIZES AND DISTANCES)" '13
data "SUN_DIAMETER IS: 588 PLUTO_UNITS. SUN TO PLUTO DISTANCE IS :2491983 PLUTO_UNITS" '14
data "(2_24473_P):2 PLUTO_UNITS (SIZE) AND 24473 PLUTO_UNITS DISTANCE TO SUN)" '15
data "3D_ROOM (X/Y):" '16
data "TEXTURE.00.00.98F AND MATRIX_10.07.12B.05.FIN : MARCH 2022" '17
data "/" '19
data "NEW SENTENCE : @ ."'18
'***************************************************************************************************************************************************
'draw_grid ----------------------------------------------------------------------------------------------
sub c_grid4(nr,ww,x3b,y3,z3b,ste,l5)
f31a(nr)=-1
z9=-l5-ste:do:z9=z9+ste:c_line_lr4(nr,ww,x3b,y3,z3b,l5):loop until z9=l5:lr(nr)=f31a(nr)
x9=-l5-ste:do:x9=x9+ste:c_line_ud4(nr,ww,x3b,y3,z3b,l5):loop until x9=l5:
ud(nr)=f31a(nr):lr1(nr)=lr(nr)+1 ' f01=true'....................................
end sub
sub c_line_ud4(nr,ww,xb,yb,zb,l5) 'up_down
f31a(nr)=f31a(nr)+1:
if ww=0 then vg_(nr,xb ,yb-L5,zb+x9,yb+L5):endif
if ww=1 then vg_(nr,xb+x9,yb ,zb-L5,zb+L5):endif
if ww=2 then vg_(nr,xb+x9,yb-L5,zb ,yb+L5):endif
end sub
sub c_line_lr4(nr,ww,xb,yb,zb,l5) 'left_right
f31a(nr)=f31a(nr)+1:
if ww=0 then vg_(nr,xb ,yb+z9,zb-L5,zb+L5):endif
if ww=1 then vg_(nr,xb-L5,yb ,zb+z9,xb+L5):endif
if ww=2 then vg_(nr,xb-L5,yb+z9,zb ,xb+L5):endif
end sub
sub vg_(nr,w0,x,y,z):vg(nr,f31a(nr),0)=w0:vg(nr,f31a(nr),1)=x:vg(nr,f31a(nr),2)=y:vg(nr,f31a(nr),3)=z:end sub
'--------------------------------------------------------------------------------------------------
sub glV3fv4(n1,n2,n3,n4,n5):glVertex3f ( vg(n1,n2,n3),vg(n1,n2,n4),vg(n1,n2,n5) ):end sub
sub draw_grid4(nr,ww)
gllinewidth(1) :f31a(nr)=-1
glc(gc1(nr)) '1000 gl_colors:[000-999]...[0,0,0 - 255,255,255] 'older:GL_TxB(co)
glBegin (GL_LINES)
for z9=0 to lr(nr):line_lr2(nr,ww):next
for z9=lr1(nr) to ud(nr):line_ud2(nr,ww):next ' f01=true'....................................
glend()
end sub
sub line_lr2(nr,ww) 'left_right
f31a(nr)=f31a(nr)+1:
if ww=0 then glV3fv4(nr,f31a(nr),0,1,2):glV3fv4(nr,f31a(nr),0,1,3) else glV3fv4(nr,f31a(nr),0,1,2):glV3fv4(nr,f31a(nr),3,1,2):endif
end sub
sub line_ud2(nr,ww) 'up_down
f31a(nr)=f31a(nr)+1
if ww=1 then glV3fv4(nr,f31a(nr),0,1,2):glV3fv4(nr,f31a(nr),0,1,3) else glV3fv4(nr,f31a(nr),0,1,2):glV3fv4(nr,f31a(nr),0,3,2):endif
end sub
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++04:diverse Basic_4gl demonstrations
www.mediafire.com/file/b8qgv4konjjd9rh/basic4GL_demos.zip/file
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
05:minesweeper game:
super_minesweeper_N_NV.24.fin.zip (36.61 KB)
... newest (2022,6.30 ) and best version minesweeper.zip:
www.mediafire.com/file/t4lhcojmopikbjq/super_minesweeper_N.state.26.02.14b.fin.zip/file
'****************************************************************************************************
06:watch computer animated movies
'
www.youtube.com/watch?v=TvaPolBwav4 'Bruce Lee vs. Incredible Hulk - EA Sports UFC 4 - Epic Fight
www.youtube.com/watch?v=YGwAaRllFm0 'BRUCE LEE vs MIKE TYSON 2K19 | MUST SEE!!! | EA SPORTS UFC 3
www.youtube.com/watch?v=zdVCy8sWJNk 'Bruce Lee vs. Shan Tsung (EA Sports UFC 2)
www.youtube.com/watch?v=TnLVPI2ruGg 'UFC 4 | Bruce Lee vs. Fighter Ryu - REMATCH (EA Sports UFC 4)
www.youtube.com/watch?v=S1upuIlCEyk 'Bruce Lee vs. Titan Atlas - EA Sports UFC 4 - Epic Fight
www.youtube.com/watch?v=hz85twMfR-k 'UFC 4 | Bruce Lee vs. MK Rambo (EA Sports UFC 4)
www.youtube.com/watch?v=B4tgFLHMZd4 'UFC 4 | Bruce Lee vs. Chuck Kirkendall (Kali Muscle) (EA Sports UFC 4)
www.youtube.com/watch?v=1KP846nnufU 'Bruce Lee vs. Black Devil (EA Sports UFC 2) - Rematch
www.youtube.com/watch?v=AAeRRlCNFIk 'UFC 4 | Bruce Lee VS Mike Tyson | EA SPORTS UFC 4
www.youtube.com/watch?v=ljPPQU0wGGo 'UFC 4 | Bruce Lee VS Hulk | EA SPORTS UFC 4
www.youtube.com/watch?v=RTYF_wooahg 'Bruce Lee vs Incredible Hulk - EA Sports UFC 4 - Epic Fight #2
www.youtube.com/watch?v=1AjYwA7aYdM 'UFC 4 | Bruce Lee VS Jean-Claude Van Damme | EA SPORTS UFC 4
www.youtube.com/watch?v=QcJdMNh67jg 'UFC 4 - Bruce Lee vs. Muhammad Ali - Dragon Fights
www.youtube.com/watch?v=SLD9xzJ4oeU 'Thor vs Hulk - Fight Scene - The Avengers (2012) Movie
www.youtube.com/watch?v=XlbYfpHURog 'UFC3 | Bruce Lee vs HulK HogaN (EA Sports UFC 3)
'
www.youtube.com/watch?v=n671gfEhcvk 'Up 2009 FULL MOVIE HD - Best Disney Pixar Animation Movies in English 2021
www.youtube.com/watch?v=ynRCYGowBOw 'Marvel Avengers 3 Vs. Capcom Full Movie
www.youtube.com/watch?v=MS2HPymZyGg 'Finding nemo (480p,79min).mp4
www.youtube.com/watch?v=yj5IkYAioSc 'Ice Age Dawn of the Dinosaurs Ice Age 3 Full Movie HD Ice Age 200972
www.youtube.com/watch?v=JMA4UIPzHww 'Zootopia Full Movie In English 1080p
www.youtube.com/watch?v=9W1X579CUb4 'Family Movie 2021 - BEAUTY AND THE BEAST 2017 Full Movie HD - Best Family Movies Full Length English
www.youtube.com/watch?v=2yiTxPj0Jo0 'Avatar 2 Full Movie
www.youtube.com/watch?v=1wa4zFNzrvw 'Sonic Unleashed
www.youtube.com/watch?v=sgHDIUxR23E 'Super Mario Odyssey - Full Game Walkthrough
www.mediafire.com/file/1ycoc92ecug4dh2 'GTA_5_Which_VEHICLE_Survives_the_BIGGEST_LOOP_.mp4/file '(water and fire)
'****************************************************************************************************
07:diverse downloads:
'
www.mediafire.com/file/0k3lyqz511dyg8g/Fusion_v3.64_and_6_games.zip/file 'Fusion_v3.64 and 6 games.zip '(GENESIS)
www.mediafire.com/file/6vjf0dnlnfi2aoo/N64_and_Banjo-Kazooie.zip/file 'N64
www.mediafire.com/file/b8qgv4konjjd9rh/basic4GL_demos.zip/file 'demonstrate basic 4gl
www.mediafire.com/file/1cak0y81s4af8a8/mspaint_Win7_en-US.zip/file 'mspaint Win7 en-US.zip
www.mediafire.com/file/fkqbpu1pcr86vj2/Super_Mario_Odyssey_-_Full_Game_Walkthrough-%2528480p%2529.mp4/file 'Super_Mario_Odyssey (2h52min)
'---------------------------------------------------------------------------------------------------------------------------------------------
' 08:COPY and PASTE text
'
01) go with the mouse over the line which you like to copy (from left to right)
02) go with mouse to the begin of the line which you need to COPY
03) keep left mousebutton pressed and go slowly over all the line (for COPY)
the text gets inverted,choose only the website to get inverted (not the commentary)
04) release left mousebutton, the text stays inverted
05) press short (max 0.5 sec) the right mousebutton
06) a window opens and choose COPY, press short left mouse_button
07) go with mouse_pointer to the exact location to place text (in text-editor)
08) press short (max 0.5 sec) the left mousebutton
09) press CTRL+V
'
'****************************************************************************************************************************
' 09a: rotate.PB_14.53.gb
'
' manual:
'------------------------------------------------
rotate object in every angle
'------------------------------------------------
1) leave box with key 'S'.
2) have a little distance to the box.
3) look at box and ...
4) press F6 ---> camera_rotation_stops.
5) keep pressed Lmb (=left_mouse_button).
6) go 1 inch with mouse.
7) move mouse in an angle.
8) stop pressing Lmb.
9) box rotates with this angle.
10) press Lmb to stop box_rotation.
11) back to point 6
'------------------------------------------------
rotate.PB_14.53.00.03.gb.zip:
www.mediafire.com/file/zqbt1amd09g84j3/rotate.PB_14.53.00.03.gb.zip/file
'
09b:
rotate.PB_14.53.03.21.fin.gb.zip:
www.mediafire.com/file/07uek7o43s2fnc0/rotate.PB_14.53.03.21.fin.gb.zip/file
'
manual
fly: forward:Y + backward:H
option 1:keep left_mouse_button (Lmb) pressed - move mouse in an angle (1sec) - release Lmb - ( move mouse further this direction) - short press Lmb
rotate-axis press
Z right_mb or F11
Y F10
X F9
'
option 2 : keep F1 pressed and start (GO) . Press once 'enter' to start mouse ( improve this [fly in 3D concept] )
keep Lmb pressed to change mouse_position .
'****************************************************************************************************
10: Asteroids.2.29.fin
'download at :
OpenDrive.com
LOGIN:CHUCK001001@protonmail.com and password :75122300554a
'
click the Public Folder and the folder:001_basic_4gl, find:Asteroids_folder/
2024,1.27: addition:2 folders : data/ and sounds/
'****************************************************************************************************
11: circle w angle.PB.00.11.fin
www.mediafire.com/file/ksm8x59jqiw54yl/.circle_w_angle.PB.00.11.fin.zip/file
'****************************************************************************************************
12: terrain.sph.05.45
' terrain.sph.05.45 '2023,october 11
'special thanks to coding challenge for triangle_strip (youtube)
'action: only change:
' compute summits:c_summit( 150,45,45 ,25,10 ,25,10)
' c_summit(yc#,xc,zc ,lx,xsteep ,lz,zsteep)
'
'yc#:summit_height(y)
'xc,zc:summit_position
'lx:mountain lenght_x
'xsteep:how steep is x:small_nr=veF
'zsteep:how steep is z:small_nr=very steep, big_nr:less steep
'
'put in a few different summits
'
'wd0=100:how wide is field
'
'
declare sub keys(h)
'-------------------------------------------------------------------------------------------------------------------------
'pre-dim z.02_vector_letter_08
dim v3=98'vertex-amount
dim v2=52'letter_amount
dim s_amount=02
dim max_ver_am=14 'maximal vertexe for one letter
dim vec_txt_am=4
dim wl_max=37 'which_letter (in sentence) (maximal letters in sentence)
dim vec0#(vec_txt_am,wl_max,max_ver_am,2),vec1#(vec_txt_am,wl_max,max_ver_am,2)
dim a3(s_amount,1000),a4(v2,16),wl(s_amount)
dim a2$(1000)
dim i7#(5)
dim v1
dim v#(v3,1,2),vertex#(v3,1,2),ver#(v3+1,1,2),ver1#(v3+1,1,2)
dim ver2#(2),ver3#(2),ver4#(2),ver5#(2),ver6#(2),ver7#(2)
'-------------------------------------------------------------------------------------------------------------------------
dim a0,a2,a1,a14#,a15#,a$,a1$
dim b0,b1
dim c(255),c4(999,2),cr(20),c0,c1,cx,cy,cz,camX#,camY#,camZ#,c$
dim d0,d3,d4,d9,d10,d11,d12,d13,d14,d15,d0$="texture and data sheet",d9$,d10$
dim file,f02,f10
dim g(1)
dim h1
dim in,in$,i,i0,i1,i2,i3,i4,ix,iy,iz,i8
dim mx,my
dim p = GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT
dim rx,ry
dim sp1,sp3
dim t0(5),t4(999)
dim wf,w1
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2022,10.22 'diverse declarations
declare sub mouse():declare sub bug():declare sub line_loop()::declare sub file_error()
declare sub time_read():declare sub time():declare sub xyz():
'----------------------------------------------------------------------------------------------------------------------------------------------------
Function r(min,max):Return rnd()% (max - min + 1) + min:End Function 'diverse functions
Function t(i0#,i1,i2):dim a0:a0=(i0#+i1)/i2:Return a0:End Function
function mb(a):dim mbt:mbt=mouse_button(a):return mbt:end function
function skd(i0):i1=ScanKeyDown(i0):return i1:end function
'----------------------------------------------------------------------------------------------------------------------------------------------------
wf=WindowFullscreen():w1=1200:h1=800:if wf then:w1=1920:h1=1080:endif 'window
SetWindowWidth(w1):SetWindowHeight(h1):SetWindowBorder(true):UpdateWindow()
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub w(i) 'text
for a0=0 to 9:cr(a0)=a0*28:next
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim sp0:reset m5:read sp0:dim sp#(sp0) 'speed
reset m6:for a0=0 to sp0:read sp#(a0):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub dVt():declare sub dVt_init():declare sub Vt2(nr,sen,lcol,lw) 'draw_vector_text
declare sub Vtxt_xy(nr,sen,lsize#,distx#,disty#,x,y,z):declare sub Vtxt_xz(nr,sen,lsize#,distx#,disty#,z,y,x)
'
reset m21:for i1=0 to v2:read i2:a4(i1,0)=i2:for i3=0 to i2-1:read i4:a4(i1,i3+1)=i4:next:next
'
reset m3:for i=0 to v3:
for i1=0 to 5:read i7#(i1):i7#(i1)=i7#(i1)/20:next
ver#(i,0) =vec3 (i7#(0),i7#(1),i7#(2)):ver# (i,1) =vec3(i7#(3),i7#(4),i7#(5))
ver1#(i,0)=vec3 (i7#(2),i7#(1),i7#(0)):ver1# (i,1)=vec3(i7#(5),i7#(4),i7#(3))
next
'
dim a2b(20),a3b(20),irr_am=16,ic 'irrgegular amount 0-16
reset m31:for i=0 to irr_am:read a2b(i),a3b(i):next
m31:data 46,36 ,44,37 ,32,38 ,58,39 ,47,40 ,45,41 ,43,42 ,95,43 ,40,44 ,41,45 ,61,46 ,63,47 ,100,48 ,35,49 ,39,50 ,105,51 ,64,52
'
reset m4:
for i8=0 to s_amount
read a$:i3=len(a$)-1:
for i1=0 to i3:a2$(i1)=mid$(a$,i1+1,1):a2=asc(a2$(i1)):
if a2>47 and a2<58 then:a3(i8,i1)=a2-48:endif'0-9
if a2>64 and a2<91 then:a3(i8,i1)=a2-55:endif'A-Z
for ic=0 to irr_am:if a2=a2b(ic) then a3(i8,i1)=a3b(ic) :endif :next
next:wl(i8)=i3'0:-48,A:-65
next
'
m4:'summerchuck50@gmail.com
data "SUMMERCHUCK50@GMAIL.COM"
data "178.,456.,7890.,DARKRED.,8B0000.,BMP +"
data "154.205.050.YELLOWGREEN.9ACD32.BMP_"
'----------------------------------------------------------------------------------------------------------------------------------------------------
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,august18 'draw_grid
'declare sub glTC2(n0)
dim si=-1,si1
dim v00(9999,3,2) as single,i00,tc(3,1),i01,i03,drs2(9999)
tc1:data 0,0 ,0,1 ,1,1 ,1,0
reset tc1:for i0=0 to 3:read tc(i0,0),tc(i0,1):next
c1=-1
declare sub draw_ngrid(n0):declare sub new_grid(i1)
dim ng0(255),ng1(255),p1,px(6399),py(6399),pz(6399),p0
gllinewidth(5)
i0=-1 :iy= 1500:new_grid(0) :iy=-1500:new_grid(1) 'i0 only once -1
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim cb1 as single,cr0(10) as single,gc(999,2) as single 'shared as single '1000 gl_colors
dim a1b ,i1b,i2b,i3b,i4b,glc0(9) 'shared as uinteger
for a1b=0 to 9:cb1=a1b:cr0(a1b)=cb1/9:next'1000 gl_colors
for i0=0 to 999:
i1b=int(i0/100):i2b=i1b*100:i3b=int((i0-i2b)/10):i4b=i0-i2b-i3b*10:
gc(i0,0)=cr0(i1b):gc(i0,1)=cr0(i3b):gc(i0,2)=cr0(i4b):'? i0;":";gc(i0,0);"/";gc(i0,1);"/";gc(i0,2);"/" ''do:loop until inkey="n"
next'do:loop
sub glC(a as integer):glColor3f(gc(a,0),gc(a,1),gc(a,2)):end sub
glc0(0)=900:glc0(1)=90
'function r00(a):dim x2#:a=a+1:x2#=(rnd()%a)::return x2#:end function
function r00(a):dim x2#:a=a+1:x2#=(rnd()%a)::return x2#:end function
for i0=2 to 9:glc0(i0)=222+r00(777):next
sub enable():glenable (GL_TEXTURE_2D):glEnable ( GL_BLEND):glColor4f(1, 1, 1, 1):end sub
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub mk2(k0,k1):declare sub c_mk(a1) 'keys
dim f3c(99),f3(255),f3b(255)
for i=0 to 255:c(i)=i:next:reset m18:i=0:do:read a1,b1:if a1<>-1 then c(a1)=b1:i=i+1:endif:loop until a1=-1 ':hmk=i-1 'keys
'----------------------------------------------------------------------------------------------------------------------------------------------------
sp1=5:f3c(1)=sp1 :rx=80:ry=50 :camX# = 0:camZ# = 6
dVt_init()
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,9.21
function r1(a,div):dim x2,x3#:x2=(rnd()%a)+1:x3#=x2/div:return x3#:end function
function s1():dim b3:b3=(rnd()%2):b3=(b3=0)-(b3=1):return b3:end function
function r0(a,div) as single:dim x2#,x3#:a=a+1:x2#=(rnd()%a):x3#=x2#/div::return x3#:end function ' 0-10
function yn(a,div) as single:dim y as single:y=r0(a,div)*s1():return y:end function
function ym(a,div) as single:dim y as single:y=-r0(a,div):return y:end function
function yp(a,div) as single:dim y as single:y= r0(a,div) :return y:end function
dim am,ap,up
'
'do:printr ym(100,100):loop
sub wait():if keydown("N") then printr"***":do:loop until keydown("N")=0:endif:end sub
'
dim wd0=100,wd1=wd0+1,ya(wd1,wd1) as single,l1=5 ',x1c(wd1)
dim x0c,z0c,z1(wd1),z2,f01,co(wd1,wd1),x2(wd0),z0b(wd0),z1b(wd1) 'y0
',scl=2,
'z1+x1_table
for z0c=0 to wd0 :z1(z0c)=z0c+1: :x2(z0c)=z0c*l1:z0b(z0c)=z0c*l1:z1b(z0c)=z1(z0c)*l1:next 'x1c(z0)=z0+1
for z0c=0 to wd0 :for x0c=0 to wd0:co(x0c,z0c)=222+r0(777,1):next:next
'
dim xcm,xcp,xc2,xc3,zc2,zc3 ',a10#
dim zcm,zcp,xc0,zc0,ix0,iz0
'dim fp(wd0,wd1)
'2023,9.23
dim inf
dim ye0 as single ,ye1 as single ',zst as single
'--------------------------------------------------------------
sub c_summit(yc#,xc,zc,lx,xsteep#,lz,zsteep#)
dim i1
xc0=xc:zc0=zc
'
xcm=xc-1 :if xcm<0 then xcm=0 :endif
xcp=xc+1 :if xcp>wd0 then xcp=wd0:endif
xc2=xc-lx:if xc2<0 then xc2=0 :endif :xc3=xc+lx:if xc3>wd0 then xc3=wd0:endif
'
zcm=zc-1 :if zcm<0 then zcm=0 :endif
zcp=zc+1 :if zcp>wd1 then zcp=wd1:endif
zc2=zc-lz:if zc2<0 then zc2=0 :endif :zc3=zc+lz:if zc3>wd1 then zc3=wd1:endif
'-------------------------------------------------------------------------------------------------
i1=zc0 'middle_edge
ye0=ya(xc,zc) :if yc#>ye0 then ya(xc,zc)=yc#:endif
'
for i0=xcp to xc3'xc+lx
ye0=ya(i0,i1):ye1=ya(i0-1,i1)-r1(100,xsteep#)-1 :if ye1>ye0 then ya(i0,i1)=ye1:endif
next
for i0=xcm to xc2 step-1 'zc-lz
ye0=ya(i0,i1):ye1=ya(i0+1,i1)-r1(100,xsteep#)-1 :if ye1>ye0 then ya(i0,i1)=ye1:endif
next
'---------------------------------------------------------------------
'center into +
for i1=zcp to zc3 'zc+lz
for i0= xc2 to xc3 'all x
ye0=ya(i0,i1):ye1=( ya(i0,i1-1)+ya(i0+1,i1-1) ) /2 -r1(100,zsteep#) :if ye1>ye0 then ya(i0,i1)=ye1:endif
next
next
'---------------------------------------------------------------------
for i1=zcm to zc2 step -1 'zc-lz
for i0= xc2 to xc3: 'all x
ye0=ya(i0,i1):ye1=( ya(i0,i1+1)+ya(i0+1,i1+1) ) /2 -r1(100,zsteep#) :If ye1>ye0 then ya(i0,i1)=ye1:endif
next
next
end sub
'--------------------------------------------------------------
sub dpt(yc#,xc,zc)::glBegin(gl_points):glVertex3f(xc,yc#,-zc):glEnd():end sub
'
xyz()
'sub c_summit( yc#,xc,zc ,lx,xsteep ,lz,zsteep) :lx,lz:smaller nr is steeper
c_summit( 200,50,50 ,45,8 ,45,8)
c_summit( 250,25,25 ,45,7 ,45,7)
c_summit( 300,80,80 ,40,7 ,40,7)
c_summit( 300,20,80 ,45,7 ,45,7)
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,sept25
declare sub draw_spheren():declare sub comp_spheren():declare sub c_sphere(i,x,y,z)
dim ix2(99),iy2(99)
dim sph_amount=100
dim x8#(sph_amount,181,360),y8#(sph_amount,181),z8#(sph_amount,181,360)
dim cl0(1000) :for i0=0 to 1000:cl0(i0)=222+r00(777):next
dim vs(99,9999,1,2) as single
sub vs_(n0,n1,n2,x as single,y as single,z as single):vs(n0,n1,n2,0)=x:vs(n0,n1,n2,1)=y:vs(n0,n1,n2,2)=z:end sub
'2023,9.27
declare sub draw_sphere2(i):declare sub compute_sphere(sphnr,l,stpY,stpX ,x,y,z)
dim na(99),i7
sub inc_i8():i8=i8+1:if i8>1000 then i8=0:endif:end sub
'
comp_spheren()
'2023,10.4
dim trY=1200
glpointsize(10)
'*****************************************************************************************************************************************************************
' time_read() :font(loadtex(d0$+"/font.png"))
glViewport(0, 0, WindowWidth(), WindowHeight())
glMatrixMode(GL_PROJECTION):glLoadIdentity()
gluPerspective(60, (1*WindowWidth()) / WindowHeight(), .1, 10000000)
glMatrixMode(GL_MODELVIEW):glLoadIdentity()
'
glEnable(GL_DEPTH_TEST) :glDepthFunc(GL_LEQUAL) :glEnable(GL_TEXTURE_2D)
'
textmode(texT_OVERLAID):resizetext(rx,ry)
do
glClear (p)
glLoadIdentity ()
'
glRotatef (my, 1, 0, 0) :glRotatef (mx, 0, 1, 0)
'
glTranslatef (-camX#, -camY#, -camZ#)
'----------------------------------------------------------------------------------------------------------
time()
'----------------------------------------------------------------------------------------------------------
mouse()
keys(1):keys(2):keys(3):keys(4):
bug()
'----------------------------------------------------------------------------------------------------------
gldisable (GL_TEXTURE_2D)
draw_ngrid(0) 'draw_newgrid
line_loop()
dVt() 'draw_vector_text
'-----------------------------------------------------------------------------------------
glc(990):glBegin(gl_lines):glVertex3f(0,0,0):glVertex3f(100,0,0):glEnd()
glc(99)
'
for z0c=0 to wd0
glBegin(gl_trIANGLE_STRIP) 'filled
for x0c=0 to wd0
glc(co(x0c,z0c))
glVertex3f (x2(x0c),ya(x0c,z0c) ,-z0b(z0c) )
glVertex3f (x2(x0c),ya(x0c,z1(z0c)),-z1b(z0c) ) 'z1 :5 rows (wd0=4)
next
glEnd()
next
'
glBegin(gl_trIANGLE_STRIP)
glVertex3f ( 0,trY,0)
glVertex3f ( 0,trY,-200)
glVertex3f (200,trY,0) '1st triangle
glc(90)
glVertex3f (200,trY,-200) '2nd triangle
glc(900)
glVertex3f (400,trY,0) '3rd triangle
glEnd()
'
draw_spheren()
'
dpt(1,x2(2),z0b(2))
dpt(.5,xcp,z0b(2))
'----------------------------------------------------------------------------------------------------------
enable()
'
'if f10=0 then sponge2(vs2) else for i03=0 to si1:side2(i03):next:endif
'----------------------------------------------------------------------------------------------------------
if mouse_wheel() or mouse_button(2) then f02=true:endif
'----------------------------------------------------------------------------------------------------------
drawtext():SwapBuffers ()
loop
'*****************************************************************************************************************************************************************
sub draw_ngrid(n0) 'glc0(0)
glc(glc0(n0))
for p0=ng0(n0) to ng1(n0) step 2
p1=p0+1 :glBegin(GL_lines):glVertex3f( px(p0),py(p0),pz(p0) ):glVertex3f( px(p1),py(p1),pz(p1) ):glEnd()
next
end sub
sub new_grid(i1)
ng0(i1)=i0+1
for ix=-2000 to 2000 step 200 :for iz=-2000 to 2000 step 4000 :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
for iz=-2000 to 2000 step 200 :for ix=-2000 to 2000 step 4000: :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
ng1(i1)=i0
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub dVt() 'vec_draw3(nr,sen,lsize# ,distx#,disty# ,x,y,z) 'draw_Vector_text
Vt2(0,0,900, 1)
Vt2(1,1,990, 4)
Vt2(2,0,90,10)
Vt2(4,2,99, 4)
end sub
sub dVt_init()
Vtxt_xy(0,0, 2 , 1.2, 2.2 ,10,-1, 0)
Vtxt_xy(1,1, 3 , 2 , 3 ,15, 3, 0)
Vtxt_xy(2,0, 2 , 1.2, 2.2 ,10,-1,- 2)'......
Vtxt_xz(4,2,26 ,20 , 2.2 ,10,10, 100)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub Vt2(nr,sen,lcol,lw)
gllinewidth(lw):glc(lcol)
glBegin (GL_lines)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0):glVertex3fv ( vec0#(nr,i,i1) ):glVertex3fv ( vec1#(nr,i,i1) ):next
next
glend()
end sub
sub Vtxt_xy(nr,sen,lsize#,distx#,disty#,x,y,z)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0)
v1=a4(b0,i1)
ver4#=vec3(x*distx#+i*distx#,-y*disty#,z) :ver6#=ver#(v1,0)*lsize# :ver7#=ver#(v1,1)*lsize# :ver2#=ver6#+ver4# :ver3#=ver7#+ver4#
vec0#(nr,i,i1)=ver2#:vec1#(nr,i,i1)=ver3#
next
next
end sub
sub Vtxt_xz(nr,sen,lsize#,distx#,disty#,z,y,x)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0)'vertex-amount a4(v2,16)
v1=a4(b0,i1)
ver4#=vec3(z,-y*disty#,x*distx#+i*distx#) :ver6#=ver1#(v1,0)*lsize# :ver7#=ver1#(v1,1)*lsize# :ver2#=ver6#+ver4# :ver3#=ver7#+ver4#
vec0#(nr,i,i1)=ver2#:vec1#(nr,i,i1)=ver3#
next
next
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub w(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub line_loop(): 'texture.00.00.18
glBindTexture(GL_TEXTURE_2D, t4(1))
glBegin (GL_LINE_LOOP)
glVertex3f( -5 , 22 ,0) :glVertex3f((1)*12+5 , 22 ,0)
glVertex3f( (1)*12+5,-1*22-5,0) :glVertex3f(-5 ,-1*22-5,0)
glend()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub keys(h)
if h=1 then
c0=ScanKeyDown (VK_DOWN)-ScanKeyDown (VK_UP):d0=ScanKeyDown (VK_left)-ScanKeyDown (VK_right)
if (c0 or c0=1) then
'a14#=cosd(my)/1.01: a15#=int(a14#)*2+1:a16=a15#
camX# = camX# + c0*sp#(sp1)*sind (mx) *cosd(my)'*a16
camY# = camY# - c0*sp#(sp1)*sind (my)
camZ# = camZ# - c0*sp#(sp1)*cosd (mx) *cosd(my)
'x4=t(camx#,a01,a02):y4=t(camy#,a01,a02):z4=t(camz#,a01,a02)
xyz()
endif
endif
if h=2 then
mk2(112,-1):mk2(113,1):
mk2(20,0) 'caps_lock
mk2(123,0)'F12
mk2(122,0)'F11
endif
if h=3 then
in = InScanKey ():if in<>0 then g(0)=in:endif :if ScanKeyDown (g(0)) =0 then g(0)=0:endif 'g(0)=inscan 'skd
if inf=0 then in$= inkey$():if in$<>"" then g(1)=asc(in$):inf=true:endif:endif
if keydown(chr$(c(g(1))))=0 then g(1)=0:inf=0:clearkeys():endif 'g(1)=inkey ,keydown
endif
if h=4 then
if keydown("Q") then camY#=camY#+sp#(sp1):xyz():endif 'qa
if keydown("A") then camY#=camY#-sp#(sp1):xyz():endif 'qa
'
if keydown("S") then camZ#=camZ#+sp#(sp1):xyz():endif 'ws
if keydown("W") then camZ#=camZ#-sp#(sp1):xyz():endif 'ws
'
if keydown("X") then camX#=camX#+sp#(sp1):xyz():endif 'xz
if keydown("Z") then camX#=camX#-sp#(sp1):xyz():endif 'xz
endif
end sub
sub xyz():cx=camX#/l1 :cy=camy#/l1 :cz=-camz#/l1 :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mouse(): 'mx=INT(mouse_x()*721-360):
mx=(mouse_x()-.5)*720 :my=(mouse_y()-.5)*360
if my> 90 then my= 90:endif :if my<-90 then my=-90:endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mk2(k0,k1):dim a,b
a =abs(k1):
if f3b(k0)=0 and ScanKeyDown(k0) then f3(k0)=not(f3(k0)):f3b(k0)=true:if k1<>0 then b=sgn(k1):f3c(a)=f3c(a)+b:c_mk(a):endif:endif
if f3b(k0) and ScanKeyDown(k0)=0 then f3b(k0)=0 :endif 'check_mk2 k0
end sub
'
sub c_mk(a1)
if a1=1 then
if f3c(1)= 6 then f3c(1)=0:endif
if f3c(1)=-1 then f3c(1)=5:endif
sp1=f3c(1)
endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
sub time_read()
file = openfileread(d0$+"/time.txt"):file_error()
b0=endoffile(file):
if not(b0) then
d9$ =ReadLine(file)
d10$=ReadLine(file)
a1$ =ReadLine(file)'"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
endif
d9=val(d9$):d10=val(d10$)
CloseFile (file)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub bug()
'printr a11(11)
locate 0,38
w(099) :printr "g(0):";g(0);" "
w(909) :printr "g(1):";g(1);" "
'if f3(20) then w(r0(999)) else w(444):endif :printr "Caps_lock:";f3(20);" "
'if f3(123) then w(900) else w(333):endif :printr "F12:";f3(123);" "
'if f3(122) then w(900) else w(333):endif :printr "F11:";f3(122);" "
'
locate 0,44:
'w(990):printr "mx6/my6:" ;mx6#;"/";my6#;" "
w(567):printr "sp(";sp1;"):" ;sp#(sp1);" "
w(963):printr "----------------------------------------------------------------------------"
w(900):print "cam#:" ;cx ;"/";cy ;"/";cz;":";camz# ;" * Time:" ;d13;".":if d15<10 then print"0":endif:print d15;" "
'
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub time(): d3=PerformanceCounter():d4=d3/1000:'time...d13,d14,d15
d11=d9-d10+d4:d12=d11/60:d13=d12/60:d14=d13*60:d15=d12-d14 :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m1:data 00001.jpg,00002.jpg,00003.jpg,00004.jpg,00005.jpg,00006.jpg
m5:data 12'sp#:0-11
m6:data .001,.01,.1,1,10,25,50,100,200,1000,10000,20000,100000
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m3:' ver#( 0,0)_____ver#( 0,1)
data 0,10,0 , 0,20,0 '00
data 0, 0,0 , 0,10,0
data 10,10,0 , 10,20,0
data 10, 0,0 , 10,10,0
data 0,20,0 , 10,20,0
data 0, 0,0 , 10, 0,0
data 0,10,0 , 10,10,0
data 10,10,0 , 5, 5,0'07
data 5, 5,0 , 5, 1,0
data 5, 0,0 , 5,20,0
data 0,10,0 , 5,20,0'10
data 10,10,0 , 5,20,0
data 0,10,0 , 5, 0,0
data 10,10,0 , 5, 0,0
data 4.5,10,0 , 5.5,10,0
data 4.5, 0,0 , 5.5, 0,0'15
data 10,20,0 , 10,12,0'16...B
data 0,10,0 , 08,10,0'17...B
data 10,00,0 , 10,08,0'18...B
data 08,10,0 , 10,08,0'19...B
data 08,10,0 , 10,12,0'20...B
data 10,10,0 , 04,10,0'21...G
data 05,20,0 , 10,20,0'22...J
data 00,10,0 , 10,20,0'23...K
data 00,10,0 , 10,00,0'24...K
data 00,20,0 , 05,10,0'25...M
data 10,20,0 , 05,10,0'26...M
data 00,20,0 , 10,00,0'27...N
data 08,02,0 , 11,-1,0'28...Q
data 00,10,0 , 10,00,0'29...R
data 00,20,0 , 05,00,0'30...V
data 10,20,0 , 05,00,0'31...V
data 00,00,0 , 05,09,0'32...W
data 10,00,0 , 05,09,0'33...W
data 00,00,0 , 10,20,0'34...X
data 00,20,0 , 05,12,0'35...y
data 10,20,0 , 05,12,0'36...y
data 05,00,0 , 05,12,0'37...y
data 00,20,0 , 08,20,0'38...D
data 00,00,0 , 08,00,0'39...D
data 10,02,0 , 10,18,0'40...D
data 10,02,0 , 08,00,0'41...D
data 08,20,0 , 10,18,0'42...D
data 4.8,0,0 , 5.2,0,0'43 .
data 5,1,0 , 4.5,-3,0'44 ,
data 0,0,0 , 0,0,0 '45 spc
data 4.5,12,0 , 5.5,12,0'46 :
data 4.5,08,0 , 5.5,08,0'47 :
data 1,00,0 , 9,19,0'48 /
data 1,10,0 , 9,10,0'49 -
data 5,15,0 , 5,05,0'50 +
data 0, 0,0 , 10,00,0'51 _
data 8,0,0 , 5,03,0'52 (
data 5,3,0 , 5,17,0'53 (
data 5,17,0 , 8,20,0'54 (
'
data 2, 0,0 , 5,03,0'55 )
data 5, 3,0 , 5,17,0'56 )
data 5,17,0 , 2,20,0'57 )
'
data 0, 8,0 , 10, 8,0'58 =
data 0,12,0 , 10,12,0'59 =
data 2,10,0 , 8,10,0'60 Z
'
data 4.5,0,0 , 5.5,0,0 '61 ?
data 5.5,0,0 , 5.5,1,0 '62 ?
data 5.5,1,0 , 4.5,1,0 '63 ?
data 4.5,1,0 , 4.5,0,0 '64 ?
'
data 5,3,0 , 5,10,0 '65 ?
data 5,10,0 , 10,10,0 '66 ?
data 10,10,0 , 10,20,0 '67 ?
data 10,20,0 , 4,20,0 '68 ?
'
data 0,0,0 , 10,0,0 '69 d
data 0,0,0 , 0,10,0 '70 d
data 0,10,0 , 10,10,0 '71 d
data 10,0,0 , 10,20,0 '72 d
'
data 2,5,0 , 4,15,0 '73 #
data 6,5,0 , 8,15,0 '74 #
'
data 0, 0,0 , 0,20,0 '75 B
data 0,20,0 , 8,20,0 '76 B
data 0, 0,0 , 8, 0,0 '77 B
data 8,20,0 , 10,18,0 '78 B
data 8,0,0 , 10, 2,0 '79 B
data 10,12,0 , 10,18,0 '80 B
data 10, 2,0 , 10, 8,0 '81 B
'
data 9,16,0 , 11,20,0 '82 '
data 5, 0,0 , 5, 8,0 '83 i
data 5,10,0 , 5,11,0 '84 i
''@
data 8, 3,0 , 4,17,0 '85 @_start
data 4,17,0 , 2,16,0 '86
data 2,16,0 , 2, 5,0 '87
data 2, 5,0 , 4, 3,0 '88
data 4, 3,0 , 8,17,0 '89
data 8, 3,0 ,10, 5,0 '90
data 10, 5,0 ,10,18,0 '91
data 10,18,0 , 8,20,0 '92
data 8,20,0 , 2,20,0 '93
data 2,20,0 , 0,16,0 '94
data 0,16,0 , 0, 4,0 '95
data 0, 4,0 , 2, 0,0 '96
data 2, 0,0 , 8, 0,0 '97
data 8, 0,0 ,10, 2,0 '98 @_end
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m21:
data 7,0,1,2,3,4,5,34 '0
data 1,9 '1
data 5,1,2,4,5,6 '2
data 5,2,3,4,5,6 '3
data 4,0,2,3,6 '4
data 5,0,3,4,5,6 '5
data 6,0,1,3,4,5,6 '6
data 3,2,3,4 '7
data 7,0,1,2,3,4,5,6'8
data 6,0,2,3,4,5,6 '9
data 6,0,1,2,3,4,6 'A...10
data 9,0,1,4,5,16,17,18,19,20 'B...11
data 4,0,1,4,5 'C...12
data 7,0,1,38,39,40,41,42 'D...13
data 5,0,1,4,5,6 'E...14
data 4,0,1,4,6 'F...15
data 6,0,1,3,4,5,21 'G...16
data 5,0,1,2,3,6 'H...17
data 1,9 'I...18
data 4,2,3,5,22 'J...19
data 4,0,1,23,24 'K...20
data 3,0,1,5 'L...21
data 6,0,1,2,3,25,26 'M...22
data 5,0,1,2,3,27 'N...23
data 6,0,1,2,3,4,5 'O...24
data 5,0,1,2,4,6 'P...25
data 7,0,1,2,3,4,5,28 'Q...26
data 6,0,1,2,4,6,29 'R...27
data 5,0,3,4,5,6 'S...28
data 2,4,9 'T...29
data 5,0,1,2,3,5 'U...30
data 2,30,31 'V...31
data 6,0,1,2,3,32,33 'W...32
data 2,27,34 'X...33
data 3,35,36,37 'Y...34
data 3,4,5,34 'Z...35
data 1,43 '. 36
data 1,44 ', 37
data 1,45 'spc.38
data 2,46,47 ': 39
data 1,48 '/ 40
data 1,49 '- 41
data 2,49,50 '+ 42
data 1,51 '_ 43
data 3,52,53,54 '( 44
data 3,55,56,57 ') 45
data 2,58,59 '= 46
data 8,61,62,63,64,65,66,67,68 '? 47
data 4,69,70,71,72 'd 48
data 4,73,74,58,59 '# 49
data 1,82 '' 50
data 2,83,84 'i 51
'
data 14,85,86,87,88,89,90,91,92,93,94,95,96,97,98 '@ 52
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m18:
data 126,96,33,49,64,50,35,51,36,52,37,53,94,54,38,55,42,56,40,57,41,48,95,45,43,61,123,91,125,93,124,92,58,59,34,39,60,44,62,46,63,47,97,65,98,66,99,67,100
data 68,101,69,102,70,103,71,104,72,105,73,106,74,107,75,108,76,109,77,110,78,111,79,112,80,113,81,114,82,115,83,116,84,117,85,118,86,119,87,120,88,121,89,122,90,-1,-1
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'sub find_all_files(g$): dim a$,a,d:a$=findfirstfile(g$+"*.*"):'a$="."
'a=-1: do:a=a+1:d=a+(a>0) :i$(d)=findnextfile():loop until i$(d)="":hmf0=a-2:end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m8:' pt0 ,pt1 ,pt2 ,pt3 :side_data
data 1, 1,-1 ,-1, 1,-1 ,-1, 1, 1 , 1, 1, 1'0...12 data:0-11
data 1,-1, 1 ,-1,-1, 1 ,-1,-1,-1 , 1,-1,-1
data 1, 1, 1 ,-1, 1, 1 ,-1,-1, 1 , 1,-1, 1
data 1,-1,-1 ,-1,-1,-1 ,-1, 1,-1 , 1, 1,-1
data -1, 1, 1 ,-1, 1,-1 ,-1,-1,-1 ,-1,-1, 1
data 1, 1,-1 , 1, 1, 1 , 1,-1, 1 , 1,-1,-1'5
'
m9:
data 1,1,1,1,0,1,1,1,1'cube_top
data 1,0,1,0,0,0,1,0,1'_middle
data 1,1,1,1,0,1,1,1,1'_bottom
'*****************************************************************************************************************
'add a new vector_sentence (line 138:m4)
'change s_amount (line8)
'line285:sub dVt():add a Vtxt_xy() or a Vtxt_xz()..........line295:add a Vt2()
'***********************************************************************************************************************************************
sub draw_spheren()
'draw_sphere(0,40000,0,0)
'draw_sphere(1,-40000,-40000,-40000)
draw_sphere2(0)
draw_sphere2(1)
'draw_sphere(3,0,0,0)
'draw_sphere(4,0,0,0)
end sub
'-----------------------------------------------------------------------------------------------------
sub comp_spheren()
'compute_sphere(0, 2000,10,10)
compute_sphere(1,200,10,10 ,300,800,400)
compute_sphere(0,100,30,30 ,100,500,300)
'compute_sphere(3,1000000,10,20)
'compute_sphere(4, 200,10,10)
end sub
'-----------------------------------------------------------------------------------------------------
sub draw_sphere2(i):glc(cl0(i)):glBegin(gl_trIANGLE_STRIP):for i7=0 to na(i):inc_i8():glVertex3fv (vs(i,i7,0)):glVertex3fv (vs(i,i7,1)):glc(cl0(i8)):next:glend():end sub
'-----------------------------------------------------------------------------------------------------
sub compute_sphere(sphnr,l,stpY,stpX,x,y,z) 'Y:-90 to 90 X:0-360
dim x9#,y9#,gamma,beta#
iy=-1 :gamma=-90-stpY
do:iy=iy+1:gamma=gamma+stpY
x9#=cosd(gamma)*l:y9#=sind(gamma)*l:y8#(sphnr,iy)=y9#
beta# = 0:ix=-1:
'---------------------------------------------------------------------------
do: ix=ix+1
x8#(sphnr,iy,ix)=cosd(beta#) *(x9#) :z8#(sphnr,iy,ix)=sind(beta#) *(x9#)
beta#=beta# +stpx
loop until beta#>360
'---------------------------------------------------------------------------
loop until gamma>=90
iy2(sphnr)=iy :ix2(sphnr)=ix
c_sphere(sphnr,x,y,z)
end sub
sub c_sphere(i,x,y,z):dim a,b,n1
n1=-1
for a=0 to iy2(i):for b=0 to ix2(i)
n1=n1+1
vs_(i,n1,0 ,x+x8#(i,a ,b) ,y+y8#(i,a) ,-z+z8#(i,a ,b) ) 'vs(i,0)=vec3()
vs_(i,n1,1 ,x+x8#(i,a+1,b) ,y+y8#(i,a+1) ,-z+z8#(i,a+1,b) )
next:next
'
na(i)=n1
end sub
'-----------------------------------------------------------------------------------------------------
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13 A: start a hilbert curve (beginner) .For questions :email :summerchuck50@gmail.com
1st goto : basic4gl.proboards.com/thread/3658/diverse-projects-keys-inside-polygon
and convert 'font.03.txt' into 'font.03.png' (29a+b)
'
the font is required for :hilbert_start.(02.21)_fin (in the same folder)
'*****************************************************************************************************
' hilbert_start.(02.21)_fin.gb ' 2023,octopber 5 :PCN Chuck_Hedgehog:
' ( font.03.png in the same folder )
'
declare sub keys(h)
'-------------------------------------------------------------------------------------------------------------------------
'pre-dim z.02_vector_letter_08
dim v3=98'vertex-amount
dim v2=52'letter_amount
dim s_amount=02
dim max_ver_am=14 'maximal vertexe for one letter
dim vec_txt_am=4
dim wl_max=37 'which_letter (in sentence) (maximal letters in sentence)
dim vec0#(vec_txt_am,wl_max,max_ver_am,2),vec1#(vec_txt_am,wl_max,max_ver_am,2)
dim a3(s_amount,1000),a4(v2,16),wl(s_amount)
dim a2$(1000)
dim i7#(5),i8
dim v1
dim v#(v3,1,2),vertex#(v3,1,2),ver#(v3+1,1,2),ver1#(v3+1,1,2)
dim ver2#(2),ver3#(2),ver4#(2),ver5#(2),ver6#(2),ver7#(2)
'-------------------------------------------------------------------------------------------------------------------------
dim a0,a2,a1,a14#,a15#,a$,a1$
dim b0,b1
dim c(255),c4(999,2),cr(20),c0,c1,cx,cy,cz,camX#,camY#,camZ#,c$
dim d0,d3,d4,d9,d10,d11,d12,d13,d14,d15,d0$="texture and data sheet",d9$,d10$
dim file,f02,f10
dim g(1)
dim h1
dim in,in$,i,i0,i1,i2,i3,i4,ix,iy,iz
dim mx,my
dim p = GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT
dim r1,rx,ry
dim sp1,sp3
dim t0(5),t4(999)
dim wf,w1
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2022,10.22 'diverse declarations
declare sub mouse():declare sub bug():declare sub line_loop()::declare sub file_error()
declare sub time_read():declare sub time():declare sub xyz():
'----------------------------------------------------------------------------------------------------------------------------------------------------
Function r(min,max):Return rnd()% (max - min + 1) + min:End Function 'diverse functions
function r0(a):dim x2:a=a+1:x2=(rnd()%a):return x2:end function ' 0-10
Function t(i0#,i1,i2):dim a0:a0=(i0#+i1)/i2:Return a0:End Function
function mb(a):dim mbt:mbt=mouse_button(a):return mbt:end function
function skd(i0):i1=ScanKeyDown(i0):return i1:end function
'----------------------------------------------------------------------------------------------------------------------------------------------------
wf=WindowFullscreen():w1=1200:h1=800:if wf then:w1=1920:h1=1080:endif 'window
SetWindowWidth(w1):SetWindowHeight(h1):SetWindowBorder(true):UpdateWindow()
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub w(i) 'text
for a0=0 to 9:cr(a0)=a0*28:next
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim sp0:reset m5:read sp0:dim sp#(sp0) 'speed
reset m6:for a0=0 to sp0:read sp#(a0):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub dVt():declare sub dVt_init():declare sub Vt2(nr,sen,lcol,lw) 'draw_vector_text
declare sub Vtxt_xy(nr,sen,lsize#,distx#,disty#,x,y,z):declare sub Vtxt_xz(nr,sen,lsize#,distx#,disty#,z,y,x)
'
reset m21:for i1=0 to v2:read i2:a4(i1,0)=i2:for i3=0 to i2-1:read i4:a4(i1,i3+1)=i4:next:next
'
reset m3:for i=0 to v3:
for i1=0 to 5:read i7#(i1):i7#(i1)=i7#(i1)/20:next
ver#(i,0) =vec3 (i7#(0),i7#(1),i7#(2)):ver# (i,1) =vec3(i7#(3),i7#(4),i7#(5))
ver1#(i,0)=vec3 (i7#(2),i7#(1),i7#(0)):ver1# (i,1)=vec3(i7#(5),i7#(4),i7#(3))
next
'
dim a2b(20),a3b(20),irr_am=16,ic 'irrgegular amount 0-16
reset m31:for i=0 to irr_am:read a2b(i),a3b(i):next
m31:data 46,36 ,44,37 ,32,38 ,58,39 ,47,40 ,45,41 ,43,42 ,95,43 ,40,44 ,41,45 ,61,46 ,63,47 ,100,48 ,35,49 ,39,50 ,105,51 ,64,52
'
reset m4:
for i8=0 to s_amount
read a$:i3=len(a$)-1:
for i1=0 to i3:a2$(i1)=mid$(a$,i1+1,1):a2=asc(a2$(i1)):
if a2>47 and a2<58 then:a3(i8,i1)=a2-48:endif'0-9
if a2>64 and a2<91 then:a3(i8,i1)=a2-55:endif'A-Z
for ic=0 to irr_am:if a2=a2b(ic) then a3(i8,i1)=a3b(ic) :endif :next
next:wl(i8)=i3'0:-48,A:-65
next
'
m4:
data "SUMMERCHUCK50@GMAIL.COM"
data "178.,456.,7890.,DARKRED.,8B0000.,BMP +"
data "154.205.050.YELLOWGREEN.9ACD32.BMP_"
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,august18 'draw_grid
dim si=-1,si1
dim v00(9999,3,2) as single,i00,tc(3,1),i01,i03,drs2(9999)
tc1:data 0,0 ,0,1 ,1,1 ,1,0
reset tc1:for i0=0 to 3:read tc(i0,0),tc(i0,1):next
c1=-1
declare sub draw_ngrid(n0):declare sub new_grid(i1)
dim ng0(255),ng1(255),p1,px(6399),py(6399),pz(6399),p0
'
i0=-1 :iy= 1500:new_grid(0) :iy=-1500:new_grid(1) 'i0 only once -1
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim cb1 as single,cr0(10) as single,gc(999,2) as single 'shared as single '1000 gl_colors
dim a1b ,i1b,i2b,i3b,i4b,glc0(9) 'shared as uinteger
'
for a1b=0 to 9:cb1=a1b:cr0(a1b)=cb1/9:next'1000 gl_colors
for i0=0 to 999:
i1b=int(i0/100):i2b=i1b*100:i3b=int((i0-i2b)/10):i4b=i0-i2b-i3b*10:
gc(i0,0)=cr0(i1b):gc(i0,1)=cr0(i3b):gc(i0,2)=cr0(i4b):'? i0;":";gc(i0,0);"/";gc(i0,1);"/";gc(i0,2);"/" ''do:loop until inkey="n"
next'do:loop
sub glC(a as integer):glColor3f(gc(a,0),gc(a,1),gc(a,2)):end sub
glc0(0)=900:glc0(1)=90
sub enable():glenable (GL_TEXTURE_2D):glEnable ( GL_BLEND):glColor4f(1, 1, 1, 1):end sub
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub mk2(k0,k1):declare sub c_mk(a1) 'keys
dim f3c(99),f3(255),f3b(255)
for i=0 to 255:c(i)=i:next:reset m18:i=0:do:read a1,b1:if a1<>-1 then c(a1)=b1:i=i+1:endif:loop until a1=-1 ':hmk=i-1 'keys
'----------------------------------------------------------------------------------------------------------------------------------------------------
sp1=4:f3c(1)=sp1
rx=80:ry=50 :camX# = 0:camZ# = 6
dVt_init() :xyz()
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,10.5 'hilbert
declare sub vl2_(i3,i2,i1,x#,y#,z#)
dim vn(3,2),vm(9,9,2),ix1,vl0(2,1,2) as single,vl1(3,2,1,2) as single,vl1b
reset n01:for i0=0 to 3:read vn(i0,0),vn(i0,1),vn(i0,2) :next
n01:data -1,-1,0 ,-1,1,0 ,1,1,0 ,1,-1,0
'
sub vm_(or,ix,x,y,z):vm(or,ix,0)=x :vm(or,ix,1)=y :vm(or,ix,2)=z :end sub
'
vm_(0,0 ,-2,-2,0):for ix=0 to 1:vm_(0, ix+1,-2+ix*4,2,0):next :vm_(0,3 ,2,-2,0)
vm_(1,1 ,-4,-4,0):for ix=0 to 1:vm_(1, ix+2,-4+ix*8,4,0):next :vm_(1,4 ,4,-4,0)
vm_(2,6 ,-8,-8,0):for ix=0 to 1:vm_(2, ix+7,-8+ix*16,8,0):next :vm_(2,9 ,8,-8,0)
'
for i0=0 to 2: '3 lines
vl0(i0,0,0)=vn(i0,0) :vl0(i0,0,1)=vn(i0,1) :vl0(i0,0,2)=vn(i0,2)
vl0(i0,1,0)=vn(i0+1,0) :vl0(i0,1,1)=vn(i0+1,1) :vl0(i0,1,2)=vn(i0+1,2)
next
'3 lines
'
'declare sub lines(ln)
declare sub rotate_y(alpha5#,x0#,y0#,z0#):declare sub rotate_z(alpha6#,x0#,y0#,z0#)
dim z2#,x2#,y2# ,x3#,y3#,z3#
'
'4 different structures
for i0=0 to 3
for i1=0 to 2
vl1(i0,i1,0,0)=vl0(i1,0,0):vl1(i0,i1,0,1)=vl0(i1,0,1):vl1(i0,i1,0,2)=vl0(i1,0,2) '1st pt
vl1(i0,i1,1,0)=vl0(i1,1,0):vl1(i0,i1,1,1)=vl0(i1,1,1):vl1(i0,i1,1,2)=vl0(i1,1,2) '2nd pt
next
next
'flips and rotate here
'dim z2#,x2#,y2#
sub rotate_y(alpha5#,x0#,y0#,z0#):'xz'rotate y-axis:
dim alpha2#,hy3#,beta1#
alpha2#=atand(x0#/z0#):hy3#=x0#/sind(alpha2#)
beta1# = alpha2#+alpha5#
z2#=cosd(beta1#) *(hy3#) :x2#=sind(beta1#) *(hy3#) :y2#=y0# ':txt3(x2#,y2#,z2#)
end sub
sub rotate_z(alpha6#,x0#,y0#,z0#):'xy'rotate z-axis
dim alpha3#,hy2#,beta#
alpha3#=atand(y0#/x0#):hy2#=y0#/sind(alpha3#)
beta# = alpha3#+alpha6#
x3#=cosd(beta#) *(hy2#) :y3#=sind(beta#) *(hy2#) :z3#=z0# ':txt4(x3#,y3#,z3#)
end sub
'
i0=0
for i1=0 to 2
rotate_y(180,vl1(i0,i1,0,0),vl1(i0,i1,0,1),vl1(i0,i1,0,2))
vl1(i0,i1,0,0)=x2# :vl1(i0,i1,0,1)=y2# :vl1(i0,i1,0,2)=z2#
'
rotate_y(180,vl1(i0,i1,1,0),vl1(i0,i1,1,1),vl1(i0,i1,1,2))
vl1(i0,i1,1,0)=x2# :vl1(i0,i1,1,1)=y2# :vl1(i0,i1,1,2)=z2#
'
rotate_z(-90,vl1(i0,i1,0,0),vl1(i0,i1,0,1),vl1(i0,i1,0,2))
vl1(i0,i1,0,0)=x3# :vl1(i0,i1,0,1)=y3# :vl1(i0,i1,0,2)=z3#
'
rotate_z(-90,vl1(i0,i1,1,0),vl1(i0,i1,1,1),vl1(i0,i1,1,2))
vl1(i0,i1,1,0)=x3# :vl1(i0,i1,1,1)=y3# :vl1(i0,i1,1,2)=z3#
next
'
i0=3
for i1=0 to 2
rotate_y(180,vl1(i0,i1,0,0),vl1(i0,i1,0,1),vl1(i0,i1,0,2))
vl1(i0,i1,0,0)=x2# :vl1(i0,i1,0,1)=y2# :vl1(i0,i1,0,2)=z2#
'
rotate_y(180,vl1(i0,i1,1,0),vl1(i0,i1,1,1),vl1(i0,i1,1,2))
vl1(i0,i1,1,0)=x2# :vl1(i0,i1,1,1)=y2# :vl1(i0,i1,1,2)=z2#
'
rotate_z(90,vl1(i0,i1,0,0),vl1(i0,i1,0,1),vl1(i0,i1,0,2))
vl1(i0,i1,0,0)=x3# :vl1(i0,i1,0,1)=y3# :vl1(i0,i1,0,2)=z3#
'
rotate_z(90,vl1(i0,i1,1,0),vl1(i0,i1,1,1),vl1(i0,i1,1,2))
vl1(i0,i1,1,0)=x3# :vl1(i0,i1,1,1)=y3# :vl1(i0,i1,1,2)=z3#
next
'
'add move vector
for i0=0 to 3 'str.nr
for i1=0 to 2 'line.nr
vl1(i0,i1,0,0)=vl1(i0,i1,0,0)+vm(0,i0,0):vl1(i0,i1,0,1)=vl1(i0,i1,0,1)+vm(0,i0,1):vl1(i0,i1,0,2)=vl1(i0,i1,0,2)+vm(0,i0,2)
vl1(i0,i1,1,0)=vl1(i0,i1,1,0)+vm(0,i0,0):vl1(i0,i1,1,1)=vl1(i0,i1,1,1)+vm(0,i0,1):vl1(i0,i1,1,2)=vl1(i0,i1,1,2)+vm(0,i0,2)
next
next
'declare sub str1_lines(sn)
dim wln,vl2(99,999,1,2) as single ,e0(99),x(99) as single,y(99) as single,z(99) as single ',x1 as single,y1 as single,z1 as single ... as single
'
'connect 4 structures with new vl2(list)
i2=-1
for i0=0 to 3
for i1=0 to 2
i2=i2+1
vl2(0,i2,0,0)=vl1(i0,i1,0,0):vl2(0,i2,0,1)=vl1(i0,i1,0,1):vl2(0,i2,0,2)=vl1(i0,i1,0,2)
vl2(0,i2,1,0)=vl1(i0,i1,1,0):vl2(0,i2,1,1)=vl1(i0,i1,1,1):vl2(0,i2,1,2)=vl1(i0,i1,1,2)
'
if i0<3 and i1=2 then
x(0)=vl2(0,i2 ,1,0) :y(0)=vl2(0,i2 ,1,1) :z(0)=vl2(0,i2 ,1,2)
x(1)=vl1(i0+1,0,0,0) :y(1)=vl1(i0+1,0,0,1) :z(1)=vl1(i0+1,0,0,2)
i2=i2+1 :
vl2(0,i2,0,0)=x(0):vl2(0,i2,0,1)=y(0):vl2(0,i2,0,2)=z(0)
vl2(0,i2,1,0)=x(1):vl2(0,i2,1,1)=y(1):vl2(0,i2,1,2)=z(1) 'structure 0
endif
next
next
'
e0(0)=i2
declare sub str2_lines(i0,i1) :declare sub pt(nr)
'
'4 different structures.b
dim e0p
e0p=e0p+1
'
for i3=1 to 4
for i2=0 to e0(0)
for i1=0 to 2
vl2(i3,i2,0,0)=vl2(0,i2,0,0) :vl2(i3,i2,0,1)=vl2(0,i2,0,1) :vl2(i3,i2,0,2)=vl2(0,i2,0,2) '1st pt
vl2(i3,i2,1,0)=vl2(0,i2,1,0) :vl2(i3,i2,1,1)=vl2(0,i2,1,1) :vl2(i3,i2,1,2)=vl2(0,i2,1,2) '2nd pt
next
next
next
'
'
i3=1
for i2=0 to e0(0)
rotate_y(180,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2(i3,i2,0,0)=x2# :vl2(i3,i2,0,1)=y2# :vl2(i3,i2,0,2)=z2#
'
rotate_y(180,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2(i3,i2,1,0)=x2# :vl2(i3,i2,1,1)=y2# :vl2(i3,i2,1,2)=z2#
'
rotate_z( -90,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2(i3,i2,0,0)=x3# :vl2(i3,i2,0,1)=y3# :vl2(i3,i2,0,2)=z3#
'
rotate_z( -90,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2(i3,i2,1,0)=x3# :vl2(i3,i2,1,1)=y3# :vl2(i3,i2,1,2)=z3#
next
'
i3=4
for i2=0 to e0(0)
rotate_y(180,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x2#,y2#,z2#)
'
rotate_y(180,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x2#,y2#,z2#)
'
rotate_z( 90,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x3#,y3#,z3#)
'
rotate_z( 90,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x3#,y3#,z3#)
next
'
'add move vector and put a new list (with connect)
i1=-1 'new
for i3=1 to 4 'str.nr :4str w list
for i2=0 to e0(0) 'line.nr i0
i1=i1+1
vl2(i3,i2,0,0)=vl2(i3,i2,0,0)+vm(1,i3,0):vl2(i3,i2,0,1)=vl2(i3,i2,0,1)+vm(1,i3,1):vl2(i3,i2,0,2)=vl2(i3,i2,0,2)+vm(1,i3,2)
vl2(i3,i2,1,0)=vl2(i3,i2,1,0)+vm(1,i3,0):vl2(i3,i2,1,1)=vl2(i3,i2,1,1)+vm(1,i3,1):vl2(i3,i2,1,2)=vl2(i3,i2,1,2)+vm(1,i3,2)
'
vl2_(5,i1,0 ,vl2(i3,i2,0,0) ,vl2(i3,i2,0,1) ,vl2(i3,i2,0,2) )
vl2_(5,i1,1 ,vl2(i3,i2,1,0) ,vl2(i3,i2,1,1) ,vl2(i3,i2,1,2) )
'
if i3<4 and i2=e0(0) then
x(2)=vl2(5,i1,1,0) :y(2)=vl2(5,i1,1,1) :z(2)=vl2(5,i1,1,2)
i1=i1+1
vl2_(5,i1,0 ,x(2) ,y(2) ,z(2) )
endif
if i3>1 and i2=0 then
x(3)=vl2(5,i1,0,0) :y(3)=vl2(5,i1,0,1) :z(3)=vl2(5,i1,0,2)
vl2_(5,i1-1,1 ,x(3) ,y(3) ,z(3) )
endif
next
next
'
e0(1)=i1
'
'4 different structures
for i3=6 to 9
for i2=0 to e0(1)
for i1=0 to 2
vl2_(i3,i2,0 ,vl2(5,i2,0,0) ,vl2(5,i2,0,1) ,vl2(5,i2,0,2) )
vl2_(i3,i2,1 ,vl2(5,i2,1,0) ,vl2(5,i2,1,1) ,vl2(5,i2,1,2) )
next
next
next
'
'rotate 6 and 9
i3=6
for i2=0 to e0(1)
rotate_y(180,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x2#,y2#,z2#)
'
rotate_y(180,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x2#,y2#,z2#)
'
rotate_z( -90,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x3#,y3#,z3#)
'
rotate_z( -90,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x3#,y3#,z3#)
next
'
i3=9
for i2=0 to e0(1)
rotate_y(180,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x2#,y2#,z2#)
'
rotate_y(180,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x2#,y2#,z2#)
'
rotate_z( 90,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) )
vl2_(i3,i2,0,x3#,y3#,z3#)
'
rotate_z( 90,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) )
vl2_(i3,i2,1,x3#,y3#,z3#)
next
'
'add move vector and put a new list (with connect)
i1=-1 'new
for i3=6 to 9 'str.nr :4str w list
for i2=0 to e0(1) 'line.nr i0
i1=i1+1
'
vl2_(i3,i2,0 ,vl2(i3,i2,0,0)+vm(2,i3,0) ,vl2(i3,i2,0,1)+vm(2,i3,1) ,vl2(i3,i2,0,2)+vm(2,i3,2) ) 'vl2(i3,i2,0) =vec3( vl2(i3,i2,0)+vm(2,i3) )
vl2_(i3,i2,1 ,vl2(i3,i2,1,0)+vm(2,i3,0) ,vl2(i3,i2,1,1)+vm(2,i3,1) ,vl2(i3,i2,1,2)+vm(2,i3,2) ) 'vl2(i3,i2,1) =vec3( vl2(i3,i2,1)+vm(2,i3) )
'
vl2_(10,i1,0 ,vl2(i3,i2,0,0),vl2(i3,i2,0,1),vl2(i3,i2,0,2) ) 'vl2(10,i1,0) = vec3(vl2(i3,i2,0)
vl2_(10,i1,1 ,vl2(i3,i2,1,0),vl2(i3,i2,1,1),vl2(i3,i2,1,2) ) 'vl2(10,i1,1) = vec3(vl2(i3,i2,1)
'
if i3<9 and i2=e0(1) then
x(2)=vl2(10,i1,1,0) :y(2)=vl2(10,i1,1,1) :z(2)=vl2(10,i1,1,2)
i1=i1+1
vl2(10,i1,0,0)=x(2) :vl2(10,i1,0,1)=y(2) :vl2(10,i1,0,2)=z(2)
endif
if i3>6 and i2=0 then
x(3)=vl2(10,i1,0,0) :y(3)=vl2(10,i1,0,1) :z(3)=vl2(10,i1,0,2)
vl2(10,i1-1,1,0)=x(3) :vl2(10,i1-1,1,1)=y(3) :vl2(10,i1-1,1,2)=z(3)
endif
next
next
'
e0(2)=i1
'
sub vl2_(i3,i2,i1,x#,y#,z#):vl2(i3,i2,i1,0)=x#:vl2(i3,i2,i1,1)=y#:vl2(i3,i2,i1,2)=z#:end sub
n001:
gllinewidth(8)
dim s0 as string:for i0=0 to 3:s0=s0+chr$(32):next
'*****************************************************************************************************************************************************************
'time_read() :font(loadtex("font.03.png"))
glViewport(0, 0, WindowWidth(), WindowHeight())
glMatrixMode(GL_PROJECTION):glLoadIdentity()
gluPerspective(60, (1*WindowWidth()) / WindowHeight(), .1, 10000000)
glMatrixMode(GL_MODELVIEW):glLoadIdentity()
'
glEnable(GL_DEPTH_TEST) :glDepthFunc(GL_LEQUAL) :glEnable(GL_TEXTURE_2D)
'
textmode(texT_OVERLAID):resizetext(rx,ry)
'
do
glClear (p)
glLoadIdentity ()
glRotatef (my, 1, 0, 0) :glRotatef (mx, 0, 1, 0)
glTranslatef (-camX#, -camY#, -camZ#)
'----------------------------------------------------------------------------------------------------------
'time()
'----------------------------------------------------------------------------------------------------------
mouse()
keys(1):keys(2):keys(3):keys(4):
bug()
'----------------------------------------------------------------------------------------------------------
gldisable (GL_TEXTURE_2D)
draw_ngrid(0) :draw_ngrid(1) 'draw_newgrid
line_loop()
dVt() 'draw_vector_text
str2_lines(10,2)
pt(2): pt(3) :pt(99)
enable()
'----------------------------------------------------------------------------------------------------------
drawtext():SwapBuffers ()
loop
'*****************************************************************************************************************************************************************
sub pt(nr):glpointsize(10):glc(900):glBegin (gl_points):glVertex3f (x(nr),y(nr),z(nr)+.01 ): glEnd():end sub
sub str2_lines(i0,i1) :dim ln
glBegin (GL_lines)
for ln=0 to e0(i1) :glVertex3f( vl2(i0,ln,0,0),vl2(i0,ln,0,1),vl2(i0,ln,0,2) ):glVertex3f( vl2(i0,ln,1,0),vl2(i0,ln,1,1),vl2(i0,ln,1,2) ) :next
glEnd()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub draw_ngrid(n0) 'glc0(0)
glc(glc0(n0)) ':gllinewidth(4)
for p0=ng0(n0) to ng1(n0) step 2
p1=p0+1 :glBegin(GL_lines):glVertex3f( px(p0),py(p0),pz(p0) ):glVertex3f( px(p1),py(p1),pz(p1) ):glEnd()
next
end sub
sub new_grid(i1)
ng0(i1)=i0+1
for ix=-2000 to 2000 step 200 :for iz=-2000 to 2000 step 4000 :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
for iz=-2000 to 2000 step 200 :for ix=-2000 to 2000 step 4000: :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
ng1(i1)=i0
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub dVt() 'vec_draw3(nr,sen,lsize# ,distx#,disty# ,x,y,z) 'draw_Vector_text
Vt2(0,0,900, 1)
Vt2(1,1,990, 4)
Vt2(2,0,90,10)
Vt2(4,2,99, 4)
end sub
sub dVt_init()
Vtxt_xy(0,0, 2 , 1.2, 2.2 ,10,-1, 0)
Vtxt_xy(1,1, 3 , 2 , 3 ,15, 3, 0)
Vtxt_xy(2,0, 2 , 1.2, 2.2 ,10,-1,- 2)'......
Vtxt_xz(4,2,26 ,20 , 2.2 ,10,10, 100)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub Vt2(nr,sen,lcol,lw)
glc(lcol) 'gllinewidth(lw):
glBegin (GL_lines)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0):glVertex3fv ( vec0#(nr,i,i1) ):glVertex3fv ( vec1#(nr,i,i1) ):next
next
glend()
end sub
sub Vtxt_xy(nr,sen,lsize#,distx#,disty#,x,y,z)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0)
v1=a4(b0,i1)
ver4#=vec3(x*distx#+i*distx#,-y*disty#,z) :ver6#=ver#(v1,0)*lsize# :ver7#=ver#(v1,1)*lsize# :ver2#=ver6#+ver4# :ver3#=ver7#+ver4#
vec0#(nr,i,i1)=ver2#:vec1#(nr,i,i1)=ver3#
next
next
end sub
sub Vtxt_xz(nr,sen,lsize#,distx#,disty#,z,y,x)
for i=0 to wl(sen):b0=a3(sen,i):'which letter___wl(sen):sentence_lenght
for i1=1 to a4(b0,0)'vertex-amount a4(v2,16)
v1=a4(b0,i1)
ver4#=vec3(z,-y*disty#,x*distx#+i*distx#) :ver6#=ver1#(v1,0)*lsize# :ver7#=ver1#(v1,1)*lsize# :ver2#=ver6#+ver4# :ver3#=ver7#+ver4#
vec0#(nr,i,i1)=ver2#:vec1#(nr,i,i1)=ver3#
next
next
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub w(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub line_loop(): 'texture.00.00.18
glBindTexture(GL_TEXTURE_2D, t4(1))
glBegin (GL_LINE_LOOP)
glVertex3f( -5 , 22 ,0) :glVertex3f((1)*12+5 , 22 ,0)
glVertex3f( (1)*12+5,-1*22-5,0) :glVertex3f(-5 ,-1*22-5,0)
glend()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub keys(h)
if h=1 then
c0=ScanKeyDown (VK_DOWN)-ScanKeyDown (VK_UP):d0=ScanKeyDown (VK_left)-ScanKeyDown (VK_right)
if (c0 or c0=1) then
'a14#=cosd(my)/1.01: a15#=int(a14#)*2+1:a16=a15#
camX# = camX# + c0*sp#(sp1)*sind (mx) *cosd(my)'*a16
camY# = camY# - c0*sp#(sp1)*sind (my)
camZ# = camZ# - c0*sp#(sp1)*cosd (mx) *cosd(my)
'x4=t(camx#,a01,a02):y4=t(camy#,a01,a02):z4=t(camz#,a01,a02)
xyz()
endif
endif
if h=2 then
mk2(112,-1):mk2(113,1):
mk2(20,0) 'caps_lock
mk2(123,0)'F12
mk2(122,0)'F11
mk2(114,-2):mk2(115,2) 'F3,F4
endif
if h=3 then
in = InScanKey ():if in<>0 then g(0)=in:endif :if ScanKeyDown (g(0)) =0 then g(0)=0:endif 'g(0)=inscan 'skd
in$= inkey$():if in$<>"" then g(1)=asc(in$):endif :if keydown(chr$(c(g(1))))=0 then g(1)=0:endif 'g(1)=inkey ,keydown
endif
if h=4 then
if g(1)=113 then camY#=camY#+sp#(sp1):xyz():endif 'qa
if g(1)= 97 then camY#=camY#-sp#(sp1):xyz():endif 'qa
'
if g(1)=119 then camZ#=camZ#+sp#(sp1):xyz():endif 'ws
if g(1)=115 then camZ#=camZ#-sp#(sp1):xyz():endif 'ws
'
if g(1)=120 then camX#=camX#+sp#(sp1):xyz():endif 'xz
if g(1)=122 then camX#=camX#-sp#(sp1):xyz():endif 'xz
endif
end sub
sub xyz():cx=int(camX#*100) :cy=int(camy#*100) :cz=int(camz#*100) :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mouse(): 'mx=INT(mouse_x()*721-360):
mx=(mouse_x()-.5)*720 :my=(mouse_y()-.5)*360
if my> 90 then my= 90:endif :if my<-90 then my=-90:endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mk2(k0,k1):dim a,b
a =abs(k1):
if f3b(k0)=0 and ScanKeyDown(k0) then f3(k0)=not(f3(k0)):f3b(k0)=true:if k1<>0 then b=sgn(k1):f3c(a)=f3c(a)+b:c_mk(a):endif:endif
if f3b(k0) and ScanKeyDown(k0)=0 then f3b(k0)=0 :endif 'check_mk2 k0
end sub
'
sub c_mk(a1)
if a1=1 then
if f3c(1)= 6 then f3c(1)=0:endif
if f3c(1)=-1 then f3c(1)=5:endif
sp1=f3c(1)
endif
if a1=2 then
if f3c(a1)= 3 then f3c(a1)=0:endif
if f3c(a1)=-1 then f3c(a1)=2:endif
wln=f3c(a1)
endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
sub time_read()
file = openfileread(d0$+"/time.txt"):file_error()
b0=endoffile(file):
if not(b0) then
d9$ =ReadLine(file)
d10$=ReadLine(file)
a1$ =ReadLine(file)'"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
endif
d9=val(d9$):d10=val(d10$)
CloseFile (file)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub bug()
'printr a11(11)
locate 0,38
w(099) :printr "g(0):";g(0);s0
w(909) :printr "g(1):";g(1);s0
printr "wln:";wln;s0
'
locate 0,44
w(567):printr "sp(";sp1;"):" ;sp#(sp1);s0
w(963):printr "----------------------------------------------------------------------------"
w(900):print "cam#:" ;cx ;"/";cy ;"/";cz ;" * Time:" ;d13;".":if d15<10 then print"0":endif:print d15;s0
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub time(): d3=PerformanceCounter():d4=d3/1000:'time...d13,d14,d15
d11=d9-d10+d4:d12=d11/60:d13=d12/60:d14=d13*60:d15=d12-d14 :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m1:data 00001.jpg,00002.jpg,00003.jpg,00004.jpg,00005.jpg,00006.jpg
m5:data 12'sp#:0-11
m6:data .001,.01,.1,1,10,25,50,100,200,1000,10000,20000,100000
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m3:' ver#( 0,0)_____ver#( 0,1)
data 0,10,0 , 0,20,0 '00
data 0, 0,0 , 0,10,0
data 10,10,0 , 10,20,0
data 10, 0,0 , 10,10,0
data 0,20,0 , 10,20,0
data 0, 0,0 , 10, 0,0
data 0,10,0 , 10,10,0
data 10,10,0 , 5, 5,0'07
data 5, 5,0 , 5, 1,0
data 5, 0,0 , 5,20,0
data 0,10,0 , 5,20,0'10
data 10,10,0 , 5,20,0
data 0,10,0 , 5, 0,0
data 10,10,0 , 5, 0,0
data 4.5,10,0 , 5.5,10,0
data 4.5, 0,0 , 5.5, 0,0'15
data 10,20,0 , 10,12,0'16...B
data 0,10,0 , 08,10,0'17...B
data 10,00,0 , 10,08,0'18...B
data 08,10,0 , 10,08,0'19...B
data 08,10,0 , 10,12,0'20...B
data 10,10,0 , 04,10,0'21...G
data 05,20,0 , 10,20,0'22...J
data 00,10,0 , 10,20,0'23...K
data 00,10,0 , 10,00,0'24...K
data 00,20,0 , 05,10,0'25...M
data 10,20,0 , 05,10,0'26...M
data 00,20,0 , 10,00,0'27...N
data 08,02,0 , 11,-1,0'28...Q
data 00,10,0 , 10,00,0'29...R
data 00,20,0 , 05,00,0'30...V
data 10,20,0 , 05,00,0'31...V
data 00,00,0 , 05,09,0'32...W
data 10,00,0 , 05,09,0'33...W
data 00,00,0 , 10,20,0'34...X
data 00,20,0 , 05,12,0'35...y
data 10,20,0 , 05,12,0'36...y
data 05,00,0 , 05,12,0'37...y
data 00,20,0 , 08,20,0'38...D
data 00,00,0 , 08,00,0'39...D
data 10,02,0 , 10,18,0'40...D
data 10,02,0 , 08,00,0'41...D
data 08,20,0 , 10,18,0'42...D
data 4.8,0,0 , 5.2,0,0'43 .
data 5,1,0 , 4.5,-3,0'44 ,
data 0,0,0 , 0,0,0 '45 spc
data 4.5,12,0 , 5.5,12,0'46 :
data 4.5,08,0 , 5.5,08,0'47 :
data 1,00,0 , 9,19,0'48 /
data 1,10,0 , 9,10,0'49 -
data 5,15,0 , 5,05,0'50 +
data 0, 0,0 , 10,00,0'51 _
data 8,0,0 , 5,03,0'52 (
data 5,3,0 , 5,17,0'53 (
data 5,17,0 , 8,20,0'54 (
'
data 2, 0,0 , 5,03,0'55 )
data 5, 3,0 , 5,17,0'56 )
data 5,17,0 , 2,20,0'57 )
'
data 0, 8,0 , 10, 8,0'58 =
data 0,12,0 , 10,12,0'59 =
data 2,10,0 , 8,10,0'60 Z
'
data 4.5,0,0 , 5.5,0,0 '61 ?
data 5.5,0,0 , 5.5,1,0 '62 ?
data 5.5,1,0 , 4.5,1,0 '63 ?
data 4.5,1,0 , 4.5,0,0 '64 ?
'
data 5,3,0 , 5,10,0 '65 ?
data 5,10,0 , 10,10,0 '66 ?
data 10,10,0 , 10,20,0 '67 ?
data 10,20,0 , 4,20,0 '68 ?
'
data 0,0,0 , 10,0,0 '69 d
data 0,0,0 , 0,10,0 '70 d
data 0,10,0 , 10,10,0 '71 d
data 10,0,0 , 10,20,0 '72 d
'
data 2,5,0 , 4,15,0 '73 #
data 6,5,0 , 8,15,0 '74 #
'
data 0, 0,0 , 0,20,0 '75 B
data 0,20,0 , 8,20,0 '76 B
data 0, 0,0 , 8, 0,0 '77 B
data 8,20,0 , 10,18,0 '78 B
data 8,0,0 , 10, 2,0 '79 B
data 10,12,0 , 10,18,0 '80 B
data 10, 2,0 , 10, 8,0 '81 B
'
data 9,16,0 , 11,20,0 '82 '
data 5, 0,0 , 5, 8,0 '83 i
data 5,10,0 , 5,11,0 '84 i
''@
data 8, 3,0 , 4,17,0 '85 @_start
data 4,17,0 , 2,16,0 '86
data 2,16,0 , 2, 5,0 '87
data 2, 5,0 , 4, 3,0 '88
data 4, 3,0 , 8,17,0 '89
data 8, 3,0 ,10, 5,0 '90
data 10, 5,0 ,10,18,0 '91
data 10,18,0 , 8,20,0 '92
data 8,20,0 , 2,20,0 '93
data 2,20,0 , 0,16,0 '94
data 0,16,0 , 0, 4,0 '95
data 0, 4,0 , 2, 0,0 '96
data 2, 0,0 , 8, 0,0 '97
data 8, 0,0 ,10, 2,0 '98 @_end
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m21:
data 7,0,1,2,3,4,5,34 '0
data 1,9 '1
data 5,1,2,4,5,6 '2
data 5,2,3,4,5,6 '3
data 4,0,2,3,6 '4
data 5,0,3,4,5,6 '5
data 6,0,1,3,4,5,6 '6
data 3,2,3,4 '7
data 7,0,1,2,3,4,5,6'8
data 6,0,2,3,4,5,6 '9
data 6,0,1,2,3,4,6 'A...10
data 9,0,1,4,5,16,17,18,19,20 'B...11
data 4,0,1,4,5 'C...12
data 7,0,1,38,39,40,41,42 'D...13
data 5,0,1,4,5,6 'E...14
data 4,0,1,4,6 'F...15
data 6,0,1,3,4,5,21 'G...16
data 5,0,1,2,3,6 'H...17
data 1,9 'I...18
data 4,2,3,5,22 'J...19
data 4,0,1,23,24 'K...20
data 3,0,1,5 'L...21
data 6,0,1,2,3,25,26 'M...22
data 5,0,1,2,3,27 'N...23
data 6,0,1,2,3,4,5 'O...24
data 5,0,1,2,4,6 'P...25
data 7,0,1,2,3,4,5,28 'Q...26
data 6,0,1,2,4,6,29 'R...27
data 5,0,3,4,5,6 'S...28
data 2,4,9 'T...29
data 5,0,1,2,3,5 'U...30
data 2,30,31 'V...31
data 6,0,1,2,3,32,33 'W...32
data 2,27,34 'X...33
data 3,35,36,37 'Y...34
data 3,4,5,34 'Z...35
data 1,43 '. 36
data 1,44 ', 37
data 1,45 'spc.38
data 2,46,47 ': 39
data 1,48 '/ 40
data 1,49 '- 41
data 2,49,50 '+ 42
data 1,51 '_ 43
data 3,52,53,54 '( 44
data 3,55,56,57 ') 45
data 2,58,59 '= 46
data 8,61,62,63,64,65,66,67,68 '? 47
data 4,69,70,71,72 'd 48
data 4,73,74,58,59 '# 49
data 1,82 '' 50
data 2,83,84 'i 51
'
data 14,85,86,87,88,89,90,91,92,93,94,95,96,97,98 '@ 52
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m18:
data 126,96,33,49,64,50,35,51,36,52,37,53,94,54,38,55,42,56,40,57,41,48,95,45,43,61,123,91,125,93,124,92,58,59,34,39,60,44,62,46,63,47,97,65,98,66,99,67,100
data 68,101,69,102,70,103,71,104,72,105,73,106,74,107,75,108,76,109,77,110,78,111,79,112,80,113,81,114,82,115,83,116,84,117,85,118,86,119,87,120,88,121,89,122,90,-1,-1
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'add a new vector_sentence (line 138:m4)
'change s_amount (line8)
'line285:sub dVt():add a Vtxt_xy() or a Vtxt_xz()..........line295:add a Vt2()
'*****************************************************************************************************************
13b
'
'
'begin_hilbert different 2023,october16 *** PCN chuck (hedgehog) summer ***
declare sub keys(h)
'-------------------------------------------------------------------------------------------------------------------------
dim a0,a2,a1,a14#,a15#,a$,a1$
dim b0,b1
dim c(255),c4(999,2),cr(20),c0,c1,cx,cy,cz,camX#,camY#,camZ#,c$
dim d0,d3,d4,d9,d10,d11,d12,d13,d14,d15,d0$="texture and data sheet",d9$,d10$
dim file,f02,f10
dim g(1)
dim h1
dim in,in$,i,i0,i1,i2,i3,i4,ix,iy,iz
dim mx,my
dim p = GL_DEPTH_BUFFER_BIT or GL_COLOR_BUFFER_BIT
dim r1,rx,ry',rc(v3)
dim sp1,sp3
dim t0(5),t4(999)
dim wf,w1
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2022,10.22 'diverse declarations
declare sub mouse():declare sub bug():declare sub line_loop()::declare sub file_error()
declare sub time_read():declare sub time():declare sub xyz():
'----------------------------------------------------------------------------------------------------------------------------------------------------
Function r(min,max):Return rnd()% (max - min + 1) + min:End Function 'diverse functions
function r0(a):dim x2:a=a+1:x2=(rnd()%a):return x2:end function ' 0-10
Function t(i0#,i1,i2):dim a0:a0=(i0#+i1)/i2:Return a0:End Function
function mb(a):dim mbt:mbt=mouse_button(a):return mbt:end function
function skd(i0):i1=ScanKeyDown(i0):return i1:end function
'----------------------------------------------------------------------------------------------------------------------------------------------------
wf=WindowFullscreen():w1=1200:h1=800:if wf then:w1=1920:h1=1080:endif 'window
SetWindowWidth(w1):SetWindowHeight(h1):SetWindowBorder(true):UpdateWindow()
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub w(i) 'text
for a0=0 to 9:cr(a0)=a0*28:next
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim sp0:reset m5:read sp0:dim sp#(sp0) 'speed
reset m6:for a0=0 to sp0:read sp#(a0):next
'----------------------------------------------------------------------------------------------------------------------------------------------------
''declare sub dVt():declare sub dVt_init():declare sub Vt2(nr,sen,lcol,lw) 'draw_vector_text
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2022,11.4,11.5 'sponge
'----------------------------------------------------------------------------------------------------------------------------------------------------
'2023,august18 'draw_grid
'declare sub glTC2(n0)
dim si=-1,si1
dim i00,tc(3,1),i01,i03,drs2(9999) 'v00(9999,3,2) as single,
tc1:data 0,0 ,0,1 ,1,1 ,1,0
reset tc1:for i0=0 to 3:read tc(i0,0),tc(i0,1):next
c1=-1
declare sub draw_ngrid(n0):declare sub new_grid(i1)
dim ng0(255),ng1(255),p1,px(6399),py(6399),pz(6399),p0
gllinewidth(5)
i0=-1 :iy= 1500:new_grid(0) :iy=-1500:new_grid(1) 'i0 only once -1
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim cb1 as single,cr0(10) as single,gc(999,2) as single 'shared as single '1000 gl_colors
dim a1b ,i1b,i2b,i3b,i4b,glc0(9) 'shared as uinteger
for a1b=0 to 9:cb1=a1b:cr0(a1b)=cb1/9:next'1000 gl_colors
for i0=0 to 999:
i1b=int(i0/100):i2b=i1b*100:i3b=int((i0-i2b)/10):i4b=i0-i2b-i3b*10:
gc(i0,0)=cr0(i1b):gc(i0,1)=cr0(i3b):gc(i0,2)=cr0(i4b):'? i0;":";gc(i0,0);"/";gc(i0,1);"/";gc(i0,2);"/" ''do:loop until inkey="n"
next'do:loop
sub glC(a as integer):glColor3f(gc(a,0),gc(a,1),gc(a,2)):end sub
glc0(0)=900:glc0(1)=90
sub enable():glenable (GL_TEXTURE_2D):glEnable ( GL_BLEND):glColor4f(1, 1, 1, 1):end sub
'----------------------------------------------------------------------------------------------------------------------------------------------------
declare sub mk2(k0,k1):declare sub c_mk(a1) 'keys
dim f3c(99),f3(255),f3b(255)
for i=0 to 255:c(i)=i:next:reset m18:i=0:do:read a1,b1:if a1<>-1 then c(a1)=b1:i=i+1:endif:loop until a1=-1 ':hmk=i-1 'keys
'----------------------------------------------------------------------------------------------------------------------------------------------------
sp1=2:f3c(1)=sp1
rx=80:ry=50 :camX# = 0:camZ# = 6
xyz() 'dVt_init()
'----------------------------------------------------------------------------------------------------------------------------------------------------
dim vn(999,3,2) as single,vm(3,2),ix1,vl0(2,1,2),vl1(3,2,1,2) 'new hilbert
reset n01:for i0=0 to 3:read vn(0,i0,0),vn(0,i0,1),vn(0,i0,2) :next
n01:data -1,-1,0 ,-1,1,0 ,1,1,0 ,1,-1,0
'
sub vm_(ix,x,y,z):vm(ix,0)=x :vm(ix,1)=y :vm(ix,2)=z :end sub
'
for ix=0 to 1:vm_(ix,ix*3,0,0):next
ix1=1:for ix=2 to 3:vm_(ix,ix1*3,-3,0):ix1=ix1-1:next
'
'
declare sub lines(ln)
'
n4:
declare sub mbl_wait() :declare sub lines3(sn,ln) ':declare sub lines2(sn,ln)
declare sub lines4(i0,i1) 'declare sub lines1(sn):
glpointsize(3)
dim ln,mw,mw1,mw2
'
dim v0(999,2) as single,vL2(99,2) as single,lanr,x0#,y0b as single,xla as single,xla1
:v0(0)=vec3(0,0,0)
declare sub lambda_(lambda as single,n0,v0()as single,v1() as single)
function y2pv(x0#,v1() as single,v2() as single) as single:dim y#:y#=(((v2(1)-v1(1))*(x0#-v1(0)))/(v2(0)-v1(0)))+v1(1):return y#:end function
declare sub point(co,size,v0() as single)
'2023,october14
dim x2#,y2#,z2#,x3#,y3#,z3#,x4#,y4#,z4#,v00(2) as single,v01(2) as single,f01
declare sub rotate_z(alpha6#,x0#,y0#,z0#):declare sub rotate_x(alpha4#,x0#,y0#,z0#)
declare sub draw_lambda_lines(ib):declare sub draw_pts(ia)
declare sub lines2(v0() as single,v1() as single)
'
sub rotate_vn_Z(n0,deg)
for i0=0 to 3
rotate_z( deg,vn(n0,i0,0),vn(n0,i0,1),vn(n0,i0,2) )
vn(n0,i0,0)=x3# :vn(n0,i0,1)=y3# :vn(n0,i0,2)=z3#
next
end sub
sub rotate_vn_X(n0,deg)
for i0=0 to 3
rotate_x( deg,vn(n0,i0,0),vn(n0,i0,1),vn(n0,i0,2) )
vn(n0,i0,0)=x4# :vn(n0,i0,1)=y4# :vn(n0,i0,2)=z4#
next
end sub
'
sub vn_(nr,v0() as single):
vn(nr,0)=v0+vec3(-1,-1,0): vn(nr,1)=v0+vec3(-1, 1,0) :vn(nr,2)=v0+vec3( 1, 1,0) :vn(nr,3)=v0+vec3( 1,-1,0)
end sub
sub vn1(nr,v0() as single):
vn(nr,0)=vn(nr,0)+v0 :vn(nr,1)=vn(nr,1)+v0 :vn(nr,2)=vn(nr,2)+v0 :vn(nr,3)=vn(nr,3)+v0
end sub
'
dim spc as single:spc=2
rotate_vn_x(0,180):rotate_vn_Z(0, 90):v0(1)=vec3(-spc,-spc,0):vn1(0,v0(1)) 'vn(0,0-3)=vn(0,0-3)+v0(1)
vn_(1,v0(0)) : :v0(1)=vec3(-spc, spc,0):vn1(1,v0(1))
vn_(2,v0(0)) : :v0(1)=vec3( spc, spc,0):vn1(2,v0(1))
vn_(3,v0(0)) :
rotate_vn_x(3,180):rotate_vn_Z(3, -90):v0(1)=vec3( spc,-spc,0):vn1(3,v0(1))
'
dim xl#=.002,xl1#=xl#
'*****************************************************************************************************************************************************************
'time_read() :'font(loadtex(d0$+"/font.png"))
glViewport(0, 0, WindowWidth(), WindowHeight())
glMatrixMode(GL_PROJECTION):glLoadIdentity()
gluPerspective(60, (1*WindowWidth()) / WindowHeight(), .1, 10000000)
glMatrixMode(GL_MODELVIEW):glLoadIdentity()
'
glEnable(GL_DEPTH_TEST) :glDepthFunc(GL_LEQUAL) :glEnable(GL_TEXTURE_2D)
'
textmode(texT_OVERLAID):resizetext(rx,ry)
'
do
glClear (p)
glLoadIdentity ()
'
glRotatef (my, 1, 0, 0) :glRotatef (mx, 0, 1, 0)
'
glTranslatef (-camX#, -camY#, -camZ#)
'----------------------------------------------------------------------------------------------------------
time()
'----------------------------------------------------------------------------------------------------------
mouse()
keys(1):keys(2):keys(3):keys(4):
bug()
'----------------------------------------------------------------------------------------------------------
gldisable (GL_TEXTURE_2D)
draw_ngrid(0) :draw_ngrid(1) 'draw_newgrid
line_loop()
'
lines3(0,mw2)
point(90,10,v0(0))
'
xla=xla+xl1# :if xla>2 then xl1#=-xl#:endif :if xla<0 then xl1#=xl#:endif
draw_pts(0)
glc(99)
draw_lambda_lines(0)
draw_lambda_lines(1)
draw_lambda_lines(2)
draw_lambda_lines(3)
enable()
'----------------------------------------------------------------------------------------------------------
mbl_wait()
if mw1 then mw2=mw2+1:mw1=0:if mw2=3 then mw2=0:endif:endif
'----------------------------------------------------------------------------------------------------------
drawtext():SwapBuffers ()
loop
'*****************************************************************************************************************************************************************
sub draw_lambda_lines(ib)
for i0=0 to 3:lambda_(xla,i0,v0(0),vn(ib,i0)):next
for i0=0 to 2:lines2( vl2(i0),vl2(i0+1) ):next
'
if ib>0 then v01=vl2(0) :lines2(v00,v01):endif 'point(900,10,v01)
if ib<3 then v00=vl2(3) :endif 'point( 90,10,v00)
end sub
sub lambda_(lambda as single,n0,v0()as single,v1() as single)
vL2(n0,1)=v0(1)+((v1(1)-v0(1))*lambda) :vL2(n0,0)=v0(0)+((v1(0)-v0(0))*lambda)
end sub
sub lines2(v0() as single,v1() as single):glBegin (GL_lines):glVertex3fv( v0 ):glVertex3fv( v1 ) :glEnd():end sub
'--------------------------------------------------------------------------------------------------------------------------
sub draw_pts(ia)
glpointsize(10)
glc(990)
glBegin (gl_points)
for i0=0 to 3:glVertex3f(vn(ia,i0,0),vn(ia,i0,1),vn(ia,i0,2)):next
glEnd()
end sub
sub point(co,size,v0() as single):glc(co):glPointSize(size):glbegin(gl_points):glVertex3f(v0(0),v0(1),0):glend():end sub
'
sub mbl_wait() 'sub mb(b),mw,mw1
if mw=0 then if mb(0) then mw=true:mw1=true:endif :endif
if mw then if mb(0)=0 then mw=0 :mw1=0 :endif :endif
end sub
'
sub lines4(i0,i1):glBegin (gl_points):glVertex3f( 0,0,0 ):glEnd():end sub 'order 0:1 pt
sub lines3(sn,ln)
glBegin (gl_lines)
for i0=0 to ln:glVertex3f( vn(0,i0,0),vn(0,i0,1),vn(0,i0,2) ):glVertex3f( vn(0,i0+1,0),vn(0,i0+1,1),vn(0,i0+1,2) ) :next
glEnd()
end sub
'
sub lines(ln) 'p
glBegin (GL_lines)
glVertex3f( vl0(ln,0,0),vl0(ln,0,1),vl0(ln,0,2) ):glVertex3f( vl0(ln,1,0),vl0(ln,1,1),vl0(ln,1,2) )
glEnd()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub draw_ngrid(n0) 'glc0(0)
glc(glc0(n0))
for p0=ng0(n0) to ng1(n0) step 2
p1=p0+1 :glBegin(GL_lines):glVertex3f( px(p0),py(p0),pz(p0) ):glVertex3f( px(p1),py(p1),pz(p1) ):glEnd()
next
end sub
sub new_grid(i1)
ng0(i1)=i0+1
for ix=-2000 to 2000 step 200 :for iz=-2000 to 2000 step 4000 :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
for iz=-2000 to 2000 step 200 :for ix=-2000 to 2000 step 4000: :i0=i0+1 :px(i0)=ix:py(i0)=iy:pz(i0)=iz:next:next
ng1(i1)=i0
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'dVt_init() : dVt_init()
'sub Vt2(nr,sen,lcol,lw) sub Vtxt_xy(nr,sen,lsize#,distx#,disty#,x,y,z) sub Vtxt_xz(nr,sen,lsize#,distx#,disty#,z,y,x)
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub w(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub line_loop(): 'texture.00.00.18
glBindTexture(GL_TEXTURE_2D, t4(1))
glBegin (GL_LINE_LOOP)
glVertex3f( -5 , 22 ,0) :glVertex3f((1)*12+5 , 22 ,0)
glVertex3f( (1)*12+5,-1*22-5,0) :glVertex3f(-5 ,-1*22-5,0)
glend()
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub keys(h)
if h=1 then
c0=ScanKeyDown (VK_DOWN)-ScanKeyDown (VK_UP):d0=ScanKeyDown (VK_left)-ScanKeyDown (VK_right)
if (c0 or c0=1) then
'a14#=cosd(my)/1.01: a15#=int(a14#)*2+1:a16=a15#
camX# = camX# + c0*sp#(sp1)*sind (mx) *cosd(my)'*a16
camY# = camY# - c0*sp#(sp1)*sind (my)
camZ# = camZ# - c0*sp#(sp1)*cosd (mx) *cosd(my)
xyz()
endif
endif
if h=2 then
mk2(112,-1):mk2(113,1):
mk2(20,0) 'caps_lock
mk2(123,0)'F12
mk2(122,0)'F11
endif
if h=3 then
in = InScanKey ():if in<>0 then g(0)=in:endif :if ScanKeyDown (g(0)) =0 then g(0)=0:endif 'g(0)=inscan 'skd
in$= inkey$():if in$<>"" then g(1)=asc(in$):endif :if keydown(chr$(c(g(1))))=0 then g(1)=0:endif 'g(1)=inkey ,keydown
endif
if h=4 then
if g(1)=113 then camY#=camY#+sp#(sp1):xyz():endif 'qa
if g(1)= 97 then camY#=camY#-sp#(sp1):xyz():endif 'qa
'
if g(1)=119 then camZ#=camZ#+sp#(sp1):xyz():endif 'ws
if g(1)=115 then camZ#=camZ#-sp#(sp1):xyz():endif 'ws
'
if g(1)=120 then camX#=camX#+sp#(sp1):xyz():endif 'xz
if g(1)=122 then camX#=camX#-sp#(sp1):xyz():endif 'xz
endif
end sub
sub xyz():cx=int(camX#*100) :cy=int(camy#*100) :cz=int(camz#*100) :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mouse(): 'mx=INT(mouse_x()*721-360):
mx=(mouse_x()-.5)*720 :my=(mouse_y()-.5)*360
if my> 90 then my= 90:endif :if my<-90 then my=-90:endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub mk2(k0,k1):dim a,b
a =abs(k1):
if f3b(k0)=0 and ScanKeyDown(k0) then f3(k0)=not(f3(k0)):f3b(k0)=true:if k1<>0 then b=sgn(k1):f3c(a)=f3c(a)+b:c_mk(a):endif:endif
if f3b(k0) and ScanKeyDown(k0)=0 then f3b(k0)=0 :endif 'check_mk2 k0
end sub
'
sub c_mk(a1)
if a1=1 then
if f3c(1)= 6 then f3c(1)=0:endif
if f3c(1)=-1 then f3c(1)=5:endif
sp1=f3c(1)
endif
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
sub time_read()
file = openfileread(d0$+"/time.txt"):file_error()
b0=endoffile(file):
if not(b0) then
d9$ =ReadLine(file)
d10$=ReadLine(file)
a1$ =ReadLine(file)'"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
endif
d9=val(d9$):d10=val(d10$)
CloseFile (file)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub bug()
'printr a11(11)
locate 0,35
w(099) :printr "g(0):";g(0);" "
w(909) :printr "g(1):";g(1);" "
printr "mw2:";mw2;" "
'
locate 0,44:
w(567):printr "sp(";sp1;"):" ;sp#(sp1);" "
w(963):printr "----------------------------------------------------------------------------"
w(900):print "cam#:" ;cx ;"/";cy ;"/";cz ;" * Time:" ;d13;".":if d15<10 then print"0":endif:print d15;" "
'
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub time(): d3=PerformanceCounter():d4=d3/1000:'time...d13,d14,d15
d11=d9-d10+d4:d12=d11/60:d13=d12/60:d14=d13*60:d15=d12-d14 :end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m1:data 00001.jpg,00002.jpg,00003.jpg,00004.jpg,00005.jpg,00006.jpg
m5:data 12'sp#:0-11
m6:data .001,.01,.1,1,10,25,50,100,200,1000,10000,20000,100000
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'vector_text_data
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m18:
data 126,96,33,49,64,50,35,51,36,52,37,53,94,54,38,55,42,56,40,57,41,48,95,45,43,61,123,91,125,93,124,92,58,59,34,39,60,44,62,46,63,47,97,65,98,66,99,67,100
data 68,101,69,102,70,103,71,104,72,105,73,106,74,107,75,108,76,109,77,110,78,111,79,112,80,113,81,114,82,115,83,116,84,117,85,118,86,119,87,120,88,121,89,122,90,-1,-1
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
m8:' pt0 ,pt1 ,pt2 ,pt3 :side_data
data 1, 1,-1 ,-1, 1,-1 ,-1, 1, 1 , 1, 1, 1'0...12 data:0-11
data 1,-1, 1 ,-1,-1, 1 ,-1,-1,-1 , 1,-1,-1
data 1, 1, 1 ,-1, 1, 1 ,-1,-1, 1 , 1,-1, 1
data 1,-1,-1 ,-1,-1,-1 ,-1, 1,-1 , 1, 1,-1
data -1, 1, 1 ,-1, 1,-1 ,-1,-1,-1 ,-1,-1, 1
data 1, 1,-1 , 1, 1, 1 , 1,-1, 1 , 1,-1,-1'5
'
m9:
data 1,1,1,1,0,1,1,1,1'cube_top
data 1,0,1,0,0,0,1,0,1'_middle
data 1,1,1,1,0,1,1,1,1'_bottom
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
'sponger_data
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
sub rotate_y(alpha5#,x0#,y0#,z0#):'xz'rotate y-axis:
dim alpha2#,hy3#,beta1#
if z0#=0 then z0#=.0001:endif
alpha2#=atand(x0#/z0#):hy3#=x0#/sind(alpha2#)
beta1# = alpha2#+alpha5#
z2#=cosd(beta1#) *(hy3#) :x2#=sind(beta1#) *(hy3#) :y2#=y0# ':txt3(x2#,y2#,z2#)
end sub
sub rotate_z(alpha6#,x0#,y0#,z0#):'xy'rotate z-axis
dim alpha3#,hy2#,beta#
if z0#=0 then z0#=.0001:endif
alpha3#=atand(y0#/x0#):hy2#=y0#/sind(alpha3#)
beta# = alpha3#+alpha6#
x3#=cosd(beta#) *(hy2#) :y3#=sind(beta#) *(hy2#) :z3#=z0# ':txt4(x3#,y3#,z3#)
end sub
sub rotate_x(alpha4#,x0#,y0#,z0#):'zy'rotate x-axis
dim alpha1#,hy1#,beta#
if z0#=0 then z0#=.0001:endif
alpha1#=atand(y0#/z0#):hy1#=y0#/sind(alpha1#)
beta# = alpha1#+alpha4#
x4#=x0# :y4#=sind(beta#) *(hy1#) :z4#=cosd(beta#) *(hy1#)
end sub
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
13c
.new hilbert.n.07.83.zip
www.mediafire.com/file/1b4uyg5fo9fndxu/.new_hilbert.n.07.83.zip/file
'----------------------------------------------------------------------------------------------------------------------------------------------------------------
'
'