From: rusin@vesuvius.math.niu.edu (Dave Rusin) Newsgroups: sci.math Subject: Re: Looking for 3D transformation resources Date: 21 Apr 1998 21:31:29 GMT In article <6gv38j\$39p\$1@nnrp1.dejanews.com>, wrote: >I am trying to generate coordinates for the surface of a toroidial treifoil >knot. My big hurdle is how to generate coordinates at a cross sectional >slice. > >The problem I am looking to solve is: >Given a normal N, Ai+Bj+Ck, at a point x0,y0,z0 I know that the plane is >defined as (x,y,z) such that A(x-x0) + B(y-y0) + C(z-z0) = 0. This however, >to me, suggests a z=f(grid over x & y) mapping, which is not conducive to a >circular cross section. Is this then what you want: given a parameterization (x,y,z) = F(t) of the underlying knot, you know that at each point F(t) the vector F'(t) is tangent to the curve. Now let v(t) be any vector at each point which is not parallel to F'(t) -- for example, in your setting you can probably select a point p not on the curve (perhaps the center of your picture) and use v(t) = F(t) - p. Then you can project v to the normal plane at each point (i.e. let v2 = v - (/)F' ) and scale to get a unit vector (i.e. let v3=v2/||v2||). You can then get an orthonormal basis for the normal plane by using cross-products (let v4 = v3 x (F'/||F'||) ). Then you have a parameterization for the circle in the normal plane at each point: cos(u) v3(t) + sin(u) v4(t). Letting t vary as well will give you your surface. dave