Author Topic: Star Backgound  (Read 33540 times)

0 Members and 1 Guest are viewing this topic.

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: XInitThreads (Multi-thread systems)
« Reply #45 on: June 20, 2018, 08:59:36 pm »
Seriously, if there's a way to install something, or whatever, and get good results from it, I'm willing to try.

Lately, I've had some experience trying to get things to work in my Ubuntu installation.  I've had to type, copy, paste commands into that dreaded little Terminal window, and sometimes it actually makes things better!  If there's something I can install, using that method or other, I want to know about it.

"It is recommended that single-threaded programs not call this function"So, naturally, the prog. I want to run insists on calling this function!
« Last Edit: June 20, 2018, 09:10:19 pm by SirCrow »
I may not always finish what I've started....

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #46 on: June 20, 2018, 09:09:02 pm »
Johnno's mars link:
https://www.dropbox.com/s/jix1n1mhswnp2q2/mars0_src.jpg?dl=0

has a much better blended seam, way less obvious! though the detail isn't quite as sharp.

BTW I tried -1 and -2 on image widths to reduce black seam and started getting a gremlin on the right side!


"isn't quite as sharp" - Reason being: The original image was over 2000 pixels wide. If the image was stretched to 2000x2000 it would take a huge amount of time to produce a globe of that size. The image was scaled down to 480x480, and as such, detail was sacrificed for time...

"Gremlin"?

I just had a crazy thought. (Stop laughing!) I hope that these animations are not going to be used in the demo... Can you imagine 27 or 28 planets processing 100 images each at a rate of 10 frames per second? That will be some serious lag time! Of course, I can reduce the number of frames, but it would make the planets spin like a top... lol
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: XInitThreads (Multi-thread systems)
« Reply #47 on: June 20, 2018, 09:18:16 pm »
Seriously, if there's a way to install something, or whatever, and get good results from it, I'm willing to try.

Lately, I've had some experience trying to get things to work in my Ubuntu installation.  I've had to type, copy, paste commands into that dreaded little Terminal window, and sometimes it actually makes things better!  If there's something I can install, using that method or other, I want to know about it.

"It is recommended that single-threaded programs not call this function"So, naturally, the prog. I want to run insists on calling this function!

If I have read the description properly, there is nothing to install, as all Linux OS's have the Xlib already. It is THE first library called when booting. Without it, we would be staring at a blank screen. I think the problem is that a "single-threaded application is calling for this function (multi-threaded Xlib)?".

I have no clue what-so-ever as to know where to even begin to fix this one...
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #48 on: June 21, 2018, 09:47:35 am »
Very nicely done!

I had to reduce the "limit" to '30'.  The wee beastie was spinning SO fast that I almost went cross-eyed watching it... lol
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Star Backgound
« Reply #49 on: June 21, 2018, 10:12:59 pm »
Sphere Sim.bas

OK finally got this working as I had in mind but the effect is less than impressive. Still there is enough compression of image around edges specially at the equator that it does begin to take on more of a hemisphere look and less flat.

More comments in .bas file, using [banned user]'s latest Mars image:
Sphere sim.PNG
* Sphere sim.PNG (Filesize: 715.79 KB, Dimensions: 800x626, Views: 390)
* Sphere sim.zip (Filesize: 2.77 MB, Downloads: 253)

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #50 on: June 29, 2018, 05:34:23 am »
To quote Darth Vader, Star Wars: Episode V - The Empire Strikes Back 1980, "Impressive. Most impressive."
Logic is the beginning of wisdom.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Star Backgound
« Reply #51 on: June 29, 2018, 10:33:52 am »
Very nice work, Bplus!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Star Backgound
« Reply #52 on: June 29, 2018, 04:44:33 pm »
Thanks guys!

I tried a more dramatic grid to mount the sphere on but it had too many squares less than pixel so failed to look circular.

I didn't think anyone was interested due to lack of response, maybe I will try again with another frame idea.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #53 on: June 30, 2018, 12:19:19 am »
Does QB64 have anything similar to sdlbasic's 'blt()' command. Basically, load a 'strip' of images, 'grab' a frame, display it, continue to the end of the strip and return to the start...  If not, maybe some clever clogs, can whip up a function? Just curious...

I need more coffee... There are barely any traces of this mornings cup... lol... Could explain the insane suggestion... lol.

J
Logic is the beginning of wisdom.

FellippeHeitor

  • Guest
Re: Star Backgound
« Reply #54 on: June 30, 2018, 01:14:43 am »
Nothing similar builtin. You guys will have to cook your own.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Star Backgound
« Reply #55 on: June 30, 2018, 03:58:44 am »
BPlus, less work would you have if you use OpenGL for the sphere and an external help.c file, OpenGL has a direct command for the sphere. Do you remember the program "Planets.bas" from Ashish?

Johnno56: What exactly do you mean by this command? Do I understand that you will have a set of pictures and want to make a video loop? Something like this?

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #56 on: June 30, 2018, 05:21:42 am »
Petr,

Could not view the video. Youtube jumped on it... But anyway you are pretty much right. Imagine the frames of a film. Each frame is part of the animation process. The "Strip" of images are stored and each frame is captured and displayed in sequence. If the animation is an explosion then the sequence is run just once. A planet, set it up to continuously in a loop.

The command is: blt(slot, sx, sy, sw, sh, dx, dy)
slot: where the image is stored
sx: Source X coordinate
sy: Source Y coordinate
sw: Source image width
sh: Source image height
dx: Destination screen X coordinate
dy: Destination screen Y coordinate

I suppose the 'slot' can be simulated by using QB64's GET command and capture each frame... I think... Not too sure about that...
I know with sdlbasic it more efficient to animate a sprite that way....

Just wondering if QB64 could do something like that...

J
Logic is the beginning of wisdom.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Star Backgound
« Reply #57 on: June 30, 2018, 05:56:32 am »
Hi Johnno, of course, QB64 know do it. Better as GET is _PUTIMAGE. Try my sources here:
* sp.zip (Filesize: 5.29 MB, Downloads: 233)

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Star Backgound
« Reply #58 on: June 30, 2018, 06:18:42 am »
TSo imagine someone saying my own video for copyright infringement to Yotube. I have not seen a bigger stupidity in my life. :-D This are "intelligent algorhytms" Youtube.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Star Backgound
« Reply #59 on: June 30, 2018, 06:53:09 am »
I want to thank you for the programs. I am having difficulty following them. I am still learning QB64 and a lot of the coding goes over my head. I think I maybe over stretching my abilities in trying to duplicate an sdlbasic command into a qb64 function. I thought it might be a simple "swap this for that" and it would be finished... Obviously "my" version of simple means extremely hard for me... lol

I think I may have to stick with what I know best... the simple stuff... I'm really sorry for wasting your time on this one. I obviously did not this this one through...

J
Logic is the beginning of wisdom.