%D \module %D [ file=m-three, %D version=2017.11.08, %D title=\CONTEXT\ Extra Modules, %D subtitle=\METAPOST\ pseudo-3D module support, %D author=Hans Hagen and Alan Braslau, %D date=\currentdate, %D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. \unprotect \defineMPinstance [three] [\s!format=metafun, \s!extensions=\v!yes, \s!initializations=\v!yes, \c!method=\s!double] \startMPdefinitions{three} loadmodule "tres" ; \stopMPdefinitions \protect \continueifinputfile{m-three.mkiv} %D We put this test here as in \type {meta-tex.mkiv} it would abort due to redefinition %D of namespaces. \starttext %D Alan: we need to make a fill example: \startMPpage[instance=three] path f ; f := ( projection Origin -- projection (1,0,0) -- projection (1,1,0) -- projection (0,1,0) -- projection (0,1,1) -- projection (1,1,1) -- projection (1,0,1) -- projection (0,0,1) -- cycle ) scaled 5cm ; fill f withcolor "darkred" ; path p ; p := ( projection Origin -- projection (1,0,0) -- projection (1,1,0) -- projection (0,1,0) -- projection (0,1,1) -- projection (1,1,1) -- projection (1,0,1) -- projection (0,0,1) -- cycle ) scaled 5cm ; draw p withcolor .5white ; for i=0 upto length p : draw point i of p withpen currentpen scaled 2mm withcolor "lightblue" ; endfor ; \stopMPpage \stoptext