Liberty BASIC Community Forum
« Search Results »

Welcome Guest. Please Login or Register.
Sep 2nd, 2015, 9:22pm

Rules|Home|Help|Search|Recent Posts|Notification

--Liberty BASIC Resources--
Yahoo Code Repository (source must be included)
Liberty BASIC Community WikiSpace
Liberty Labs
Bay Six Software Forum
Liberty BASIC Home Page

Official Liberty BASIC Support
Liberty BASIC Programmer's Encyclopedia
Liberty BASIC 5 Handbook
Liberty BASIC on Rosetta Code

Search Results

Total results: 10

 1   General Board / Re: Searchable LB Helpfiles  on: Today at 9:07pm
Started by Alyce Watson | Post by michael gallup
I have used the help files for reference at times considering I always have to carry notes to help me code effectively. I focused on programming to help my memory.
It is a hobby also. Its good exercise for the mind. I have also used the search engine in this forum after you mentioned that you used it when helping others.
Practice makes perfect.
Your concerns are important. We should try to remind people to use the search engines.

  Reply Quote Notify of replies

 2   General Board / Re: Searchable LB Helpfiles  on: Today at 11:08am
Started by Alyce Watson | Post by Alyce Watson
UPDATED FOR Liberty BASIC 4.5.0, September, 2015
CHM help is compiled HTML help. It is searchable. The LB help files can be compiled to a single CHM file. Since users cannot distribute such a file, each user must compile it himself. I have created a tool that allows you to compile the LB HTML help. It is in tokenized form and will run from LB4.5.0. The zip also contains a shortcut.dll. When you run this program you may select options to create shortcuts, keep or delete temporary files, and view the log. You must have Microsoft's HTML Help Workshop on your system. It already exists on my Windows 8.1 computer, so I did not need to download it. A download link is provided on the webpage should you need it.

Liberty BASIC Help CHM Creator

  Reply Quote Notify of replies

 3   Novice / Re: Voronoi diagram  on: Yesterday at 09:50am
Started by blessed2b3rd | Post by blessed2b3rd
Really good work here Teno, Thanks!

I have a couple of tweaks to make and somehow figure out how to cut the speed down as I have several thousand nodes to scan through. Thanks again
  Reply Quote Notify of replies

 4   General Board / Re: In the Spotlight - September, 2015  on: Aug 31st, 2015, 9:31pm
Started by Alyce Watson | Post by CarlGundel
Very cool. Thanks John and Alyce!

  Reply Quote Notify of replies

 5   Novice / Re: Voronoi diagram  on: Aug 31st, 2015, 3:35pm
Started by blessed2b3rd | Post by tenochtitlanuk
Current version is on my site as above- as a zip file. Improved colouring among other things, and saves graphic for you.
It offers a file-selector. Just hit <Return> and it will generate a new random file- or select your own data file.
You can alter the max. 'radius of influence' within the coding. Run the same data file and see the difference.
I've incorporated no real speed-ups. Always glad of a coffee break!
Now I'm wondering to do a proper GUI with options to change the radius; max and min values and number of data rows.... and can I get it to draw the boundaries in say blackhuh?
If you get further, keep us up-to-date. Fun!
  Reply Quote Notify of replies

 6   General Board / In the Spotlight - September, 2015  on: Aug 31st, 2015, 1:20pm
Started by Alyce Watson | Post by Alyce Watson
Those who enjoy graphics, math or physics will want to have a look at the Voronoi Diagram discussions.

Original Voronoi Diagram Discussion.

(Thanks, John Fisher!)
User Image

A Voronoi diagram is a diagram consisting of a number of sites. Each Voronoi site s also has a Voronoi cell consisting of all points closest to s.
The task is to demonstrate how to generate and display a Voroni diagram.

New Voronoi Diagram Thread


Don't forget... Liberty BASIC v 4.5.0 has been officially released! If you have a registered copy of Liberty BASIC 4.x, you qualify for a free upgrade!

