DescriptionDisplays an image on a sphere.
Changes from version 1:
-increased speed (around 2x)
-now writes a function into slot 2 instead of using a FOR loop
-removed quality setting since it's faster to just use a smaller size and SPSCALE it up.Instructions1: load map image using LOADMAP:
DIM MAP%[0,0]
MAP%=LOADMAP(file,u,v,width,height)u: image X start
v: image Y start
width: image width
height: image height
(like SPSET)
2: generate sphere function:
SPHERESETUP radius,width,height,precisionradius: radius of sphere to draw
width: image width
height: image height
precision: angle precision (number of decimal places to keep in the angle value. Higher values can take longer to load initially, and might exceed the maximum program size)
3: draw sphere
DIM OUT%[radius*2-1,radius*2-1]
SPHERE angle,MAP%,OUT%
GLOAD x,y,radius*2-1,radius*2-1,OUT%,TRUE,FALSEangle: angle to display the sphere at (must be between 0 and 1)
28 Comment(s)randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteThis is coolthou_fatGAMER12Avatar TabooI didn't change my avatar for 180 daysWebsiteVideo GamesI like to play video games!HobbiesNight PersonI like the quiet night and sleep late.Express YourselfQuestion: can I use the map of earth in this for a program. I am a bad artist most the time and that is a REALLY good sprite of the entire earth...12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfI yeah sure
I don't even remember where I got it fromchickenDeep SleepHiddenWebsitedisplays the earth as it would look if it was a globeSimeonScholarReceived for knowing a great deal about programming topicsAchievementsAmazing PageHiddenAchievementsDrawingI like to draw!Hobbiesa bit too round for my tastespaceturtlesVideo GamesI like to play video games!HobbiesAvatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthSeems pretty cool. Could it be used for a simple KSP clone of some type, or would it lag too much?chickenDeep SleepHiddenWebsiteyou can only change one angle. the other angles are static and cannot be changed.
therefore, you could only look at places on the equator at bird's eye view in your KSP game.spaceturtlesVideo GamesI like to play video games!HobbiesAvatar BlockI didn't change my avatar for 30 days.WebsiteIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthOh, okay. I didn't say that I would make it, but as soon as I get done with Lasership 2, I plan on working on Turtle Space Program, which, unfortunately, won't be 3d.12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfNow it can draw a 239x239 sphere at 10 FPS... With 45000 lines of code...12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express Yourselfoh I guess I should actually upload the new version at some point...chemicalexDrawingI like to draw!HobbiesIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming Strengthosu! Is Awesome!I love osu!Express YourselfOkay andrito give 12Me21's account back
</lumage>12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfI figured out how to make it around 3-4 times faster! The disadvantage is that now you have to wait like 3 seconds for SB to compile it.chickenDeep SleepHiddenWebsitei know this would completely change your code, but...
horizontal axis rotation?12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfI tried, but I'm not sure how. It's a lot more complicated, I think.randomousOwnerRobotHiddenEaster EggsSecond YearMy account is over 2 years oldWebsiteDrawingI like to draw!HobbiesFancy! If it's extensible, it'd be cool if someone based a game around it. Or at least used it in the background.chickenDeep SleepHiddenWebsitepart of the cutscene for finding a new planet?randoIntermediate ProgrammerI can make programs, but I still have trouble here and there. Programming StrengthThird YearMy account is over 3 years oldWebsiteAvatar TabooI didn't change my avatar for 180 daysWebsiteAs a background could be cool. I could try to mimic the Lunar Tower's backgrounds from Terraria lolJoshuaham123How do you make it not so pixilated?12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfThere's a quality setting I think. But I'm going to upload a new version that will run twice as fast.Joshuaham123Wow impressive amount of code.Joshuaham123Looks sweet. there was something like this on PTC that You drew a picture on a rectangle and then it made it into a holographic looking globe.12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfYeah, that's what inspired me to do this.NathanielAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsStaff Pick"Your program is one of our favorites!" - StaffAchievementsScholarReceived for knowing a great deal about programming topicsAchievementsDo you want me to send you the 3D version?PerskaSummer 2016 Contest WinnerI won the SmileBASICSource Summer 2016 Contest!Programming ContestExpert ProgrammerProgramming no longer gives me any trouble. Come to me for help, if you like!Programming StrengthGreat PageHiddenAchievementsI'm not sure the Moon is a planet.snail_Power UserQSP Contest 1 Contest ParticipantI participated in the first SmileBASIC Source QSP Contest!HelperReceived for being very helpful around SmileBASIC SourceAchievementsAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsBut what IS a planet?NathanielAmazing ContributorSomeone thinks I'm an awesome person who has done so much for the community!AchievementsStaff Pick"Your program is one of our favorites!" - StaffAchievementsScholarReceived for knowing a great deal about programming topicsAchievementsAccording to Wikipedia-
A planet is an astronomical body orbiting a star or stellar remnant that
is massive enough to be rounded by its own gravity,
is not massive enough to cause thermonuclear fusion, and
has cleared its neighbouring region of planetesimals.
:)12Me21Syntax HighlighterReceived for creating the code syntax highlighter on SBSNight PersonI like the quiet night and sleep late.Express YourselfI never said it was a planet. I said I included maps of planets, but I didn't say all of them were planets.
EDIT:
A planet is a planet, you can't say it's only a half.AveryFirst WeekJoined in the very first week of SmileBASIC SourceWebsiteThird YearMy account is over 3 years oldWebsiteDisguisedHiddenWebsiteWell, 12 """Me""" 21, hear me out.
- is massive enough to be rounded by its own gravity,
- is not massive enough to cause thermonuclear fusion, and
- has cleared its neighbouring region of planetesimals.
:)