Rotation Help
Author |
Message |
dabomb6
|
Posted: Tue Dec 11, 2007 12:57 am Post subject: Rotation Help |
|
|
Hi im new to turing and i need help with rotation. i have a car(dont laugh, i know its terible) but i want the front wheel to spin then im going to do some animation with circles or something to make it look like smoke. i also have a sound file attached to make a burn out sound to go with it all. i have no clue how to spin the front wheel smoothly, gota be pretty fast(but still be able to see the spokes) because its a burn out. i also need the whole car dark red(4) but i dont know how to colour it solid. if u look at the front wheel well, it covers the tire a bit on purpose but it doesnt look right if the cars color isnt solid. if your really good and it doesnt take that much effort for you, could someone maybe spruce it up a bit? maybe just a little more smoothness. i dont care but if you could, that would be awsome!
oh i have turing 4.03 if that matters at all.
thanks
heres my code.
code: | setscreen("graphics")
%%%%%%%%%%Car body
drawline (200, 30, 390, 80, black)
drawline (126, 20, 40, 80, black)
drawline (110, 80, 30, 120, black)
drawline (110, 80, 126, 20, black)
drawline (30, 120, 40, 80, black)
drawline (30, 120, 50, 160, black)
drawline (145, 125, 50, 160, black)
drawline (145, 125, 125, 170, black)
drawline (175, 130, 155, 175, black)
drawline (125, 170, 155, 175, black)
drawline (125, 170, 155, 175, black)
drawline (110, 80, 145, 125, black)
drawline (125, 170, 40, 190, black)
drawline (50, 160, 40, 190, black)
drawline (80, 190, 40, 190, black)
drawline (80, 190, 90, 160, black)
drawline (50, 160, 90, 160, black)
drawline (175, 130, 90, 160, black)
drawline (175, 130, 145, 125, black)
drawline (80, 190, 155, 175, black)
drawline (170, 210, 90, 160, black)
drawline (175, 130, 220, 205, black)
drawline (170, 210, 220, 205, black)
drawline (170, 210, 260, 220, black)
drawline (290, 215, 220, 205, black)
drawline (290, 215, 260, 220, black)
drawline (290, 215, 330, 170, black)
drawline (420, 190, 330, 170, black)
drawline (420, 190, 455, 150, black)
drawline (420, 190, 350, 200, black)
drawline (311, 195, 350, 200, black)
%rear wheel arc
drawarc (160, 50, 40, 60, -20, 210, black)
%front wheel arc
drawarc (426, 110, 40, 60, 40, 210, black)
drawline (445,150, 457, 149, black)
%drawfill(430,170,4,2)
%drawdot (430,165,4)
%%%%%%%%%rear wheel
drawoval (160, 50, 30, 50, black)
drawoval (158, 50, 25, 45, black)
drawline (155, 0, 118, 20, black)
drawline (118, 25, 118, 20, black)
%%%%%%%%%%front wheel
drawoval (420, 120, 40, 40, black)
drawoval (420, 120, 35, 35, black)
%Hub
drawoval (420, 120, 7, 7, black)
drawoval (420, 120, 2, 2, black)
%spokes
drawline (450, 100, 425, 115, black)
drawline (430, 88, 421, 113, black)
drawline (387, 110, 413, 118, black)
drawline (387, 110, 413, 118, black)
drawline (390, 135, 413, 125, black)
drawline (425, 155, 420, 127, black)
drawline (448, 140, 427, 125, black)
%%%%%%%%%%right border
drawline (600, 0, 600, 460, black)
%%%%%%%%%%Buildings
%Burnout audio
Music.PlayFile ("E:/burnout.mp3") %play a sound or music file |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Ultrahex
|
Posted: Tue Dec 11, 2007 8:50 am Post subject: Re: Rotation Help |
|
|
Searching Online would help you... and possibly even our forum!
2D Rotation works on this method:
If Your Initial Co-ordinates are x,y
after a rotation of 'q' about (0,0) they change to:
x'=x*cos(q) - y*sin(q)
y'=y*cos(q) + x*sin(q)
Think about that, then think about how you would rotate around not the point (0,0) but the center of your wheel. |
|
|
|
|
|
chrisciscoioio
|
Posted: Tue Dec 11, 2007 12:29 pm Post subject: Re: Rotation Help |
|
|
For your car color woes, make the wheels and the car in paint, and then draw them together on the screen, use the above rotation method to spin the wheels on the spot. |
|
|
|
|
|
dabomb6
|
Posted: Thu Dec 20, 2007 4:32 pm Post subject: Re: Rotation Help |
|
|
doesnt help me but i already got it working. but im having a problem with drawfill leaking. does anyone know if drawfill will leak through arcs? because i have everything closed up but its leaking into my background and screwing everything up. |
|
|
|
|
|
dabomb6
|
Posted: Thu Dec 20, 2007 4:34 pm Post subject: Re: Rotation Help |
|
|
THis is with the animation. i cant figure out how to make the leaking stop.
please this is due tomrow and im not "using" you guys but im screwed if i cant figure this out. i really REALLY need some help. if theres any skilled people here i will offer 10 dollars to someone that can put some 3D buildings in the background. need this for tonight. oh and if anyone knows of any turing programs that you can like draw lines manualy, then it tells u the coordinates? if someone hasnt already made of these, i would suggest making one. would be VERY VERY helpfull. when im workign with turing sometimes i freak out and just wish that i could draw it on there instead of right the coordinates. so frustrating. if not guna be a late night.
code: | setscreen("graphics")
%Burnout audio
process music
Music.PlayFile ("E:/burnout.mp3")
end music
fork music
%%%%%%%%%%right border
drawline (600, 0, 600, 460, black)
%%%%%%%%%%Car body
drawline (200, 30, 392, 80, black)
drawline (126, 20, 40, 80, black)
drawline (110, 80, 30, 120, black)
drawline (110, 80, 126, 20, black)
drawline (30, 120, 40, 80, black)
drawline (30, 120, 50, 160, black)
drawline (145, 125, 50, 160, black)
drawline (145, 125, 125, 170, black)
drawline (175, 130, 155, 175, black)
drawline (125, 170, 155, 175, black)
drawline (125, 170, 155, 175, black)
drawline (110, 80, 145, 125, black)
drawline (125, 170, 40, 190, black)
drawline (50, 160, 40, 190, black)
drawline (80, 190, 40, 190, black)
drawline (80, 190, 90, 160, black)
drawline (50, 160, 90, 160, black)
drawline (175, 130, 90, 160, black)
drawline (175, 130, 145, 125, black)
drawline (80, 190, 155, 175, black)
drawline (170, 210, 90, 160, black)
drawline (175, 130, 220, 205, black)
drawline (170, 210, 220, 205, black)
drawline (170, 210, 260, 220, black)
drawline (290, 215, 220, 205, black)
drawline (290, 215, 260, 220, black)
drawline (290, 215, 330, 170, black)
drawline (420, 190, 330, 170, black)
drawline (420, 190, 455, 150, black)
drawline (420, 190, 350, 200, black)
drawline (311, 195, 350, 200, black)
%rear wheel arc
drawarc (160, 50, 40, 60, -20, 210, black)
%front wheel arc
drawarc (426, 110, 40, 60, 40, 212, black)
drawline (445,150, 457, 149, black)
%drawfill(430,170,4,2)
%drawdot (430,165,4)
%%%%%%%%%rear wheel
drawoval (160, 50, 30, 50, black)
drawoval (158, 50, 25, 45, black)
drawline (155, 0, 118, 20, black)
drawline (118, 25, 118, 20, black)
%%%%%%%%%%front wheel
drawoval (420, 120, 40, 40, black)
drawoval (420, 120, 35, 35, black)
%Hub
drawoval (420, 120, 7, 7, black)
drawoval (420, 120, 2, 2, black)
drawfill (201,312,4,black)
%spokes
for i:1..20
drawline (450, 100, 425, 115, black)
drawline (430, 88, 421, 113, black)
drawline (387, 110, 413, 118, black)
drawline (387, 110, 413, 118, black)
drawline (390, 135, 413, 125, black)
drawline (425, 155, 420, 127, black)
drawline (448, 140, 427, 125, black)
delay(100)
drawline (450, 100, 425, 115, white)
drawline (430, 88, 421, 113, white)
drawline (387, 110, 413, 118, white)
drawline (387, 110, 413, 118, white)
drawline (390, 135, 413, 125, white)
drawline (425, 155, 420, 127, white)
drawline (448, 140, 427, 125, white)
delay(100)
%spokes moved
drawline (435, 90, 423, 113, black)
drawline (410, 88, 417, 113, black)
drawline (387, 125, 412, 122, black)
drawline (407, 152, 416, 127, black)
drawline (445, 145, 426, 126, black)
drawline (455, 117, 427, 118, black)
delay (100)
drawline (435, 90, 423, 113, white)
drawline (410, 88, 417, 113, white)
drawline (387, 125, 412, 122, white)
drawline (407, 152, 416, 127, white)
drawline (445, 145, 426, 126, white)
drawline (455, 117, 427, 118, white)
delay (200)
drawline (450, 100, 425, 115, black)
drawline (430, 88, 421, 113, black)
drawline (387, 110, 413, 118, black)
drawline (387, 110, 413, 118, black)
drawline (390, 135, 413, 125, black)
drawline (425, 155, 420, 127, black)
drawline (448, 140, 427, 125, black)
end for
%%%%%%%%%%Buildings |
|
|
|
|
|
|
Clayton
|
Posted: Thu Dec 20, 2007 5:16 pm Post subject: RE:Rotation Help |
|
|
Why not just Draw.FillArc()? |
|
|
|
|
|
dabomb6
|
Posted: Thu Dec 20, 2007 7:47 pm Post subject: RE:Rotation Help |
|
|
thats not what im trying to do. did u even view it in turing? |
|
|
|
|
|
HeavenAgain
|
Posted: Thu Dec 20, 2007 7:53 pm Post subject: RE:Rotation Help |
|
|
you had drawfill(430,170,4,2)
should be
drawfill(430,170,4,black)
because the boarder is black |
|
|
|
|
|
Sponsor Sponsor
|
|
|
dabomb6
|
Posted: Thu Dec 20, 2007 8:02 pm Post subject: RE:Rotation Help |
|
|
thanks for the quick post, but it didnt work same thing. i cant find the dang leak |
|
|
|
|
|
HeavenAgain
|
Posted: Thu Dec 20, 2007 8:13 pm Post subject: RE:Rotation Help |
|
|
code: | setscreen("graphics")
%Burnout audio
process music
Music.PlayFile ("E:/burnout.mp3")
end music
fork music
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%front wheel %%%%%
drawfilloval (420, 120, 40, 40, 4) %%%%%
drawfilloval (420, 120, 35, 35, white) %%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Hub
drawoval (420, 120, 7, 7, black)
drawoval (420, 120, 2, 2, black)
%%%%%%%%%%right border
drawline (600, 0, 600, 460, black)
%%%%%%%%%%Car body
drawline (200, 30, 392, 80, black)
drawline (126, 20, 40, 80, black) |
as clayton said you should try to use the drawfill within each shape, since it is already built in, so why not use it. and for your code, i just added the drawfill and moved things around a bit, and see if the result is what you want.... |
|
|
|
|
|
syntax_error
|
Posted: Thu Dec 20, 2007 9:02 pm Post subject: Re: Rotation Help |
|
|
dabomb6 wrote:
%Burnout audio
process music
Music.PlayFile ("E:/burnout.mp3")
end music
fork music
just make sure when you hand in ur project that if you want the music file to play put it in the same folder as you turing file so that it will play |
|
|
|
|
|
dabomb6
|
Posted: Fri Dec 21, 2007 12:31 am Post subject: RE:Rotation Help |
|
|
k i found that damn leak. done colouring the car. need to work on buildings right now im stuck at spokes for the rear wheel(not animated). the sound wasnt working because i pluged in my ipod before my usb drive so it changed the usb drives name from E to H ....... o well. this program seems so impractical for graphics. any tips to speed things up? a program where i can like draw my project out by hand on turing then it gives you the coordinates would be AMAZING. |
|
|
|
|
|
syntax_error
|
Posted: Fri Dec 21, 2007 8:43 pm Post subject: Re: Rotation Help |
|
|
as far as i know there is no such program taht you can draw in and then turing can give you the image
would be an interesting project tho
as for teh sound again..... dont leave it on your USB
place it in teh same folder as your turing file |
|
|
|
|
|
|
|