Author Topic: Earth-browser in maptriangle  (Read 5829 times)

0 Members and 1 Guest are viewing this topic.

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Earth-browser in maptriangle
« on: January 09, 2021, 03:22:28 pm »
Hi !
I was curious about the math of how to draw a rectangular texture onto a sphere.
The video tells everything. I searched Google for the best quality "worldmap". Unfortunately, I noticed that they like to cut off the North Pole. Even though I find it in HD quality, sometimes the top and bottom are cut off (this can be seen from the degrees). I don’t think the proportions of any of the textures are authentic, but it’s still good for fun.



download (bas and exe)
https://drive.google.com/file/d/14XiPjwN8vBySSdFOE-eEcz0sBNaIIZMA/view?usp=sharing

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Earth-browser in maptriangle
« Reply #1 on: January 09, 2021, 03:43:16 pm »
This is awesome.
You're not done when it works, you're done when it's right.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Earth-browser in maptriangle
« Reply #2 on: January 09, 2021, 03:54:06 pm »
Really perfect work.

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Earth-browser in maptriangle
« Reply #3 on: January 09, 2021, 04:42:32 pm »
Now make a Universe Sandbox clone in QB64 :)

No, but seriously, this looks great. Thanks for sharing
Shuwatch!

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Earth-browser in maptriangle
« Reply #4 on: January 09, 2021, 10:59:50 pm »
What? No aliens? I was expecting at least ONE alien... lol  Kidding!  Great work!!
Logic is the beginning of wisdom.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Earth-browser in maptriangle
« Reply #5 on: January 09, 2021, 11:08:01 pm »
What? No aliens? I was expecting at least ONE alien... lol  Kidding!  Great work!!

There might not be any aliens, but there are ghosts.  Look close at the start of the video and you can spot one spirit near the center-left of the screen.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Earth-browser in maptriangle
« Reply #6 on: January 10, 2021, 10:52:30 am »
Yes Well Done!

about this
Quote
, I noticed that they like to cut off the North Pole
but do you say that Google collaborates with Area 52 to cover the hole at the 2 poles of earth?

Cool!
Programming isn't difficult, only it's  consuming time and coffee

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Earth-browser in maptriangle
« Reply #7 on: January 10, 2021, 12:26:05 pm »
Anyone know how to control it? It just flies past the screen and I can't seem to control it.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Earth-browser in maptriangle
« Reply #8 on: January 10, 2021, 12:38:35 pm »
Anyone know how to control it? It just flies past the screen and I can't seem to control it.

Ah this reminds so much of my tunneling work which ended up in a Satellite!
https://qb64.freeforums.net/thread/123/tunnel

Maybe you can find hints there, for how to build something like this or back when we were doing Mars projections.

Took awhile go dig up, here tis from Oct 2018
https://www.qb64.org/forum/index.php?topic=250.msg6345#msg6345
« Last Edit: January 10, 2021, 12:54:11 pm by bplus »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Earth-browser in maptriangle
« Reply #9 on: January 10, 2021, 12:58:49 pm »
Did a test program and figured out that for some reason _MOUSEMOVEMENTX does not work on my machine, and _MOUSEMOVEMENTY only goes up and never down. It does so whether I'm moving in x or y. I'm using 1.4 but I never caught it before, because I've never had occasion to use the mouse movement commands.

Edit: I recently slowed down my CPU to stop fan noise and noticed it took a hit on performance, also the mouse battery is rather old, so I'll try that first.

Code: QB64: [Select]
  1. a& = _NEWIMAGE(600, 600, 32)
  2.  
  3. x = 300
  4. y = 300
  5.     CLS
  6.         x = x + _MOUSEMOVEMENTX
  7.         y = y + _MOUSEMOVEMENTY
  8.     WEND
  9.     PRINT x
  10.     PRINT y
  11.     _DISPLAY
  12.     _LIMIT 30
« Last Edit: January 10, 2021, 01:06:47 pm by OldMoses »

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Earth-browser in maptriangle
« Reply #10 on: January 10, 2021, 01:25:07 pm »
@OldMoses

Ha! So this is another great thing that is fixed in version 1.5! Now I tried it, in 1.4 your program doesn't really work, but in the upcoming version 1.5 it does! That's great. Really absolutely great!

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Earth-browser in maptriangle
« Reply #11 on: January 10, 2021, 01:34:04 pm »
@OldMoses

Ha! So this is another great thing that is fixed in version 1.5! Now I tried it, in 1.4 your program doesn't really work, but in the upcoming version 1.5 it does! That's great. Really absolutely great!

I just gave the dev build a try and it still doesn't work for me, though it may not be the latest build... I changed mouse battery, tried changing mouse for another I have, tried restarting. Nothing so far has worked. My system just won't recognize a change in Y direction and won't recognize X movement at all. I guess I'll turn my CPU back up and see if that does anything.

EDIT: Nope! no dice on the CPU change. I'll have to label this one a mystery for now.
« Last Edit: January 10, 2021, 01:38:58 pm by OldMoses »

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Earth-browser in maptriangle
« Reply #12 on: January 10, 2021, 01:35:57 pm »
Version under which it works is 1.5 488c4a1 from git.  HA! In 32 bit version it works, but in 64 bit version with the same version number it works not! Now tested!
« Last Edit: January 10, 2021, 01:38:41 pm by Petr »

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: Earth-browser in maptriangle
« Reply #13 on: January 10, 2021, 01:42:44 pm »
Version under which it works is 1.5 488c4a1 from git.  HA! In 32 bit version it works, but in 64 bit version with the same version number it works not! Now tested!

My dev copy is 1.5 5acd166, I'm pretty sure it's a 64 bit since I never download 32s.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Re: Earth-browser in maptriangle
« Reply #14 on: January 10, 2021, 01:52:35 pm »
I also use the 32-bit version, because I am writing a program where I will also use the libxmp library for playing S3M, MOD, IT and XM formats and this is for 32 bit only. Thanks to that I can always test it in both versions. Finally, I have a 4 TB hard drive reserved for QB64 only ...