|
Post by tenochtitlanuk on Mar 18, 2024 9:01:51 GMT -5
It's well worth playing to add things to the code. You've some good ideas to give it an interactive GUI front end . . . I'll follow your changes with interest.
Yes, you obviously don't get all the images saved unless you allow a full run first. It's a way to make a suitable speed animation to display, since LB is much slower than other languages.
Do you really have a ( French) font called 'courrier'? I'm only aware of 'Courier'. And if you specify a font for the window #w, all buttons eg #w.b1 pick the chosen font without you having to tell each one- unless you want different sizes.
I did warn that the original BYTE code was wrong in parts. You need to be very clear where you are working in degrees OR radians, and in screen coordinates. It took me ages to sort out in my version.
Haven't time at present to see why your code doesn't work correctly- I'm away from home for a while.
I'll be concentrating on the polar equidistant and orthographic polar projections when I have time. Did you look at the BYTE article? It gives us a base to work on...
J
|
|
|
Post by tenochtitlanuk on Mar 16, 2024 15:00:09 GMT -5
Copy/paste this URL directly, and don't click it as a web redirect, for sample code and datafiles in a zip file. www.diga.me.uk/CitySky.zipLinks from the forum add all the other stuff I assume.... 'tho it works fine for my browsers...
|
|
|
Post by tenochtitlanuk on Mar 16, 2024 7:07:41 GMT -5
After the for/next loop has gone through all the iterations, you will find it has saved all the screens. I use the GIMP to turn these into an animated GIF- you can select the frame time interval, but other software should do the same. Then load the animation in your web-browser. I can supply info on doing this in GIMP if you haven't done animated GIFs before. I do use it a lot!
If you want to run it 'live' continuously, REM out the bmpsave line, and loop/goto the beginning of the Lo loop...
|
|
|
Post by tenochtitlanuk on Mar 16, 2024 5:00:27 GMT -5
Thanks honky -Yeah- sorry about the naming. Too many versions I've been playing with!
|
|
|
Post by tenochtitlanuk on Mar 15, 2024 17:58:43 GMT -5
Just checked- it's working fine for me. Did you get an error message? Do the links to the web page for this and the Constellations also not work for you??
|
|
|
Post by tenochtitlanuk on Mar 15, 2024 9:27:18 GMT -5
There's a zip file of city and star files at data filesData is easily found on the web, but 2 cautions here- files in Unix form just have LF as separator, while LB/MS expect CRLF. I just run a Linux one-line command file to alter this.. And data ranges may be say -180 to 180, or 0 to 360. I've had the star constellation demos up for quite a while at constellations Had quite a lot of fun prompted by Ray McAllister's graphics!
|
|
|
Post by tenochtitlanuk on Mar 14, 2024 10:06:10 GMT -5
I've just added a page to my LB site about manipulating data like city populations at given latitude and longitude to show it on a 2D screen. It's a project I first got interested in in May '78. See Byte May '78 I finally found time for it!
Typical output- I will be adding to the page and putting the data up asap.
|
|
|
Post by tenochtitlanuk on Feb 23, 2024 10:21:49 GMT -5
I continue to play with waves, both for their attractive experience and also for sound effects.
I'm particularly fascinated by 'ring modulation'. WEIRD effects that I first experimented on with transistors in the early Seventies.
Here's one example...
Liberty is too slow to use real-time. However that pushes us to find how to speed things by optimising code!
I made a big improvement by writing to a file as amplitudes got calculated. MUCH faster.
I also am moving to first creating a table of four quadrants of sine in an array. That is going to be faster than doing sine calculations for every point on the curve.
Fun, anyway, in the wet weather we've been having, and mobility increasingly taxing.
|
|
|
Post by tenochtitlanuk on Jan 15, 2024 12:52:01 GMT -5
Not sure exactly what you want to continue doing. It's dead easy to ftp files from LB to a remote site. Read the titles of the files that comprise your web page and send them! Why do you need it 'security checked' at that end? It is as secure- or not- as your site, since you don't I presume tell other users the password to your site. You might find www.diga.me.uk/IOT1.html of some relevance.
|
|
|
Post by tenochtitlanuk on Dec 13, 2023 13:00:59 GMT -5
By plunging the router bit by an amount proportional to grey level we get a line width also proportional- but we are not aiming to make a hole. Only width matters. For monitor screen output I used circles with size governed by grey level. In CNC routing the '2.5D' gets the same visual effect.
|
|
|
Post by tenochtitlanuk on Dec 13, 2023 8:38:27 GMT -5
I've played quite a lot with this kind of thing. See www.diga.me.uk/rastWidth.html or www.diga.me.uk/svgGen.html among others on my site. Imge below is of me 60 years ago... LB4 handles only bmp images. You'll find on my site and elsewhere ways to load other types. There are image loading dlls out there- or you could like me use ImageMagick. Image processing is SLOW if you use a getpixel routine to find local brightness. Quicker is to use say ppm format, which amounts to an x/y array of pixel values, and read it by indexing. See www.diga.me.uk/RCbitmapPnp.html for example. Worth too looking at EggBot pages- there is a great rasterizing routine there.
|
|
|
Post by tenochtitlanuk on Dec 12, 2023 17:56:05 GMT -5
I just created a tkn file from a LB program ( I use Mint 21 & Wine latest updates..) At first if I clicked the renamed exe file I got the same error message as you. But once I specified virtual desktop size it worked just like on native LB machines. It also worked when I turned a one liner to call this exe into another exe. The Wine ?console? popped up to allow the virtual screen assignment. Alternatively set it in Wine Configuration. Haven't tried calling from the command line.
Is this example relevant to what you want to do and are experiencing?
|
|
|
Post by tenochtitlanuk on Dec 4, 2023 14:08:04 GMT -5
|
|
|
Post by tenochtitlanuk on Nov 21, 2023 13:38:21 GMT -5
I just had a play- to exit from a window with no controls visible and/or with a faulty 'on keyboard..' or 'on mouse...' is difficult!!! My first version accidentally put my exit button it off-screen, hence I added, while testing, a timer routine to get me out in 20 seconds from such things! Code below creates an 'Exit' button. nomainwin
WindowWidth = DisplayWidth WindowHeight = DisplayHeight UpperLeftX = int( ( DisplayWidth -WindowWidth) /2) UpperLeftY = int( ( DisplayHeight -WindowHeight) /2)
graphicbox #main.g, 0, 0, WindowWidth, WindowHeight button #main.b1, "Exit", [q], LR, 40, WindowHeight -50 statictext #main.st1, "Some static text.", 30, 100, 100, 40
open "Demo. of a whole-screen window." for window_popup as #main
#main.g "down ; fill 180 180 80 ; flush"
#main.g "up ; goto 200 400 ; down ; color darkblue ; backcolor 180 180 80 ; font bold 32" #main.g "\Demo. of filled whole screen window."
timer 20000, [q] ' while testing, gives you a way to exit automatically after 20 seconds! ' eg if you code a mouse or kbd exit routine which fails you can be left with no exit! scan
wait
[q] timer 0 close #main end
|
|
|
Post by tenochtitlanuk on Oct 24, 2023 6:55:26 GMT -5
Still a bit surprising- I work on Linux Mint/Wine/LB4.5 and it works for me.....
|
|