Build a surface normal vector (I use Mathematica)

Click For Summary
SUMMARY

The discussion focuses on computing the surface normal vector using Mathematica, specifically through the expression $$n.S = \frac{(-1+\cos(c s))}{c^2} \sin(c s) \neq 0$$. The user defines parametric equations for a surface in terms of variables \(s\), \(\alpha\), and \(\phi\), and utilizes the Cross and D functions to derive the normal vector. The issue arises from an incorrect application of the dot product, which should not yield zero except in specific cases, such as rare spheres.

PREREQUISITES
  • Familiarity with Mathematica syntax and functions
  • Understanding of parametric equations in three-dimensional space
  • Knowledge of vector calculus, specifically cross products and dot products
  • Basic trigonometric identities and their applications
NEXT STEPS
  • Explore Mathematica's documentation on the Cross and D functions
  • Study the derivation of surface normals in vector calculus
  • Learn about parametric surfaces and their properties
  • Investigate common pitfalls in vector calculations in Mathematica
USEFUL FOR

Mathematicians, physicists, and engineers working with surface modeling and vector calculus in Mathematica, as well as students seeking to understand surface normal computations.

member 428835
Homework Statement
Given ##r(s) = \sin(c s)/c## we define the surface ##S = \langle r(s) \cos(\phi), r(s) \sin(\phi), (1 - \cos(cs))/c \rangle##. Compute a normal vector ##n## to ##S##.
Relevant Equations
a surface normal is found for a parametric surface ##S(s,\phi)## via ##n = d_sS \times d_\phi S##
Not HW, but seems to fit here.

I compute $$n.S = \frac{(-1+\cos(c s))}{c^2} \sin(c s) \neq 0$$

I use the following in Mathematica:

Code:
r[s_, \[Alpha]_] := Sin[Cos[\[Alpha]] s]/Cos[\[Alpha]]
z[s_, \[Alpha]_] := (1 - Cos[Cos[\[Alpha]] s])/Cos[\[Alpha]]
x[s_, \[CurlyPhi]_, \[Alpha]_] := r[s, \[Alpha]] Cos[\[CurlyPhi]]
y[s_, \[CurlyPhi]_, \[Alpha]_] := r[s, \[Alpha]] Sin[\[CurlyPhi]]
z[s_, \[CurlyPhi]_, \[Alpha]_] := z[s, \[Alpha]]
S[s_, \[CurlyPhi]_, \[Alpha]_] := {x[s, \[CurlyPhi], \[Alpha]],
  y[s, \[CurlyPhi], \[Alpha]], z[s, \[CurlyPhi], \[Alpha]]}
Cross[D[S[s, \[CurlyPhi], \[Alpha]], s],
   D[S[s, \[CurlyPhi], \[Alpha]], \[CurlyPhi]]].S[
   s, \[CurlyPhi], \[Alpha]] // FullSimplify

If you copy-paste this you should get the same output, where ##c = \cos(\alpha)##. What am I doing wrong? What is ##n##? Any help is greatly appreciated!
 
Physics news on Phys.org
My mistake! Unsure why I was taking that final dot product: it obviously should not be zero except for rare spheres!
 

Similar threads

Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
Replies
46
Views
7K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
2K
  • · Replies 43 ·
2
Replies
43
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K