----------------------------------- DonQuixote Thu May 27, 2004 4:01 pm A revolving car... ----------------------------------- Hi !! I am a REAL newbie to Turing, so bear with me if I am a bit ignorant... :D 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 [url=http://www.bmwusa.com/BMW2003/Templates/Vehicles/Series/Model/ModelGallery.aspx?NRMODE=Published&NRORIGINALURL=%2fvehicles%2f6%2f645CiCoupe%2fgallery%2ehtm&NRNODEGUID=%7b7A52D004-F6EF-4E0A-A096-52A9BBF140F8%7d&NRCACHEHINT=NoModifyGuest]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!!! ----------------------------------- DonQuixote Thu May 27, 2004 4:02 pm ----------------------------------- O yeah when the site comes up... press on the "360 view"... You'll see what I mean 8) ----------------------------------- guruguru Thu May 27, 2004 4:23 pm ----------------------------------- 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. ----------------------------------- Cervantes Thu May 27, 2004 5:56 pm ----------------------------------- he said he has the pictures. var pic1 := Pic.FileNew ("pic1.bmp") var pic2 := Pic.FileNew ("pic2.bmp") . . var pic36 := Pic.FileNew ("pic36.bmp") var pic_counter : int := 1 loop cls Pic.Draw ("pic" + intstr (pic_counter) + ".bmp", x, y, picCopy) if pic_counter >= 36 then pic_counter := 1 else pic_counter += 1 end if end loop a bit of explaining of syntax in case you don't know already: var pic1 := Pic.FileNew ("pic1.bmp") this is really: var pic1 : int := Pic.FileNew ("pic1.bmp") turing automatically recognizes the variable as an int since it was initialized with Pic.FileNew. next pic_counter += 1 this is the same as pic_counter := pic_counter + 1 hope this helps -Cervantes ----------------------------------- guruguru Thu May 27, 2004 6:09 pm ----------------------------------- You forgot to add in the loop: if pic_counter + 1 > 36 then pic_counter := 1 else pic_counter += 1 end if 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. ----------------------------------- DonQuixote Thu May 27, 2004 8:21 pm ----------------------------------- Can I use .jpg format instead of .bmp? This is because I used adobe photoshop to crop out the image... ----------------------------------- guruguru Thu May 27, 2004 8:22 pm ----------------------------------- Yes. Turing supports .jpg .bmp (and others?). It doesnt yet support .gif yet however. ----------------------------------- DonQuixote Thu May 27, 2004 9:09 pm ----------------------------------- Why does it constantly display an error message saying : "Argument is the wrong type"? ----------------------------------- guruguru Thu May 27, 2004 9:18 pm ----------------------------------- 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? ----------------------------------- DonQuixote Thu May 27, 2004 9:29 pm ----------------------------------- loop cls Pic.Draw ("pic" + intstr (picCounter) + [b]".bmp"[/b], X, Y, picCopy) if picCounter >= 36 then pic_counter := 1 else picCounter += 1 end if end loop The bolded section keeps being highlighted and displays the error message... have no idea why... here, i ll put up my code const X := maxx div 2 - 50 const Y := maxy div 2 - 50 var picCounter : int := 1 var pic1 := Pic.FileNew ("pic1.bmp") var pic2 := Pic.FileNew ("pic2.bmp") var pic3 := Pic.FileNew ("pic3.bmp") var pic4 := Pic.FileNew ("pic4.bmp") var pic5 := Pic.FileNew ("pic5.bmp") var pic6 := Pic.FileNew ("pic6.bmp") var pic7 := Pic.FileNew ("pic7.bmp") var pic8 := Pic.FileNew ("pic8.bmp") var pic9 := Pic.FileNew ("pic9.bmp") var pic10 := Pic.FileNew ("pic10.bmp") %------------------------------------------------------ loop cls Pic.Draw ("pic" + intstr (picCounter) + ".bmp", X, Y, picCopy) if picCounter >= 36 then pic_counter := 1 else picCounter += 1 end if end loop Plz just trace through and tell me what is wrong ... Thanx ----------------------------------- DonQuixote Thu May 27, 2004 9:35 pm ----------------------------------- Some mistakes... if picCounter >= 36 then should be if picCounter >= 10 then and picCounter := 1 should be picCounter := 1 Sorry i amm really lame... ----------------------------------- guruguru Thu May 27, 2004 9:48 pm ----------------------------------- 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. ----------------------------------- DonQuixote Fri May 28, 2004 6:07 am ----------------------------------- Is there a problem though?? Plz just keep in mind : I am a newbie :lol: lol I really can't think of a solution... plz help.. THANX!!! ----------------------------------- guruguru Fri May 28, 2004 3:19 pm ----------------------------------- 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. const X := maxx div 2 - 50 const Y := maxy div 2 - 50 var picCounter : int := 1 %------------------------------------------------------ loop cls Pic.ScreenLoad ("pic" + intstr (picCounter) + ".bmp", X, Y, picCopy) if picCounter >= 10 then picCounter := 1 else picCounter += 1 end if end loop ----------------------------------- DonQuixote Fri May 28, 2004 3:45 pm ----------------------------------- Thank you sooooo very much! I really appreciate your help!!!! Thanx guruguru and Cervantes!!! ----------------------------------- Cervantes Fri May 28, 2004 4:36 pm ----------------------------------- sorry that's my fault. I've never done graphics like this, the last animation i did was oh-so-long-ago :lol: 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 const X := maxx div 2 - 50 const Y := maxy div 2 - 50 var picCounter : int := 1 var picID : array 1 .. 10 of int for i : 1 .. 10 picID (i) := Pic.FileNew ("pic" + intstr (i) + ".bmp") end for %------------------------------------------------------ loop cls Pic.Draw (picID (picCounter), X, Y, picCopy) if picCounter >= 10 then picCounter := 1 else picCounter += 1 end if end loop ----------------------------------- DonQuixote Fri May 28, 2004 9:54 pm ----------------------------------- 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!!!