\chapter{3D Drawing}

\begin{center}
\captionof{figure}{Saddle point at $M(0,0,0)$ ($z=x^2-y^2$)}\label{pointcol}\par
\begin{luadraw}{name=point_col}
local ld = luadraw
local pt3d = ld.pt3d
local Origin, vecI, vecJ, vecK, M = pt3d.Origin, pt3d.vecI, pt3d.vecJ, pt3d.vecK, pt3d.M

local g = ld.graph3d:new{window3d={-2,2,-2,2,-4,4}, window={-3.5,3,-5,5}, size={8,9,0}, viewdir={120,60}}
local S = ld.cartesian3d(function(u,v) return u^2-v^2 end, -2,2,-2,2,{20,20}) -- surface of equation z=x^2-y^2
local Tx = g:Intersection3d(S, {Origin,vecI}) --intersection of S with the yOz plane
local Ty = g:Intersection3d(S, {Origin,vecJ}) --intersection of S with the xOz plane
g:Dboxaxes3d({grid=true,gridcolor="gray",fillcolor="LightGray",drawbox=true})
g:Dfacet(S,{mode=ld.mShadedOnly,color="ForestGreen"}) -- surface drawing
g:Dedges(Tx, {color="Crimson", hidden=true, width=8}) -- intersection with yOz
g:Dedges(Ty, {color="Navy",hidden=true, width=8}) -- intersection with xOz
g:Dpolyline3d( {M(2,0,4),M(-2,0,4),M(-2,0,-4)}, "Navy,line width=.8pt")
g:Dpolyline3d( {M(0,-2,4),M(0,2,4),M(0,2,-4)}, "Crimson,line width=.8pt")
g:Show()
\end{luadraw}
\end{center}


\input{body-en/luadraw-doc3d-en-section-1-Introduction.tex}%
\input{body-en/luadraw-doc3d-en-section-2-The-pt3d-Class.tex}%
\input{body-en/luadraw-doc3d-en-section-3-Graphics-Methods.tex}%
\input{body-en/luadraw-doc3d-en-section-4-Faceted-Solids.tex}%
\input{body-en/luadraw-doc3d-en-section-5-Dscene3d-Method.tex}%
\input{body-en/luadraw-doc3d-en-section-6-Geometric-Constructions.tex}%
\input{body-en/luadraw-doc3d-en-section-7-Matrix-Calculus-Transformations-Some-Mathematical-Functions.tex}%
\input{body-en/luadraw-doc3d-en-section-8-More-Advanced-Examples.tex}%
