Hey can u plz help me out with this
Author |
Message |
enimirahi
|
Posted: Thu Apr 16, 2009 6:06 pm Post subject: Hey can u plz help me out with this |
|
|
Use the moving object make a short animation telling a story surrounding these objects.
It needs a beginning (text or a brief introduction),
Then the story (give the chance the object to move against some background),
The ending with credits. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Saad
![](http://compsci.ca/v3/uploads/user_avatars/182387547249e7ebb91fb8a.png)
|
Posted: Thu Apr 16, 2009 6:13 pm Post subject: RE:Hey can u plz help me out with this |
|
|
So what do you need help with because clearly you aren't asking us to do the thing for you. |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:16 pm Post subject: RE:Hey can u plz help me out with this |
|
|
ye i know |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Apr 16, 2009 6:20 pm Post subject: RE:Hey can u plz help me out with this |
|
|
Have you noticed the template that showed up when you were creating this new thread? Use that. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:25 pm Post subject: RE:Hey can u plz help me out with this |
|
|
what tempelate |
|
|
|
|
![](images/spacer.gif) |
Saad
![](http://compsci.ca/v3/uploads/user_avatars/182387547249e7ebb91fb8a.png)
|
Posted: Thu Apr 16, 2009 6:26 pm Post subject: Re: Hey can u plz help me out with this |
|
|
The template that you had when you clicked the new post button which you seemed to delete and not use. |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:35 pm Post subject: RE:Hey can u plz help me out with this |
|
|
Turing Animation Assignment
1. Simple Animation
Method One
Repetition syntaxes are the favourite structures used in making objects move.
?For loop?s? are used to lay down conditions the number of times the images move.
?Delay? is used to give the visual conception how long the transition time is before the image is moving to its new distance. Example: Bouncing Ball Program
Make sure the old space is covered by the same background colour after the image is moved.
Method Two
Using "Sprite" commands.
An image will move across the screen in units of "frames" with the "delay" of time specified.
An image file is needed for the simplest case.
See example file:
(a) From the help meanu: "The Sprite.Animate" program.
(b) A modified version.
Q1 .a) Draw a moon that moves across a star-lit sky.
b) Then add a flying object that moves across the screen from one space to another at the
speed specified.
2. Importing Fonts.
Add New Texts
Selection Fonts:
Font.Draw (txtStr : string, x, y, fontID, Color : int) : int
FontID needs to be declared by using:
Font1:= Font.New (?Futura?)
The program prints out several phrases in a variety of fonts.
var font1, font2, font3, font4 : int
font1 := Font.New ("serif:12")
font2 := Font.New ("sans serif:18:bold")
font3 := Font.New ("mono:9")
font4 := Font.New ("Palatino:24:Bold,Italic")
Font.Draw ("This is in a serif font", 50, 30, font1, red)
Font.Draw ("This is in a sans serif font", 50, 80, font2, brightblue)
Font.Draw ("This is in a mono font", 50, 130, font3, colorfg)
Font.Draw ("This is in Palatino (if available)", 50, 180, font4, green)
Font.Free (font1)
Font.Free (font2)
Font.Free (font3)
Font.Free (font4)
Q2. Now add some text to your programs completed in Graphics assignment two.
Captions to your furniture design
Texts appearing on the screen of your monitor
3. Importing images.
Syntax:
var picid:int
picid := Pic.FileNew ("filename.jpg")
Pic.Draw (picid, x, y, picMerge)
Pic.Free (Picid)
var pic55, pic2 : int
var newPic, newPic2 : int
var wx : int := 500
var wq : int := 500
var wp : int := 150
var wz : int := 150
var picWidth, picHeight : int
pic55 := Pic.FileNew ("top.jpg")
pic2 := Pic.FileNew ("top2.jpg")
picWidth := Pic.Width (pic55)
picHeight := Pic.Height (pic55)
newPic := Pic.Scale (pic55, picWidth div 5, picHeight div 5)
newPic2 := Pic.Scale (pic2, picWidth div 5, picHeight div 5)
Pic.Draw (newPic, wx, 331, picMerge)
Pic.Draw (newPic, wq, 301, picMerge)
Pic.Draw (newPic2, wz, 201, picMerge)
Pic.Draw (newPic2, wp, 171, picMerge)
Pic.Free (newPic)
Pic.Free (newPic2)
Q3. Import an image file (.jpeg or .png). Give your image a legend.
Then try to make you image move (if it fits the context).
% The "MusicAndSound" program.
const STAR_SIZE : int := 80
const BOING_FILE : string := "%oot/support/help/Examples/Data Files/boing.wav"
const BACKGROUND : string := "%oot/support/help/Examples/Data Files/music.mid"
var pic, x, y, dx, dy : int
var finished : boolean := false
% Get the original picture
Draw.FillStar (3, 3, STAR_SIZE - 3, STAR_SIZE - 3, brightred)
pic := Pic.New (0, 0, STAR_SIZE, STAR_SIZE)
cls
% Set the initial location and direction of movement
x := Rand.Int (0, maxx - STAR_SIZE)
y := Rand.Int (0, maxy - STAR_SIZE)
dx := 2
dy := 2
Music.PlayFileLoop (BACKGROUND) % Start background music playing
loop
if x + dx < -3 or x + dx > maxx - STAR_SIZE + 3 then
dx := -dx
Music.PlayFileReturn (BOING_FILE)
end if
if y + dy < -3 or y + dy > maxy - STAR_SIZE + 3 then
dy := -dy
Music.PlayFileReturn (BOING_FILE)
end if
x += dx
y += dy
Pic.Draw (pic, x, y, picCopy)
exit when hasch
Time.DelaySinceLast (5)
end loop
% Stop the background music.
finished := true
Music.PlayFileStop
For the asignment |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:36 pm Post subject: RE:Hey can u plz help me out with this |
|
|
this is acctually the main question because i wanted to skip this and go to the main question but i think this one is better to do and i need some help with this to |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Thu Apr 16, 2009 6:41 pm Post subject: RE:Hey can u plz help me out with this |
|
|
That was a mess. I'm not even going to read it, unless it's properly formatted. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:43 pm Post subject: RE:Hey can u plz help me out with this |
|
|
Q1 .a) Draw a moon that moves across a star-lit sky.
b) Then add a flying object that moves across the screen from one space to another at the
speed specified.
Q2. Now add some text to your programs completed in Graphics assignment two.
Captions to your furniture design
Texts appearing on the screen of your monitor
Q3. Import an image file (.jpeg or .png). Give your image a legend.
Then try to make you image move (if it fits the context).
these are the main question and the other written stuff above are used to help you with some of the question sorry bout that |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:45 pm Post subject: RE:Hey can u plz help me out with this |
|
|
no, i can draw the moon bout i dont know how to move accros the screen.
for question 1
Question 2 Ignore sorry bout that
Question three i dont know how to import an image file to turing and thats it |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 6:49 pm Post subject: RE:Hey can u plz help me out with this |
|
|
k wait so for drawing an oval this is the code
View.Set ("graphics")
const midx := maxx div 2
const midy := maxy div 2
Draw.FillOval (midx, midy, midx, midy, 1)
what is the code to draw half an oval |
|
|
|
|
![](images/spacer.gif) |
saltpro15
![](http://compsci.ca/v3/uploads/user_avatars/9776171634ced6278d14c2.png)
|
Posted: Thu Apr 16, 2009 7:10 pm Post subject: RE:Hey can u plz help me out with this |
|
|
importing an image is pretty simple
that's an example from the Turing Doc's (F10) |
|
|
|
|
![](images/spacer.gif) |
enimirahi
|
Posted: Thu Apr 16, 2009 7:10 pm Post subject: RE:Hey can u plz help me out with this |
|
|
k thanks |
|
|
|
|
![](images/spacer.gif) |
andrew.
|
Posted: Thu Apr 16, 2009 7:46 pm Post subject: RE:Hey can u plz help me out with this |
|
|
Try to use the edit button instead of posting multiple times in a row. |
|
|
|
|
![](images/spacer.gif) |
|
|