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

Username:   Password: 
 RegisterRegister   
 Turing Pixel Animation HELP NEEDED
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
speedk




PostPosted: Tue Jan 03, 2012 1:40 pm   Post subject: Turing Pixel Animation HELP NEEDED

What is it you are trying to achieve?
Can anyone help me make a Turing pixel animation that is 15-30 seconds long?


What is the problem you are having?
I need someone to willingly contribute on making a pixel animation


Please tell me if anyone enjoys doing these kinds of things. It may give you extra practice
Sponsor
Sponsor
Sponsor
sponsor
Wakening




PostPosted: Tue Jan 03, 2012 3:41 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

What kind of contributions/help are you looking for exactly? Are you in need of knowing how to make animations or just need someone to do it themselves?
Tony




PostPosted: Tue Jan 03, 2012 3:50 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

That's better than that previous ban-inducing spamming attempt.

Still, that's not what anyone here does (do you enjoy doing other people's assignments, perhaps in some different subject? What kind of skills/knowledge do you suppose other people pick up, when you do the work?)

But if you show some attempt, we will help you be better and help you figure out the problems you'll encounter.

Preemptively, here are some points to get you started:
- an animation is a series of pictures, or "frames". You can think of it as a movie reel, where each frame is a still shot, but as it displays them one after another, they appear in an animation
- you want to animate at perhaps 24 Frames Per Second (FPS), which is common for TV/film/animation. This means that you'd need a total of 24 * 15 = 360 pictures to produce 15 seconds of animation.
- drawing it all by hand is a pain, but procedures with arguments and for-loops will make it all much easier
- similar to how Draw.Oval takes arguments to let you draw a circle at any location of the screen, a procedure can group together multiple primitive shapes, so that you can draw a complex figure anywhere on the screen, with a single line of code (after the procedure has been setup)
- if you want to slide something across, you can increment the positions with a for-loop. You'd have to figure out the relationship between positions and frame-number that will be counted by the loop, but once that's done, the loop will generate all of the frames.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
speedk




PostPosted: Fri Jan 06, 2012 6:25 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

So Far I got this much code done. Alright Tony, can you do me atleast this favor. Can you make a nice symbol of 'Wi-Fi'? Thats not doing the assignment, it's just helping


View.Set ("offscreenonly")

type SnowType :
record
X, Y, Spd, Size : int
end record
var Snow : array 1 .. 100 of SnowType
for rep : 1 .. 100
Snow (rep).X := Rand.Int (15, 850)
Snow (rep).Y := Rand.Int (15, 550)
Snow (rep).Spd := Rand.Int (1, 3)
Snow (rep).Size := Snow (rep).Spd
end for
loop
for rep : 1 .. 100
Snow (rep).Y -= Snow (rep).Spd
if Snow (rep).Y < Snow (rep).Size then
Snow (rep).Y := Rand.Int (475, 575)
end if
drawfilloval (Snow (rep).X, Snow (rep).Y, Snow (rep).Size, Snow (rep).Size, white)
end for
View.Update
cls



var font1, font2, font3, picID, picid, FLOOR, count, a, r, z, f : int := 0 % variables
var y : int := 370 % Variable with different value than 0
var Colour : int := 1
font1 := Font.New ("Arial:55:bold") % it creates font style 1 with font type serif, size 120, bold
font2 := Font.New ("Verdana:50:bold,italic") % creates font style 2 with font type Nerdana, size 40, bold and italic
setscreen ("graphics:800;600") % it sets the output screen to grapics 800 by 600
colourback (255) % changes the background colour to a yellowish shade
cls
Draw.FillBox (0,600,75,0,blue)
Draw.FillBox (0,75,800,0,green)
Draw.FillBox (0,600,800,525,yellow)
Draw.FillBox (715,600,800,0,red)
% First fonts
Font.Draw ("Why DO We Need", 90, 460, font1, white) % Puts wifi on the screen with font1 style
Font.Draw ("Wi-Fi in School?", 90, 360, font2, white)
Draw.FillOval (400,35,25,25, black)

end loop
speedk




PostPosted: Fri Jan 06, 2012 7:43 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

i have another problem, when i try to add this code :

% Wifi Symbol
Draw.ThickLine (400, 20, 400, 190, 10, white)
Draw.FillOval (400, 195, 20, 20, white)

loop
r := r + 10 % Makes wifi signal go bigger
Draw.Arc (385 - r, 195, r + 20, r + 20, 90, 270, white)
Draw.Arc (415 + r, 195, r + 20, r + 20, 270, 90, white)
delay (100)
exit when r = 100
end loop

then alll the snow slows down, and messes up, i don't know how to include that loop with the other one without messing it up. try adding that code and see what happens, tell me how to fix it
Dreadnought




PostPosted: Fri Jan 06, 2012 8:43 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

Turing:
loop
    r := r + 10 % Makes wifi signal go bigger
    Draw.Arc (385 - r, 195, r + 20, r + 20, 90, 270, white)
    Draw.Arc (415 + r, 195, r + 20, r + 20, 270, 90, white)
    delay (100)
    exit when r = 100
end loop

This loop runs 10 times, so each line will be run 10 times before anything else happens. Now if we put this inside another loop, what happens?
Well, each time the outer loop runs, the inner loop will run 10 times.

This wouldn't really be a problem if it wasn't for one of the lines in this inner loop. Can you guess which one?
speedk




PostPosted: Sat Jan 07, 2012 1:15 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

I've been trying to fin out which, can't seem to know. Which line is causing this problem?
Dreadnought




PostPosted: Sat Jan 07, 2012 4:37 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

What happens when you run delay(100) 10 times?
Sponsor
Sponsor
Sponsor
sponsor
speedk




PostPosted: Sun Jan 08, 2012 1:17 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

Yeah but that is needed for the wi-fi signals to expand, at a tenth of a second it will expand once, how do i make it so that the snow can fall while the signals expand
Tony




PostPosted: Sun Jan 08, 2012 1:43 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

As the snow is falling for 100ms, count the time without blocking, then draw the wifi signal. Repeat.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
speedk




PostPosted: Sun Jan 08, 2012 10:34 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

can you re write the code so that it works?
Tony




PostPosted: Sun Jan 08, 2012 10:48 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

I'm not going to do that.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Aange10




PostPosted: Sun Jan 08, 2012 10:58 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

The Rules wrote:

Also plz don't post asking people to do your schoolwork for you, we will help but we will not do your projects for you.



Off Topic: Tony, in the terms of use you have us agree to abide by the rules posted at Rules. However, in the forum post (that I linked) you do not ask us to abide by forum specific rules (EX: Link ). You should definitely add a sentence in the Rules that asks to follow forum specific rules.

Also, you should know the the link in the Terms of Use redirecting to the rules is broken and redirects to compsci's home page.


Anyways I had a nice big post ready about how they agreed in the ToU not to ask for this kind of help, and that would be the answer they got, but considering the rules for this thread are more of heavy suggestions than an agreement, I couldn't link it to the ToU D:.
Tony




PostPosted: Sun Jan 08, 2012 11:24 pm   Post subject: RE:Turing Pixel Animation HELP NEEDED

That isn't so much forum-specific rules, as extra helpful links and guidance.

But yes, the forums are founded on the idea of assisting with learning, not with avoiding work.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Dreadnought




PostPosted: Sun Jan 08, 2012 11:51 pm   Post subject: Re: Turing Pixel Animation HELP NEEDED

@speedk I suggest you read the documentation about Time.Elapsed, that will help you count the time without delaying the program like Tony was talking about.
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 2  [ 17 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: