Computer Science Canada Having difficulty with an imported picture. |
Author: | Rusty Screws [ Tue Oct 20, 2015 12:48 pm ] | ||
Post subject: | Having difficulty with an imported picture. | ||
What is it you are trying to achieve? I am trying to draw a picture of space and have the space ship image I put in Turing fly around the scene. What is the problem you are having? I am having multiple problems, firstly, it removes the background wherever it goes, I know the cause of this, however, I don't know how I would go about fixing it. ( the cause is me placing the image and then moving a pixels up and then putting the image there.) Secondly, the movement of the space ship, I originally had a bunch of overlapping loop statements that worked, however, my teacher wanted me to use for statements instead as it looked cleaner and I can't for the life of me figure out why one of them won't work. (the last for statement in spaceship movement) My final problem doesn't have to do with the spaceship, but rather with the planets I drew, even more specific, the ovals inside, the way I created them shouldn't allow for them to go outside the bigger planet oval, however, they continue to do so. Describe what you have tried to solve this problem The for statement, I've tried to declare what the x and y variable are before the statement and then executed it (like I thought I was supposed to) but it doesn't seem to do anything, the program just ends. The picture removing the background I haven't tried anything for as i'm completely lost when it comes to pictures in Turing. The interior ovals of the planet, I've tried making it more restricting with how close the middle of the interior ovals can be to the edge of the big oval, it doesn't seem to do anything thought. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) %%% SPACESHIP MOVEMENT for yy : 0 .. maxy- 300 Pic.Draw (space, x, yy, picMerge) Time.Delay (5) end for y:= maxy-300 for xx : 0..maxx div 3 Pic.Draw(space,xx,y,picMerge) Time.Delay (5) end for x:=maxx div 3 y:=maxy-300 for yy : y.. maxy-900 Pic.Draw(space,x,yy,picMerge) Time.Delay(5) end for %%%%%% %%% SPACESHIP MOVEMENT for yy : 0 .. maxy- 300 Pic.Draw (space, x, yy, picMerge) Time.Delay (5) end for y:= maxy-300 for xx : 0..maxx div 3 Pic.Draw(space,xx,y,picMerge) Time.Delay (5) end for x:=maxx div 3 y:=maxy-300 for yy : y.. maxy-900 Pic.Draw(space,x,yy,picMerge) Time.Delay(5) end for
Turing 4.05 |