Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualTournicoti

Posted 05 April 2013 - 10:16 PM

Hello

 

f0 to f5 must be normalized before averaging them to get v0Normal.

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

( according to the cross product properties, the norm of f0 is 2x the area of the triangle (v0,v1,v2) )

 

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f1+f2+f3+f4+f5)/6

should work better

 

I noticed a confusion between your formulas and your scheme, for example according to your scheme f0 should be the normal of the triangle (v0,v1,v6), not (v0,v1,v2). Hoping this is just wrong typo ?


#9Tournicoti

Posted 05 April 2013 - 01:19 PM

Hello

 

f0 to f5 must be normalized before averaging them to get v0Normal.

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

( according to the cross product properties, the norm of f0 is the area of the triangle (v0,v1,v2) )

 

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f1+f2+f3+f4+f5)/6

should work better

 

I noticed a confusion between your formulas and your scheme, for example according to your scheme f0 should be the normal of the triangle (v0,v1,v6), not (v0,v1,v2). Hoping this is just wrong typo ?


#8Tournicoti

Posted 05 April 2013 - 10:48 AM

Hello

 

f0 to f5 must be normalized before averaging them to get v0Normal.

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

( according to the cross product properties, the norm of f0 is the area of the triangle (v0,v1,v2) )

 

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f1+f2+f3+f4+f5)/6

should work better


#7Tournicoti

Posted 05 April 2013 - 10:46 AM

f0 to f5 must be normalized before averaging them to get v0Normal. Is it what you do ?

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

 

( according to the cross product properties, the norm of f0 is the area of the triangle (v0,v1,v2) )

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f1+f2+f3+f4+f5)/6

should work better


#6Tournicoti

Posted 05 April 2013 - 10:35 AM

f0 to f5 must be normalized before averaging them to get v0Normal. Is it what you do ?

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f1+f2+f3+f4+f5)/6

should work better


#5Tournicoti

Posted 05 April 2013 - 10:35 AM

f0 to f5 must be normalized before averaging them to get v0Normal. Is it what you do ?

 

Even if the points are aligned on x and z axes, the triangles have generally differents areas, so the norms of f0 to f5 are generally not the same.

f0=normalize(crossProduct(v1-v0,v2-v0))
.
.
.

v0Normal=(f0+f2+f3+f4+f5)/6

should work better


PARTNERS