How to refine the code to draw the midsphere of a regular tetrahedron? #335
Answered
by
pfradin
Explorer-cc
asked this question in
Q&A
Answered by
pfradin
Sep 15, 2026
Replies: 4 comments 7 replies
1 reply
5 replies
Answer selected by
Explorer-cc
|
For comparsion, I would add a POV-Ray version with my previous comment #335 (reply in thread) \documentclass{standalone}
\usepackage[3d]{luadraw}
\usepackage[svgnames]{xcolor}
\usepackage{fourier-otf}
\newcommand{\povball}[2]{g:Pov_sphere(pt3d.M(#1,0,0),1.5,{color=ld.Magenta,opacity=#2,shadow=false})}
\begin{document}
\begin{luadraw}{name=opacity-balls}
local ld = luadraw
local pt3d = ld.pt3d
local g = ld.graph3d:new{
window3d={-10,10,-2.5,2,-2,2},window={-10,10,-2.5,2},
viewdir="xOy",size={15,3.375}
}
require "luadraw_povray"
g:Pov_new()
\povball{-8}{0.05}
\povball{-4}{0.25}
\povball{0}{0.5}
\povball{4}{0.75}
\povball{8}{1}
g:Pov_exec()
g:Pov_show()
local Z = ld.cpx.Z
g:Dlabel(
"opacity=0.05",Z(-8,-1.65),{pos="S"},
"opacity=0.25",Z(-4,-1.65),{pos="S"},
"opacity=0.5",Z(0,-1.65),{pos="S"},
"opacity=0.75",Z(4,-1.65),{pos="S"},
"opacity=1",Z(8,-1.65),{pos="S"}
)
g:Show()
\end{luadraw}
\end{document}
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment












The real difference between the two groups is transparency. With a completely opaque sphere, here is what I would do: