Jump to content

  • Log In with Google      Sign In   
  • Create Account


Some basic question about ranges


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 belfegor   Crossbones+   -  Reputation: 2557

Like
0Likes
Like

Posted 16 May 2012 - 11:01 AM

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.

Sponsor:

#2 Waterlimon   Crossbones+   -  Reputation: 2458

Like
1Likes
Like

Posted 16 May 2012 - 11:24 AM

You add 1 and divide by 2.

o3o


#3 way2lazy2care   Members   -  Reputation: 782

Like
0Likes
Like

Posted 16 May 2012 - 11:43 AM

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

That is what the forum is here for :)

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?

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])

#4 belfegor   Crossbones+   -  Reputation: 2557

Like
0Likes
Like

Posted 16 May 2012 - 11:56 AM

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?

Posted Image

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

Edited by belfegor, 16 May 2012 - 12:02 PM.


#5 way2lazy2care   Members   -  Reputation: 782

Like
0Likes
Like

Posted 16 May 2012 - 12:07 PM

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?


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



#6 belfegor   Crossbones+   -  Reputation: 2557

Like
0Likes
Like

Posted 16 May 2012 - 12:15 PM

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, 16 May 2012 - 12:15 PM.


#7 KymikoLoco   Members   -  Reputation: 195

Like
0Likes
Like

Posted 16 May 2012 - 12:26 PM

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 article explaining it in fairly easy terms.



A · B = A1B1 + ... + AnBn

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:

A · B = A.x * B.x + A.y * B.y + A.z * B.z




#8 way2lazy2care   Members   -  Reputation: 782

Like
1Likes
Like

Posted 16 May 2012 - 12:50 PM

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.

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.

#9 belfegor   Crossbones+   -  Reputation: 2557

Like
0Likes
Like

Posted 16 May 2012 - 12:50 PM

...but calling them 'pointless' is a little harsh.


Yes, you are right, excuse my frustration. Posted Image

@
way2lazy2care

Thanks.

Edited by belfegor, 16 May 2012 - 12:51 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS