lost1 said:
hi,
given a unit normal (nx,ny,nz) to a surface, the two tangent vectors
are: s = (-ny+nz, nz-nz, -nx+ny) and t = n x s (with s, t normalized).
now, if nx=ny=nz, then s & t become trivial.
how do i find these tangent vectors for this special case?
thanks alot.
I'm not exactly sure of what you're asking, but it seems that if you have a surface with normal (nx,ny,nz) such that nx=ny=nz, let a = nx, and you can express you normal as (a,a,a). The vectors tangent to this surface should also be tangent to the plane with normal (a,a,a). It shouldn't be hard to figure out two vectors that would lie on this plane. You should be able to see easily that there is some b such that the points (b,0,0), (0,b,0), and (0,0,b) lie on the plane, so the vectors (b,-b,0) and (0,b,-b) are acceptable candidates for your tangent vectors.
You can express the plane with a cartesian equation:
ax + ay + az + d = 0.
Knowing (a,a,a) lies on the plane, d = -3a². Now:
ab + a(0) + a(0) - 3a² = 0.
b = 3a
So, you can choose your tangent vectors to be:
s = (3nx,-3nx,0) and t = (0,3nx,-3nx). [or replace x with y or z ... or anything other than zero]
Of course, you can simplify this further and choose instead:
u = (1,-1,0) and v = (0,1,-1)