I'm new to luadraw and I'm trying to recreate the diagram below:
Here is my code so far, and the result:
% !TEX TS-program = LuaLaTeX
\documentclass{standalone}
\usepackage[3d]{luadraw}
\begin{document}
\begin{luadraw}{name=wedge}
local a, b, c = 8, 6, 4
local xmax, ymax, zmax = a+1, b+1, c+1
local g = graph3d:new{
window3d = {0,xmax,0,ymax,0,zmax},
viewdir = {30,60},
size={10,10,0}
}
local xIntcpt, yIntcpt, zIntcpt = M(a,0,0), M(0,b,0), M(0,0,c)
local P = M(4,0,0)
local Q = interDD({P,vecJ},{xIntcpt,yIntcpt-xIntcpt})
local R = interDD({P,vecK},{xIntcpt,zIntcpt-xIntcpt})
g:Dscene3d(
g:addPolyline({
{Origin,xmax*vecI},
{Origin,ymax*vecJ},
{Origin,zmax*vecK},
}),
g:addPolyline(
{xIntcpt,yIntcpt,zIntcpt},
{close=true,color="cyan"}),
g:addFacet(
{P,Q,R},
{color="cyan",opacity=0.5}
),
g:addPolyline(
{P,Q,R},
{close=true,color="cyan",style="dashed"}
),
g:addLabel(
"\\(x\\)",P,{pos="NW",dist=0.1},
a,xIntcpt,{pos="NW",dist=0.1},
b,yIntcpt,{pos="N",dist=0.1},
c,zIntcpt,{pos="NW",dist=0.1}
)
)
g:Show()
\end{luadraw}
\end{document}
The issue, as you can see, is that the point (0,6,0) is out of frame. I tried increasing ymax, that seems to have no effect. I tried changing the width in the size option, but that only stretches the diagram horizontally. I have tried different viewdir options, but they all cut the diagram off at one edge.
I'm sure it's something basic that I'm missing, but I'm too much of a novice to notice. Any clues?