Liberty BASIC 4.5.0 Released!
  Reply Quote Notify of replies

 7   Novice / Re: Voronoi diagram  on: Aug 31st, 2015, 12:03pm
Started by blessed2b3rd | Post by blessed2b3rd
Thanks Teno,

The radial search pattern around each node is an interesting combat for the outer members. This would solve the overestimation of areas. Can you post the adaption of my code? I'd love to see how you incorporated it.

Sorry for the late reply, sun+weekend+winternearing=max_time_away_from_laptop_while_it_lasts

Much appreciated

  Reply Quote Notify of replies

 8   Game and Graphic Programming / BmpToCode and Reader prog Generator merged  on: Aug 30th, 2015, 9:45pm
Started by michael gallup | Post by michael gallup
The next advancement to BmpToCode is here !
Now you don't have to copy/paste anything ! The entire image and program are now created in Expfina.bas !!!!
You now can open the generated file and RUN !!
1) Name this program BMPTOCODE.bas
2) In windows paint make a blank image that is 200x200 pixels (it doesn't have to be that big but make it a square that has the same width and height)
3) Save the blank image in 255 color bmp image format
4) You can now make a image using all default colors except bottom right one
5) Save your creation
6) Run BMPTOCODE.bas and select your picture and wait for 30 seconds
7) Open EXPfina.bas
8) RUN IT !!
9) If there is any problems let me know plz

A few essential sections of this program came from the BMPMASK program Created By Alyce and Carl Grundel. Located in your HELP glossary.
This Utility is for Liberty Basic Users to freely use .
The next version of this program will automatically draw the mask section without using duplicated code (coming soon)
  menu #1, "&File", "&Open BMP File",[openBMP],|,"E&xit",[quit]
 open "BMP IMAGE TO R, G, B   DATA FILE" for graphics_fs_nsb as #1
  print #1, "trapclose [quit]"
  print #1, "down;place 100 100"
  print #1, "|Open a bmp image."
  print #1, "|This program will take the BMP image data"
  print #1, "|and convert it into compressed R,G,B data statements"
  print #1, "|Save file name is EXPDATA.bas "
  input aVar$
  if hBitmap<>0 then
    unloadbmp ("bm")
    print #1, "cls"
  end if
  filedialog "Open Bmp Image","*.bmp",bitmap$
  if bitmap$="" then
    notice "No bitmap chosen!"
    goto [loop]
  end if
  print #1, "cls"
  loadbmp "bm" , bitmap$
  print #1, "down;drawbmp bm 0 0"
  print #1, "drawbmp bm 0 ";bmpheight
  call Scanbmp bmpwidth, bmpheight, hWindow
  goto [loop]

