Computer Science Canada A revolving car... |
Author: | DonQuixote [ Thu May 27, 2004 4:01 pm ] |
Post subject: | A revolving car... |
Hi !! I am a REAL newbie to Turing, so bear with me if I am a bit ignorant... ![]() Anyways, I need help on displaying a car that initially viewed from the side and gradually revolves to reveal its front... then it revolves to the same direction to reveal its other side... and so on until it returns to its initial position... (if that didn't make sense then visit link)I know that I am going to need about 36 pictures for every 10 degrees and I do have all of the images but how would the code look like?? I have tried soo many things but none have worked... plz help me!! THANX A BILLION!!! |
Author: | DonQuixote [ Thu May 27, 2004 4:02 pm ] |
Post subject: | |
O yeah when the site comes up... press on the "360 view"... You'll see what I mean 8) |
Author: | guruguru [ Thu May 27, 2004 4:23 pm ] |
Post subject: | |
You could do 3D... Catalyst's engine... or... Rip off BMW and print screen every couple seconds to get 36 or so pictures. Pic.FileNew to make them a vairbale. Pic.Draw to draw them. |
Author: | Cervantes [ Thu May 27, 2004 5:56 pm ] | ||||||||||
Post subject: | |||||||||||
he said he has the pictures.
a bit of explaining of syntax in case you don't know already:
this is really:
turing automatically recognizes the variable as an int since it was initialized with Pic.FileNew. next
this is the same as
hope this helps -Cervantes |
Author: | guruguru [ Thu May 27, 2004 6:09 pm ] | ||
Post subject: | |||
You forgot to add in the loop:
That just makes sure you dont try to acces a picture that doesnt exist. Note: My bad I didnt read carfully enought that he had pictures. |
Author: | DonQuixote [ Thu May 27, 2004 8:21 pm ] |
Post subject: | |
Can I use .jpg format instead of .bmp? This is because I used adobe photoshop to crop out the image... |
Author: | guruguru [ Thu May 27, 2004 8:22 pm ] |
Post subject: | |
Yes. Turing supports .jpg .bmp (and others?). It doesnt yet support .gif yet however. |
Author: | DonQuixote [ Thu May 27, 2004 9:09 pm ] |
Post subject: | |
Why does it constantly display an error message saying : "Argument is the wrong type"? |
Author: | guruguru [ Thu May 27, 2004 9:18 pm ] |
Post subject: | |
A picutre is an integer (int). What are you making it? I can't even tell if pictures are what is causing the error... so what is causing it? |
Author: | DonQuixote [ Thu May 27, 2004 9:29 pm ] | ||||
Post subject: | |||||
The bolded section keeps being highlighted and displays the error message... have no idea why... here, i ll put up my code
Plz just trace through and tell me what is wrong ... Thanx |
Author: | DonQuixote [ Thu May 27, 2004 9:35 pm ] | ||||||||
Post subject: | |||||||||
Some mistakes...
should be
and
should be
Sorry i amm really lame... |
Author: | guruguru [ Thu May 27, 2004 9:48 pm ] |
Post subject: | |
Lol whatever, it s'all good. We all make mistakes some time or another. Finding the mistakes and knowing how to correct them is what makes a good progrmmer. |
Author: | DonQuixote [ Fri May 28, 2004 6:07 am ] |
Post subject: | |
Is there a problem though?? Plz just keep in mind : I am a newbie ![]() I really can't think of a solution... plz help.. THANX!!! |
Author: | guruguru [ Fri May 28, 2004 3:19 pm ] | ||
Post subject: | |||
Ah yes! I just notices it after being ver puzzled. Pic.Draw() takes a variable as the first paramater. You are giving it a string. What you want to do is use Pic.ScreenLoad(), white takes a string for the first paramater. Then, you don't even need to declare the pics.
|
Author: | DonQuixote [ Fri May 28, 2004 3:45 pm ] |
Post subject: | |
Thank you sooooo very much! I really appreciate your help!!!! Thanx guruguru and Cervantes!!! |
Author: | Cervantes [ Fri May 28, 2004 4:36 pm ] | ||
Post subject: | |||
sorry that's my fault. I've never done graphics like this, the last animation i did was oh-so-long-ago ![]() Pic.ScreenLoad is a lot slower, however, since it displays the pic straight from the file (I assume that makes it slower). It would be best if we can find a way to still use Pic.Draw. just need to get around that bug. about 10 minutes later well, looks like we're going to have to use arrays. if you don't already know arrays, check out a tutorial or two. using your code:
|
Author: | DonQuixote [ Fri May 28, 2004 9:54 pm ] |
Post subject: | |
Thank you Cervantes! That shortened the code even more (thus more efficient = my teacher happy) Thanx for giving me the link to the arrays... it REALLY helped!!! |