Math Formula Tutorial?
greetings,
I wonder where can i find math tutorial website that actully teach me how to programe math formula in C/C++. Thank You.
:)
Please be more specific. I have no idea what you are talking about.
Proceeding on a brutal rampage is the obvious choice.
Proceeding on a brutal rampage is the obvious choice.
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
How to put a math formula in C++ code?
Look at all the var''s you need(one for theta/phi and so on), define them and give them a value.
Then look at your formula, if they define a x coordinate(and an y and z) then just put x=formule with the var''s you have defined before. You can put them in a loop so that you change the value..
Have a look at how to draw a simple circle with sin/cos functions and radians.. Maybe that gives you an idea
Mmm.. I don''t think I explained it very well :D I shall practice on my english
Look at all the var''s you need(one for theta/phi and so on), define them and give them a value.
Then look at your formula, if they define a x coordinate(and an y and z) then just put x=formule with the var''s you have defined before. You can put them in a loop so that you change the value..
Have a look at how to draw a simple circle with sin/cos functions and radians.. Maybe that gives you an idea

Mmm.. I don''t think I explained it very well :D I shall practice on my english

C++ functions work the same way as math functions. So, if you wanted to make the equation y=3x+2, you would do the following.
Proceeding on a brutal rampage is the obvious choice.
#include <iostream.h>float y(float x);int main(){ float x; cin >> x; float Result = y(x); cout << Result;}float y(x){ return (3*x +2);}
Proceeding on a brutal rampage is the obvious choice.
___________________________________________________________Where to find the intensity (Updated Dec 28, 2004)Member of UBAAG (Unban aftermath Association of Gamedev)
First, thanks a lot guy.....
those are not that difficult math formula.......
i mean how to program formula such as dy, dx....... matrix (advance)......., plus a few difficult math formaula........
thanks.
those are not that difficult math formula.......
i mean how to program formula such as dy, dx....... matrix (advance)......., plus a few difficult math formaula........
thanks.
:)
Look at the formula you are trying to impliment and find a way that you can break it down into pieces that C/C++ can deal with (basic arithmetic, loops, etc).
For example, some simple matrix math:
Matrx A:
|1 2|
|3 4|
3 * A:
|3 * 1 3 * 2|
|3 * 3 3 * 4| yes?
In C++ 3 * A could look like:
B.11 = 3 * A.11;
B.12 = 3 * A.12;
B.21 = 3 * A.21;
B.22 = 3 * A.22;
Break down your algorithm into pieces that you can code
I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
For example, some simple matrix math:
Matrx A:
|1 2|
|3 4|
3 * A:
|3 * 1 3 * 2|
|3 * 3 3 * 4| yes?
In C++ 3 * A could look like:
B.11 = 3 * A.11;
B.12 = 3 * A.12;
B.21 = 3 * A.21;
B.22 = 3 * A.22;
Break down your algorithm into pieces that you can code
I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement