Sign in to follow this  
belfegor

Some basic question about ranges

Recommended Posts

belfegor    2834
I am sorry for opening a topic for this but i am unable to get correct keywords to search for this.

If i do "dot" operation on two vectors i get value in between -1 & 1 right?
Hot to scale it proportionally to get it to 0 - 1 range?

I can't wrap my head around this right now.

Thanks for your time.

Share this post


Link to post
Share on other sites
way2lazy2care    790
[quote name='belfegor' timestamp='1337187684' post='4940695']
I am sorry for opening a topic for this but i am unable to get correct keywords to search for this.[/quote]
That is what the forum is here for :)

[quote]If i do "dot" operation on two vectors i get value in between -1 & 1 right?
Hot to scale it proportionally to get it to 0 - 1 range?
[/quote]
The dot product could be any value. It's the projection of one vector onto another vector.

http://mathworld.wolfram.com/DotProduct.html

Why do you need to scale it so? The fact that you need to scale it to 0-1 is odd to me.

Regardless scaling a range to a-b from x-y where z is your value and z' is your clamped value should be like this:
z'=(a-x)+z*([b-a]/[y-x])

Share this post


Link to post
Share on other sites
belfegor    2834
Thanks.

I am sorry but that link you gave is useless to me as i dont understand that matematical symbols, have any basic one to understand those?

[img]http://www.dodaj.rs/f/2t/Sj/2xsv4sKL/picture.jpg[/img]

What this big 'E' means and why does it have numbers and letters below and above? Edited by belfegor

Share this post


Link to post
Share on other sites
way2lazy2care    790
[quote name='belfegor' timestamp='1337190995' post='4940711']
Thanks.

I am sorry but that link you gave is useless to me as i dont understand that matematical symbols, have any basic one to understand those?
[/quote]

maybe khan academy will be better. With pretty graphics too :D

http://www.youtube.com/watch?v=KDHuWxy53uM&feature=related

Share this post


Link to post
Share on other sites
belfegor    2834
I have seen many links with those math symbols in them and its more proof of a concept rather then a tutorial that explains how things works. Someone who actually can read them already knows what to do without the need to read those pointless articles.
Unfortunately 99% of books also follows same pattern witch makes learning pretty hard. Edited by belfegor

Share this post


Link to post
Share on other sites
KymikoLoco    195
The books and links are referencing algebra and calculus formulas. Which are quite central to games in general. I do not enjoy just the theorems particularly either, but calling them 'pointless' is a little harsh.

But, if you are unwilling to learn the actual math behind it (the dot product is simple and powerful enough to not really matter) here is an [url="https://www.mvps.org/directx/articles/math/dot/index.htm"]article[/url] explaining it in fairly easy terms.


[quote]

[color=#000000]
A [font="Trebuchet MS"]· B = A[sub]1[/sub]B[sub]1[/sub] + ... + A[i][sub]n[/sub][/i]B[i][sub]n[/sub][/i][/font][/color][color=#000000]
[font="Trebuchet MS"]The dot product is thus the sum of the products of each component of the two vectors. For example if A and B were 3D vectors:[/font][/color][color=#000000]
A [font="Trebuchet MS"]· B = A.x * B.x + A.y * B.y + A.z * B.z[/font][/color]

[/quote]

Share this post


Link to post
Share on other sites
way2lazy2care    790
[quote name='KymikoLoco' timestamp='1337192808' post='4940721']
The books and links are referencing algebra and calculus formulas. Which are quite central to games in general. I do not enjoy just the theorems particularly either, but calling them 'pointless' is a little harsh.
[/quote]
I think his point is that you have to know the math to understand all the articles, but if you know the math then you don't need the articles. That's what I got from his meaning of "pointless".

Anyway, if you start at the beginning of the khan academy calculus playlist he should explain what everything means as he goes through. It's one of the best resources on math around tbh.

Share this post


Link to post
Share on other sites
belfegor    2834
[quote name='KymikoLoco' timestamp='1337192808' post='4940721']
...but calling them 'pointless' is a little harsh.
[/quote]

Yes, you are right, excuse my frustration. [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img]

@
[b] way2lazy2care[/b]

Thanks. Edited by belfegor

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this