View Full Version : translation rotation
prabhakaran
01312008, 02:11 AM
my problem is i have an helicopter that is looking towards x axis. i want the helicopter move along all directions using x key for forword and X key for backwrd . the helicopter moves only fornt and back direction of its. if i rotate the helicopter in 90 degree y axis means then the helicopter must go front direction of the it now that is z axis.
consider
gluCylinder(object,1,0,4,303,0);
this is my helicopter
give me the solution for it friend
Dark Photon
01312008, 05:36 AM
helicopter that is looking towards x axis...x key for forword...if i rotate the helicopter in 90 degree y axis means then the helicopter must go front direction of the it now that is z axis. ...give me the solution for it friend
First, don't crosspost. This isn't an Advanced question, and it's not worth annoying the Beginners with multiple posts.
Second, don't ask folks to solve your problem. Nobody wants to do your homework or debug your code. Ask questions about what you don't understand, and you'll find lots of folks willing to help. You should read this: How to Ask Questions the Smart Way (http://www.catb.org/~esr/faqs/smartquestions.html). If you don't read anything else, read the Introduction.
Third, pick up the OpenGL Red Book (http://www.opengl.org/documentation/red_book/), read the Viewing chapter, and try the tutorials. Once you've done that, you'll have answered your question.
Other posts by you on the same topic here (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=233459) and here (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=233510) and here (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=233506).
k_szczech
01312008, 05:46 AM
Sorry if this sounds offending, but it's how I see it: Your solution is to be less ignorant and pay more attention to what you read.
First  you have posted twice to wrong forum, even though it's very clearily written what each forum is for.
Second thing is that if you look at the beginners forum, you'll see that first topic has a link to wiki page. On that page you'll find article named "Getting started". You shouldn't have ignored that one, so go there now.
Read carefully. It will also point you to NEHE tutorials  make sure you go throught them, too.
prabhakaran
01312008, 09:24 PM
sorry for my mistake ok. i never ask you to do this for me ok. no i never post this forum at all.i will try myself friends and gurus. if i know then why i am asking to you. ok any way i will take more time and i will teach you if bossible. take mistake me.. ok good bye...
why i am sending so many forums nobody answered me i same forum. what can i do
prabhakaran
01312008, 09:39 PM
one master can bring to 1000 masters if he worked hard. you are not ready to solve my broblem means what we can call you.
actually i my mother language is different i have to learned english and then i studied opengl with my selft. so only little conflict ok . so i left the rules to read.
i am not begging to do this. i can learn my self. i wont to be a master. i want to be a learner. if i am truth for myself i can learne myself. sorry for distrubing you all from your works . good bye.............
RedBrain
02182008, 10:48 AM
Hmm, right i am a Mathematics student at uni for a few years now... so if i can help you... i must be really crap at applied math and pure math. rofl
Well so i am not totaly understanding what you mean.
I think before you start making it complicated with the whole 3D aspect of another dimension make it simple first then move on.
So what if we just take a 2d grid of x and y axis, and for me i think isnt it
> x








^
y
where the top left is coordinated (0,0);
So ok if we defined some sort of 2d shape to be a helicopter take a rectangle for sake of arguemnt, (i would be worried if helicopters were just a rectangle not even a platonic solid haha);
Anyways lets say we have our rectangle
12
 
 
34
say 1:(0,0) 2:(2,0) 3:(0,4) 4:(2,4)
lets say that its curently facing down.
so what would happen if we turned it 90 degrees or pi/2 rads clockwise
lets see
31
 
42
so where are the coordinates now
well 3 seems to stay the same 3:(0,4)
4:(0,6)
1:(4,4) 2:(4,6)
so you can see a rotation you can do reflections just think of where the coordinates will be.
So your talking about roating things in 3D space:
for me from what i have learned that i should remember all off... but i dont haha think of vectors i am not sure how good your math knowlegde will be now, but if it isnt up to scratch i really reccoment a book on vector algebra and dynamics of particles or somthing like newtonion mechanics something like that
but anyways you will be looking for things about dot products cross products etc.
Your wanting to rotate an object though 90 degress in the y axis with respect to some other axis, immedietly this sounds complicated.
if you dont want to start getting too deep into mathematics just break it down so take it from the xaxis and yaxis perspective to find where a certain few vertices will be then do the same idea with the zaxis and yaxis perspective, try to visualise it as much as you can keep drawing it on a piece of paper or better yet get a few small shapes like cubes and cirlces (ellipse's) etc
if you want to get a quick answer you can pretend your cylinder is a vector and you want to find what will happen that vector.
Example:
Lets say your cyclinder is face upward
in the yaxis
^




lets remember what our coordinate system is like in 3D
y


 /z
 /
/
x
its hard to show in ASC2 haha :P
anyways so we have a cyclinder standing up right in the y axis
then if you wanted to find what the vector will be and its coordinates would be in another axis you can do the crossproduct with the cyclinder vector and another axis
look at this don't start looking at the matrix's at the bottom only make things more confusing its handy when you start to understand it all
hmm actualy i'll finish this later i have work to do hahaha
Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.