sub Scanbmp wide, high, hWnd
  cursor hourglass
  open "EXPdata.bas" for output as #f
  print #f, str$(wide-1)
  print #f, str$(high-1)
  open "user32" for dll as #user
  Open "gdi32"for DLL as #gdi
  CallDll #user, "GetDC",_
    hWnd as long,_
    hDC as long
  for i = 0 to wide-1
    for j = 0 to high-1
      CallDll #gdi, "GetPixel",_
        hDC as long,_
        i as long,_
        j as long,_
        pColor as long
 call getRGB pColor,r,g,b
       if r=0 and g=0 and b=0 then nst$="0" 'black
       if r=192 and g=128 and b=64 then nst$="1" ' brown
       if r=64 and g=64 and b=192 then nst$="2" 'dark blue
       if r=128 and g=128 and b=128 then nst$="3" ' dark grey
       if r=128 and g=0 and b=0 then nst$="4" 'dark red
       if r=224 and g=192 and b=0 then nst$="5" 'dark yellow
       if r=128 and g=160 and b=192 then nst$="6" 'flat blue
       if r=32 and g=192 and b=64 then nst$="7" 'green
       if r=166 and g=202 and b=240 then nst$="8" 'light blue
       if r=192 and g=192 and b=192 then nst$="9" 'light gray
       if r=192 and g=224 and b=0 then nst$="a" 'light green
       if r=224 and g=32 and b=64 then nst$="b" 'light red
       if r=0 and g=160 and b=192 then nst$="c" 'medblue
       if r=224 and g=128 and b=64 then nst$="d" 'orange
       if r=224 and g=160 and b=192 then nst$="e" 'pink
       if r=160 and g=64 and b=192 then nst$="f" 'purple
       if r=192 and g=220 and b=192 then nst$="g" 'tan
       if r=255 and g=255 and b=255 then nst$="h" 'white
       if r=255 and g=255 and b=0 then nst$="i" 'yellow
       if nst$="" then nst$="0" 'prevent misses
       print #f, nst$
    next j
  next i
  close #f
  CallDll #user, "ReleaseDC",_
    hWnd as long,_
    hDC as long,_
    r as long
  close #user
  close #gdi
  cursor normal
  open "EXPdata.bas" for input as #r
  open "EXPcomp.bas" for output as #f
  input #r, x
  input #r, y
  print #f, x
  print #f, y
  #1 "down;fill black"
  while c <y
    input #r, nst$
 if nst$="0" then r=0:g=0:b=0  'black
             if nst$="1" then r=192:g=128:b=64  ' brown
             if nst$="2" then r=64:g=64:b=192 'dark blue
             if nst$="3" then r=128:g=128:b=128' dark grey
             if nst$="4" then r=128:g=0:b=0'dark red
             if nst$="5" then r=224:g=192:b=0 'dark yellow
             if nst$="6" then r=128:g=160:b=192'flat blue
             if nst$="7" then r=32:g=192:b=64 'green
             if nst$="8" then r=166:g=202:b=240'light blue
             if nst$="9" then r=192:g=192:b=192 'light gray
             if nst$="a" then r=192:g=224:b=0  'light green
             if nst$="b" then r=224:g=32:b=64'light red
             if nst$="c" then r=0:g=160:b=192 'medblue
             if nst$="d" then r=224:g=128:b=64  'orange
             if nst$="e" then r=224:g=160:b=192'pink
             if nst$="f" then r=160:g=64:b=192'purple
             if nst$="g" then r=192:g=220:b=192'tan
             if nst$="h" then r=255:g=255:b=255'white
             if nst$="i" then r=255:g=255:b=0'yellow
    #1 "color ";r;" ";g;" ";b
     a=a+1: print #1, "set ";c;" ";a :if a>x  then c=c+1:a=0

     if ost$="" then ost$=nst$: goto [jump]
     if ost$=nst$ then t=t+1
     if ost$<>nst$ then print #f, ost$+","+str$(t): t=0

  close #f
