Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

108 Neutral

About geroppo

  • Rank
  1. geroppo

    Calculating normal line

    omg I'm sorry, you are absolutly right, while they were both in local space the precomputed mesh was made pointing towards the Z vector, that's why it was showing a bit of blue, now I fixed it and they both look correct. The reason I was talking here about a 2D problem was because I was ignoring the Z value to simplify the subject and try to make it easier to undestand( for me at least), while working in 3D space, sorry for not mentioning that. Thanks for your help
  2. geroppo

    Calculating normal line

    Well it turns out I didn't got it lol , after reading up more and testing things, I have a few more questions ( sorry ) : 1) what's the point of using the transpose operator ? since ( if I understood correctly) in the case of having a vector with only one row, the transpose will turn it into a column, like [1,2] after transpose: [1, 2] is that correct? and if so, I fail to realize its use here.   2) ( supposing that the transpose does not affect the calculations as mentioned in point 1...) would then the final vector for the normal ( in this case) be  ( -cos(x) , 1 )  ?( and of course normalize that)   if that were the case, then I'm doing something wrong, below I leave a link of a comparison of the normal colors between a precomputed mesh and my deformated mesh using the function above mentioned. 1= precomputed mesh, 2= my mesh   Thanks for your patience
  3. geroppo

    Calculating normal line

    I got it now, thanks alot!
  4. geroppo

    Calculating normal line

    Thanks JhonnyCode and haegarr for answering, and I have a few more questions to haegarr: 1) What does this mean?  [ ]t 2) Why are you derivating both X and Y ? 3) What formula are you using to find the tangent? Sorry if the questions are "noobish" but I'm still a bit confused, thanks.
  5. geroppo

    Calculating normal line

    may I ask how do I generate the normals ? I know that since the normal is perpendicular to the tangent line, i have  to get the inverse reciprocate of the slope of the tangent, is that correct ? and if so, how do I continue ? y = ( -1 / cos( x)) * x + sin(x) - cos(x) * x would that be the function for the normal ? and thanks for answering
  6. Hello there, first of all, I know there are alot of topics about this already so my apologies in advance, but I was looking for some guidance or assistance on this. As the tittle says, I'm trying to calculate the normal for a given function and I'm still a bit lost regarding the process of calculating it, I will put here the steps I believe I have understood so I would appreciate it if you could give me some insight on the subject: given f(x) = sin( x) so i would like to find the tangent  for the point P=(x,sin(x)) i know that the normal line is perpendicular to the tangent line of that function, so first I could calculate the slope of the tangent line of f(x), like so: f'(x) = cos(x) now that I have the slope of the tangent,I could try to find the equation for the tangent line using this: y= m*x +  b , and replacing... y = cos(x) * x + b and to get b, i can do (maybe ? ): sin(x) = cos(x) * x + b so: sin(x) - cos(x) * x = b and going back to the original formula of the tangent line y =  cos(x) * x + sin(x) - cos(x) * x then I end up with y=sin(x) so...I'm clearly doing something wrong. Any help would  be appreciated, thanks!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!