POV-Ray : Newsgroups : povray.newusers : normal of function : normal of function Server Time
4 Nov 2024 19:17:34 EST (-0500)
  normal of function  
From: Elias Pschernig
Date: 27 Oct 2001 15:16:25
Message: <3bdb0809@news.povray.org>
This is maybe a very simple question for some, but I had no luck finding
the answer with google, so I try it here: If I have a function of 2
variables, what is the 'normal vector' for a given point (x, y)?

e.g. f(x, y) = x ^ 2 * y

What is the normal vector at (1, 1) ?

I still remember from university that f'x(x, y) = 2 * x * y and
f'y(x, y) = x ^ 2. At (1, 1) this would give me f'x = 2 and f'y = 1 - but
from there on I'm lost..

If someone wonders why I need this, I asked here some time ago about how to
create normals for a mesh, and it worked quite well by taking near vertices
and building the cross product. I looked at the file for it again, and I
thought for mathematical created meshes it should be possible to directly
calculate the normal vector.

Thanks for any info

-- 
#macro C(X,Y)cylinder{X*x<X,0,-Y/2>.1}#end#macro U(R,X,Y)intersection{torus{.9
.1}box{-1 0rotate y*R*90}translate<X,0,Y>scale 1-z*.5}#end union{U(0,0,0)U(1,0
,0)U(2,-1,-1)U(1,1,0)U(1,1.5,-3)U(1,2,0)U(3,1,0)U(2,2,0)U(0,3,0)U(3,2,.5)C(.1,
2)C(.8,1)C(.8,-1)C(1.1,1)C(1.9,-1)pigment{rgb 10}rotate x*90translate<-1,0,4>}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.