Page 2 of 2

Posted: Tue Mar 21, 2006 8:15 pm
by Jack Ruby
Lolol,

Maths man, I just dont get it, never have, doubt I ever will.

The only time in my life I had some basic maths going was when I was a cashier at a bookmakers, after a few weeks I didnt even have to think, the numbers appeared to me from nowhere.

Posted: Tue Mar 21, 2006 10:05 pm
by TopTiger
well the world is built on maths... I hate maths... and i study civil engineering :? i'm a little weird.


but this topic is about the 2d game...

Posted: Tue Mar 21, 2006 10:08 pm
by jv_map
<<< Sorry for off topic :oops: >>>

Just wondering, where do you study CE TopTiger?

Posted: Tue Mar 21, 2006 10:30 pm
by PKM
TopTiger wrote:well the world is built on maths... I hate maths... and i study civil engineering :? i'm a little weird.


but this topic is about the 2d game...
correction: civilization is built on math, not the world. if you say you can see math in nature then that is an observation not a fact. the church of me abhors math. it may explain why our offerings are always a little off with each count. either that or deacon _map is pilfering again.

Posted: Tue Mar 21, 2006 10:30 pm
by TopTiger
jv_map wrote:<<< Sorry for off topic :oops: >>>

Just wondering, where do you study CE TopTiger?
I study in Alkmaar (HBO). Still need to go 3 years, but it's very interesting. I might go to TU delft, but then I have another 3-4 years to go. :(

sry for off topic.

ontopic:
Lizard, are there any ss of that 2d game?
correction: civilization is built on math, not the world. if you say you can see math in nature then that is an observation not a fact. the church of me abhors math. it may explain why our offerings are always a little off with each count. either that or deacon _map is pilfering again.
yes, civilization, sry

Posted: Wed Mar 22, 2006 7:31 am
by lizardkid
jv:

the arctan thing seems almost works, however they face the wrong ways... and not in the absolute opposite direction, but at an angle to it. this may be one of my methods with rotation or something, but i htink i got the radians to degrees thing mixed up. i did the
( tan(y/x)^-1 )
thing, and then divided that number by this
( PI / 180 )

[ ( tan(y/x)^-1 ) / ( PI / 180 ) ]

is that correct? i'm double checking my functions and there's nothing overly obvious but if i've got the calculations right then i'll take a deeper look.

TopTiger:

You really don't want SS's of it :P at this stage, it's a bunch of round red and blue circular images moving around the screen to different points (a lot of times bouncing off them) while various other features run... it's not that exciting, yet :P
When i get it to a workable stage maybe i'll post something, but it wont be very soon ;)

Personally, math hasn't ever struck it with me. i have a basic enough feel and i can understand some stuff like this.. but tbh, i dont enjoy it. it's just a tool for me. i enjoy games and the creation of them, and since math is an essential part... well there ya go. just like Rad or anything else to me :P

Posted: Wed Mar 22, 2006 7:58 am
by jv_map
Hmm well it could be 3 things:

1) The arctan you are using returns the angle in degrees. Try it without the 180/pi factor.

2) You are not using arctan but 1/tan. At least the way you wrote it suggests this.

tan^-1 (x) != [tan(x)]^-1

This is why generally the notation arctan(x) or atan(x) is preferred over tan^-1 (x).

3) A definition problem.

The angle you will get from the inverse tan is the following:

Code: Select all

y
^        (x,y)
|        /
|      /
|    /
|  /
|/ ) a
0------------->x
Given the point (x,y) then:

a = atan(y/x); when x > 0
a = atan(y/x) + pi; when x < 0
a = pi/2; when x = 0 and y > 0
a = -pi/2; when x = 0 and y < 0
a is undefined; when x = 0 and y = 0

However, in computer graphics, the y axis of a screen is often oriented down instead of up, so you will get the angle the other way around.

<<< Sorry for offtopic :oops: >>>

Ah very cool TopTiger :) .. I'm in Delft currently doing Aerospace Engineering.. Not a bad idea to go here after your HBO.. I believe you can already start your MSc programme after only a 1 year transfer programme, so that's pretty sweet 8-) .. only problem is they like concrete so much the CE building looks like a forgotten nazi bunker :P

Posted: Wed Mar 22, 2006 1:50 pm
by Rookie One.pl
jv_map wrote:only problem is they like concrete so much the CE building looks like a forgotten nazi bunker :P
Most newer universities in Spain look like this. ;) A perfect shelter in case of a zombie outbreak! :twisted: