Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import lib/clocks;
- ## Clock for animation
- setedenclock(&tick, 30);
- ## Jupiter
- jupiterX = 230;
- jupiterY = 230;
- jupiterCenterX = jupiterX + 30;
- jupiterCenterY = jupiterY + 30;
- jupiterImage = "https://d2xkkdgjnsfvb0.cloudfront.net/pub/n/images/planets/jupiter.gif";
- jupiter is Image(jupiterX, jupiterY, 60, 60, jupiterImage);
- ##jupiter is Circle(jupiterX, jupiterY, 30, "brown");
- ## Galilean moons, Io, Europa, Ganymede, Callisto
- ioDistance = 65;
- ioX is jupiterCenterX + sin(tick/1.769) * ioDistance;
- ioY is jupiterCenterY + cos(tick/1.769) * ioDistance;
- ioImage = "https://openclipart.org/image/2400px/svg_to_png/227574/Io.png";
- io is Image(ioX-15, ioY-15, 30, 30, ioImage);
- ## io is Circle(ioX, ioY, 10, "gold");
- europaDistance = 95;
- europaX is jupiterCenterX + sin(tick/3.551) * europaDistance;
- europaY is jupiterCenterY + cos(tick/3.551) * europaDistance;
- europaImage = "https://openclipart.org/image/2400px/svg_to_png/227577/Europa.png";
- europa is Image(europaX-13, europaY-13, 26, 26, europaImage);
- ## europa is Circle(europaX, europaY, 10, "blue");
- ganymedeDistance = 150;
- ganymedeX is jupiterCenterX + sin(tick/7.155) * ganymedeDistance;
- ganymedeY is jupiterCenterY + cos(tick/7.155) * ganymedeDistance;
- ganymedeImage = "http://www.solarsystemscope.com/nexus/content/moon_images/render_ganymede.png";
- ganymede is Image(ganymedeX-23, ganymedeY-23, 47, 47, ganymedeImage);
- ## ganymede is Circle(ganymedeX, ganymedeY, 10, "brown");
- callistoDistance = 220;
- callistoX is jupiterCenterX + sin(tick/16.689) * callistoDistance;
- callistoY is jupiterCenterY + cos(tick/16.689) * callistoDistance;
- callistoImage = "http://www.solarsystemscope.com/nexus/content/moon_images/render_callisto.png";
- callisto is Image(callistoX-21, callistoY-21, 43, 43, callistoImage);
- ## callisto is Circle(callistoX, callistoY, 10, "green");
- pauseButton is Button("Pause", 10, 10, true);
- continueButton is Button("Continue", 70, 10, true);
- alignButton is Button("Align", 150, 10, true);
- when (pauseButton_click) {
- edenclocks_paused = true;
- }
- when (continueButton_click) {
- edenclocks_paused = false;
- }
- when (alignButton_click) {
- tick = 0;
- }
- backgroundImage = "http://www.gunnars.com/wp-content/uploads/2014/08/Space.jpg";
- background is Image(0,0, 650, 650, backgroundImage);
- picture is[background, jupiter, io, europa, ganymede, callisto, pauseButton, continueButton, alignButton];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement