Dear all and dear Roger,
Thanks for your previous posting ...
it has been really helpful, everything works perfectly now.
However, a new question come into my mind. ...It is pretty hard to
explain, but I'll try to be clear.
What about if I want to compute the surface tangent pointing from
point P toward a generic point Pext? If P=3D[x,y,z] is a mesh point, C=3D
[x0,y0,z0] is the center of mass and N is the surface normal at point
P. Pext =3D[x_ext,y_ext,z_ext] is a generic point in the space. Pext is
NOT a point of the mesh. I' m interested in computing the surface
tangent pointing from P toward the projection of Pext on the tangent
PLANE (at point P).In other words:
I guess I should first compute the surface tangent plane where point
P belongs,
next I should compute the projection (let's denote it as P2) of point
Pext into the tangent plane,
finally the tangent I am interested in should be something like the
segment P2P.
Am I right?
Do you have any suggestions about how to code this in matlab?
Thanks.
Best Regards
Antonietta
On Jan 20, 6:27=A0pm, "Roger Stafford"
<ellieandrogerxy...@mindspring.com.invalid> wrote:
> antonietta<mangome...@gmail.com> wrote in message <de7daa1b761844b98a0=
1b52355ab1...@r36g2000prf.googlegroups.com>...
>
> > I=3DB4m interested to compute thetangentnormal of a 3Dmeshat each
> > vertex given the normals.
>
> > I have amesh, the coordinate of its center of mass and for each its
> > vertex I have already the normals. At each vertex I=3DB4m interested to
> > compute thetangentvector pointing toward the center of mass of the
> >mesh.
>
> > Any suggestions would be appreciated.
>
> =A0 At any point P=3D[x,y,z] with C=3D[x0,y0,z0] the center of mass, if N=
is the normal vector and CP the vector pointing to the center of mass fro=
m P, then
>
> =A0cross(cross(N,CP),N)
>
> will be in the direction of the surfacetangenttoward the center of mass. =
=A0You will probably want to normalize it to a unit vector by dividing it b=
y its magnitude. =A0This works except in those cases where N points directl=
y to the center of mass, in which case thetangentdirection would be inheren=
tly indeterminate.
>
> =A0 Look up 'cross' in the documentation to apply it to yourmeshof points=
in a vectorized manner.
>
> Roger Stafford
