kill(all)$

maxima : appendix : 1D,2D delaunay triangulation ,version 1.0
peter.vlasschaert@gmail.com ,16/04/2021

------------------------------------------------------------------------------------------------------------------------------------------------

ref :computational geometry in C ,SECOND EDITION
       Joseph  O'Rourke
       Camebrige .
========================================
5.7.1 pages :182→187,187 .......
========================================

------------------------------------------------------------------------------------------------------------------------------------------------

use : python : finite element and build applications python.
rem : connection between Delaunay &  Voronoi Diagrams.

mywebsite :       https://petervlaschemeng.weebly.com/

f(x),z=f(x,y) : tangent line,normal line,tangent plane.
==========================================

12e) how construct f(x),tangent line @ normal line (2d)
new: 20/03/2020:Calculus : How to construct : z=f(x,y), tangent plane,tangent line,version 1.0,part1.
download  (Maxima,code)       :maximaffxytangentplandlineversion1finalpart1
download  (Maxima,png)         :maximaffxytangentplandlineversion1finalpart1outp

13e) how construct z=f(x,y),tangent plane @ normal line(3d)
new:21/03/2020:Calculus : How to construct : z=f(x,y), tangent plane,tangent line,version 1.0,part2.
ref : 3d graphics maxima
download  (Maxima,code)       :maximaffxytangentplandlineversion1finalpart2
download  (Maxima,png)         :maximaffxytangentplandlineversion1finalpart2outp

14e) how construct z=f(x,y),tangent plane @ normal line(3d,concept =gradient)
new: 27/03/2020:Calculus : How to construct : z=f(x,y), tangent plane,tangent line,version 1.0a,part3.
download  (Maxima,code)       :maximaffxytangentplandlineversion1finalpart3a
download  (Maxima,png)         :maximaffxytangentplandlineversion1finalpart3aoutp

------------------------------------------------------------------------------------------------------------------------------------------------------

load(lrats)$ ratprint:false$

assume(a>0,b>0,r>0);

2D version.
----------------

p1:z=2*a*x+2*b*y-a^2-b^2+r^2;/*tangent plane @ point(a,b) when r=0 */
p2:z=x^2+y^2;                /* paraboloid :origin(0,0)   */

rem :reduction 2D to 1D  => tangent plane to tangent  line.
r≠0 , translation of tangent plane in positiv z direction

s:solve([p1,p2],[x,y]);

p3:s[1];

p3a:s[2];

check :solution

p4:ratsimp(lratsubst(p3,p2));

p4a:ratsimp(lratsubst(p3a,p2));

p5:is(p4);
p5a:is(p4a);

question :  p1 'tangent plane ' ?
-------------------------------------------

definition plane : A*x+B*y+C*z+D = 0, we need three points to get plane

→ plane : connected paraboloid @ (a,b), r=0

1e) step  'definition'
----------------------------

q1a: A*x+B*y+C*z+D = 0;

2e) step  'r=0' ,tangent plane ,p1
-------------------------------------------

q1b:subst([r=0],p1);

3e)  plane :find A,B,C,D
----------------------------------

q1c:(rhs(q1b)-lhs(q1b)=0)*(-1);

qca:A =lhs(diff(q1c,x));
qcb:B =lhs(diff(q1c,y));
qcc:C =lhs(diff(q1c,z));
qcd:D =lhs(lratsubst([x=0,y=0,z=0],q1c));

1D ,version
=========

p5:lratsubst([b=0,y=0],p1);
p5a:lratsubst([b=0,y=0],p2);

use :p3 →  ' 2D problem above '

s1:lratsubst([b=0,z=x^2],p3[1]);

s1a:solve(s1,x);

use:p3a → '2D problem above'

s2:lratsubst([b=0,z=x^2],p3a[1]);

s2a:solve(s2,x);

deduction 1D from  2D
--------------------------------

use :q1a

definition plane : A*x+B*y+D = 0, we need two points to get line (b=0,C=0)

q1d:lratsubst([z=0,b=0],q1a);

find :A,B,D
----------------

q1da:qca;
q1db:subst([b=0],qcb);
q1dc:lratsubst([x=0,y=0,z=0,b=0],qcd);

Because :use of equation plane to get tangent line (see:p2)

q2a:subst([y=0],p2);

rem z =f(x)

result :tangent line to parabola (q2a), don't forget multiplied (-1)

q2b:lhs(q2a)=lratsubst([y=0,q1da,q1dc],lhs(q1d))*(-1);/*tangent line @a on q2a */

check :easy x=a point tangent line and parabola

q2c:subst([x=a],q2b);/* tangent line */

q2c1:subst([x=a],q2a); /* parabola */

result :

is(rhs(q2c)=rhs(q2c1));