close #r
open "EXPcomp.bas" for input as #r
open "EXPfina.bas" for output as #f
print #f, "nomainwin"
print #f, "open ";chr$(34);"Compressed BMP Data to Image project ";chr$(34);" for graphics_nsb_fs as #1"
print #f, "u=0"
print #f, "#1 ";chr$(34);"trapclose [quit]";chr$(34)
print #f, "ost$=";chr$(34);"";chr$(34)
print #f, "read x,y"
print #f, "#1 ";chr$(34);"down;fill black";chr$(34)
print #f, "while nst$<>";chr$(34);"100000";chr$(34)
print #f, " read nst$,t"
print #f, "if nst$=";chr$(34);"0";chr$(34);" then r=0:g=0:b=0  'black              0   0   0"
print #f, "if nst$=";chr$(34);"1";chr$(34);" then r=192:g=128:b=64  ' brown      192 128  64"
print #f, " if nst$=";chr$(34);"2";chr$(34);" then r=64:g=64:b=192 'dark blue     64  64 192"
print #f, "if nst$=";chr$(34);"3";chr$(34);" then r=128:g=128:b=128' dark grey 128 128 128"
print #f, "if nst$=";chr$(34);"4";chr$(34);" then r=128:g=0:b=0'dark red       128   0   0"
print #f, "if nst$=";chr$(34);"5";chr$(34);" then r=224:g=192:b=0 'dark yellow  224   192   0"
print #f, "if nst$=";chr$(34);"6";chr$(34);" then r=128:g=160:b=192'flat blue  128 160 192"
print #f, " if nst$=";chr$(34);"7";chr$(34);" then r=32:g=192:b=64 'green        32 192  64"
print #f, " if nst$=";chr$(34);"8";chr$(34);" then r=166:g=202:b=240'light blue 166 202 240"
print #f, " if nst$=";chr$(34);"9";chr$(34);" then r=192:g=192:b=192 'light gray 192 192 192"
print #f, " if nst$=";chr$(34);"a";chr$(34);" then r=192:g=224:b=0  'light green  192 224   0"
print #f, " if nst$=";chr$(34);"b";chr$(34);" then r=224:g=32:b=64'light red    224  32  64"
print #f, " if nst$=";chr$(34);"c";chr$(34);" then r=0:g=160:b=192 'medblue        0 160 192"
print #f, " if nst$=";chr$(34);"d";chr$(34);" then r=224:g=128:b=64  'orange       224 128 64"
print #f, " if nst$=";chr$(34);"e";chr$(34);" then r=224:g=160:b=192'pink       224 160 192"
print #f, " if nst$=";chr$(34);"f";chr$(34);" then r=160:g=64:b=192'purple      160 64 192"
print #f, "if nst$=";chr$(34);"g";chr$(34);" then r=192:g=220:b=192'tan        192 220 192"
print #f, "if nst$=";chr$(34);"h";chr$(34);" then r=255:g=255:b=255'white      255 255 255"
print #f, " if nst$=";chr$(34);"i";chr$(34);" then r=255:g=255:b=0'yellow       255 255 0"
print #f, "#1 ";chr$(34);"color ";chr$(34);";r;";chr$(34);" ";chr$(34);";g;";chr$(34);" ";chr$(34);";b"
print #f, "for u=0 to t"
print #f, "a=a+1: print #1, ";chr$(34);"set ";chr$(34);";c;";chr$(34);" ";chr$(34);";a :if a>x  then c=c+1:a=0"
print #f, "next u"
print #f,  "wend"
print #f, "wait"
print #f, "[quit]"
print #f, "close #1"
print #f, "end"   '   last line---
input #r, x
input #r, y
print #f, "data "+str$(x)+","+str$(y)
print #f, "data ";
while end$="no"
input #r,nst$
if coun>39 then print #f, nst$ :coun=coun+1 :print #f, "data ";
if coun<40 then print #f, nst$+","; :coun=coun+1
if coun>40 then coun =0
if eof(#r)= -1 then end$="yes"
print #f, "100000,0"
close #r
close #f
end sub
sub getRGB pixcol, byref r, byref g, byref b
   b = int(pixcol / (256*256))  '*
   g = int((pixcol - b *256*256) / 256) '*
   r = int(pixcol - b*256*256 - g*256) '*
end sub
function WidthBitmap(name$)
  open name$ for input as #pic
  close #pic
  WidthBitmap = asc(mid$(pic$,19,1)) + _
    (asc(mid$(pic$,20,1)) * 256)
end function

function HeightBitmap(name$)
  open name$ for input as #pic
  close #pic
  HeightBitmap = asc(mid$(pic$,23,1)) + _
    (asc(mid$(pic$,24,1)) * 256)
end function

  close #1


  Reply Quote Notify of replies

 9   Novice / Re: Voronoi diagram  on: Aug 30th, 2015, 4:02pm
Started by blessed2b3rd | Post by tenochtitlanuk
My current version is described on
User Image
  Reply Quote Notify of replies

 10   Game and Graphic Programming / Re: SKY CAR [ line version ]  on: Aug 30th, 2015, 12:58am
Started by bluatigro | Post by michael gallup
It doesn't run. Has many errors. You are needing help with this?
  Reply Quote Notify of replies

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls