<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Lester,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Try xarrows().</p>
<p style="margin-top:0;margin-bottom:0">At the end of your code, add:</p>
<pre style="font-family: Monospaced;"><span style="color:rgb(100,174,100);font-style:italic;">// Compute normals to surface</span>
<span style="color:rgb(74,85,219);">[</span>x1,y1,z1<span style="color:rgb(74,85,219);">]</span><span style="color:rgb(92,92,92);">=</span>surfnorm<span style="color:rgb(74,85,219);">(</span>x,y,z<span style="color:rgb(74,85,219);">)</span>;
sf <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(188,143,143);">0.2</span>; <span style="color:rgb(100,174,100);font-style:italic;">// arrows scale factor</span>
x1 <span style="color:rgb(92,92,92);">=</span> sf<span style="color:rgb(92,92,92);">*</span>x1 <span style="color:rgb(92,92,92);">+</span> x;
y1 <span style="color:rgb(92,92,92);">=</span> sf<span style="color:rgb(92,92,92);">*</span>y1 <span style="color:rgb(92,92,92);">+</span> y;
z1 <span style="color:rgb(92,92,92);">=</span> sf<span style="color:rgb(92,92,92);">*</span>z1 <span style="color:rgb(92,92,92);">+</span> z;
<span style="color:rgb(100,174,100);font-style:italic;">// Plot normal vectors to surface</span>
<span style="color:rgb(50,185,185);">xarrows</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">[</span>x<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span>;x1<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span><span style="color:rgb(74,85,219);">]</span>,<span style="color:rgb(74,85,219);">[</span>y<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span>;y1<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span><span style="color:rgb(74,85,219);">]</span>,<span style="color:rgb(74,85,219);">[</span>z<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span>;z1<span style="color:rgb(74,85,219);">(</span><span style="color:rgb(255,170,0);">:</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(92,92,92);">'</span><span style="color:rgb(74,85,219);">]</span>,<span style="color:rgb(92,92,92);">-</span><span style="color:rgb(188,143,143);">1</span>,<span style="color:rgb(188,143,143);">2</span><span style="color:rgb(74,85,219);">)</span></pre>
<div><br>
</div>
Regards,
<div>Rafael
<div style="color: rgb(0, 0, 0);">
<div>
<div class="x_gmail_extra"><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>