Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help Animating Lines
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DaBigOne




PostPosted: Wed Oct 16, 2013 8:16 pm   Post subject: Help Animating Lines

What is it you are trying to achieve?
I am trying to make the stick figure's right arm touch his head.


What is the problem you are having?
Whenever I try to make the coordinate of the arm move upwards to the head, I get a strange triangular shape, and I don't know how how solve this. Also, the delay is slowed down somehow, even though I put in delay (20) for every part of the stick guy's body.


Describe what you have tried to solve this problem
I've tried to change the values in the for loop, but the only difference I see is different sizes of the same thing.


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>

Turing:



%drawing the background
for a : 1 .. 640
    drawline (a, 1, a, 400, black)
end for

%making the person
loop
    for a : 9 .. 14
        %left leg
        drawline (110, 0, 130, 50, a)
        delay (20)
        %right leg
        drawline (130, 50, 150, 0, a)
        %body
        drawline (130, 50, 130, 150, a)
        delay (20)
        %head
        drawfilloval (130, 175, 25, 25, a)
        delay (20)

        %animating the right arm, need help over here!!!
for b :  100 .. 140
        %right arm
        drawline (130, 110, 180, b, a)
        delay (20)
end for
        %left arm
        drawline (130, 110, 80, 140, a)
        delay (20)
    end for
end loop







Please specify what version of Turing you are using
Turing 4.11
Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Wed Oct 16, 2013 9:27 pm   Post subject: Re: Help Animating Lines

Imaging that you are drawing your stick man on a piece of paper using a pencil. You draw his legs, then his body and head and then his arm.
How can you make his arm "move" on the paper. Can you just draw the arm in a different place or do you have to erase the arm and then draw it somewhere else?

The delay seems fine to me, what do you find wrong with it?
DaBigOne




PostPosted: Sat Oct 19, 2013 8:34 pm   Post subject: RE:Help Animating Lines

Nevermind, it was a nested loop, so it ran slower than I thought it was supposed to. Anyways, I couldn't fix the problem, but I didn't have to include the hand motion for my assignment, so everythings good.

Thanks for the help though, it helped me for making the head move.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: