ScratchData LogoScratchData
Back to tested-'s profile

Fast globe draw attempt

TEtested-•Created July 2, 2016
Fast globe draw attempt
0
0
14 views
View on Scratch

Instructions

STILL EDITING WIP. Don't use this yet. (I probably shouldn't have shared this until I had got it working, but I was hoping for a little help with the spherical triginometry ;-) ) I thought the Y-projection distortion was pre-built into the 360x180 map, but it looks like it is not. For now I've patched it in the display code but the proper place to fix it is in the 'make lookup table' code. We have a 360x180 map of the Earth, which we'ld like to use to draw a globe on the fly. It's not as fast as I would like, but it's getting there. There area a couple of graphical glitches to be worked on. If you want it pretter, draw at a scale of 2X using a larger pen. Image extracted from Wes64's project. Code rewritten to use a lookup table that maps a screen X/Y coordinate onto a 180x180 window on the map. Globe rotation is done by adding the x component of that mapping to the rotation angle. Fast shading and specular reflection hacks will follow after the basic globe drawing works reliably.

Description

Thanks to @gtoal and @Wes64 for providing the original projects! _________________ That's what I changed: Rescripted some stuff to avoid all 'repeat until' loops. I got the feeling that it may be a bit faster now.

Project Details

Project ID115419731
CreatedJuly 2, 2016
Last ModifiedJuly 3, 2016
SharedJuly 3, 2016
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root