Re: Re: Surface Normal

• To: mathgroup at smc.vnet.net
• Subject: [mg55226] Re: [mg55195] Re: Surface Normal
• From: DrBob <drbob at bigfoot.com>
• Date: Thu, 17 Mar 2005 03:28:53 -0500 (EST)
• References: <d15s2g\$9k2\$1@smc.vnet.net> <200503161036.FAA23841@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Or:

f[u_, v_] := {5 Cos[u] (Cos[v] + 2), 5 Sin[u] (Cos[v] + 2), 5 Sin[v]};
df[u_, v_] = FullSimplify[Cross @@ Transpose@D[f[u, v], {{u, v}}]];
DisplayTogether[
ParametricPlot3D[f[u, v], {u, 0, 2*Pi}, {v, 0, 2*Pi}],
Graphics3D[Table[Line[{f[u, v], f[u, v] +
0.1*df[u,
v]}], {u, 0, 2*Pi, (2*Pi)/20}, {v, 0, 2*Pi, (2*Pi)/20}]]];

Bobby

On Wed, 16 Mar 2005 05:36:22 -0500 (EST), Steve Luttrell <steve_usenet at _removemefirst_luttrell.org.uk> wrote:

> You need to compute the cross product of the derivatives of your parametric
> surface w.r.t. the parameters.
>
> Define your parametric surface (a torus).
>
> f[u_, v_] := {(10 + 5*Cos[v])*Cos[u], (10 + 5*Cos[v])*Sin[u], 5*Sin[v]};
>
> Compute the derivatives w.r.t. parameters and form the cross product.
>
> df[u_, v_] = Simplify[Cross[D[f[u, v], u], D[f[u, v], v]]]
>
>     {25*Cos[u]*Cos[v]*(2 + Cos[v]), 25*Cos[v]*(2 + Cos[v])*Sin[u], 25*(2 +
> Cos[v])*Sin[v]}
>
> Plot the parametric surface.
>
> g1 = ParametricPlot3D[f[u, v], {u, 0, 2*Pi}, {v, 0, 2*Pi}];
>
> Plot a field of surface normals.
>
> g2 = Show[Graphics3D[Table[Line[{f[u, v], f[u, v] + 0.1*df[u, v]}], {u, 0,
> 2*Pi, (2*Pi)/20},
>       {v, 0, 2*Pi, (2*Pi)/20}]]];
>
> Display the above two plots together.
>
> Show[g1,g2];
>
> Steve Luttrell
>
> <gouqizi.lvcha at gmail.com> wrote in message news:d15s2g\$9k2\$1 at smc.vnet.net...
>> Hi, All:
>>
>> If I have a surface in parametric form
>>
>> For example,
>> x = (10 + 5cosv)cosu
>> y = (10 + 5cosv)sinu
>> z = 5sinv
>>
>> How can I quickly calculate its normal for any (u,v) by mathematica
>>
>> Rick
>>
>
>
>
>
>

--
DrBob at bigfoot.com

```

• References:
• Prev by Date: Re: J/Link problem on Mac OS X
• Next by Date: Re: Interaction of Sum/Plus and KroneckerDelta
• Previous by thread: Re: Surface Normal
• Next by thread: Re: Surface Normal