moving in 3D

M

Mike

HI
I've two positions, one is nearer than the other in z. Both have
different x. Now how should I turn them together?

-----------

double theta = (double) heading * 3.14 / 180.0;



SourcesPos[0] = -float(cos(theta)); //not ok if i do: -0.2

SourcesPos[1] = -float(rand()%2);

SourcesPos[2] = -float(sin(theta)) //not ok if i do +0.7
 
Ö

Öö Tiib

HI
I've two positions, one is nearer than the other in z. Both have
different x. Now how should I turn them together?

-----------

double theta = (double) heading * 3.14 / 180.0;

SourcesPos[0] = -float(cos(theta)); //not ok if i do: -0.2

SourcesPos[1] = -float(rand()%2);

SourcesPos[2] = -float(sin(theta)) //not ok if i do +0.7



Huh? Mike, maybe someone smarter gets what you are doing, i don't.

If no one replies something helpful then read that post:
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/942ca08698154dfd#

There it eventually describes how to post in a way so we can help
you.
 
V

Victor Bazarov

it works but not if i move a source away either in z or x axis.

I think you're lacking proper algorithm, for which you can seek help in
the 'comp.programming' NG or the 'sci.math.*' hierarchy. When you have
a question on the C++ *language*, come back and ask it.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top