I'm willing to draw a contour around a cylinder.
So far, I could get this one:
The problem is that half of the circular part of the contour should be at the back of the cylinder which is not the case in what I drew.
In other words, I need to be able to see inside the cylinder, similar to this one for the torus case.
My current code is:
\documentclass[class=minimal,border=0pt]{standalone}
\usepackage{pstricks}
\definecolor{light}{rgb}{0.3,0.4,0.6}
\usepackage{pst-3dplot}
\pagestyle{empty}
\begin{document}
\def\radius{4 }\def\height {11}\def\thetaend {45}\def\thetaini {-305}
\begin{pspicture}(-3,-1.5)(-3,10)
\psset{viewpoint=30 0 15 rtp2xyz}
\psCylinder[increment=5]{\radius}{\height}
\pstThreeDEllipse[beginAngle=\thetaini,
endAngle=\thetaend,
linecolor=green,linewidth=1.5pt,
opacity=0.5](0,0,1)(\radius,0,0)(0,\radius,0)
\pstThreeDLine[linecolor=green,linewidth=1.5pt,
opacity=0.5] (2.82,2.82,1)(2.82,2.82,10)
\pstThreeDLine[linecolor=green,linewidth=1.5pt,
opacity=0.5] (2.29,3.27,1)(2.29,3.27,10)
\pstThreeDLine[linecolor=green,linewidth=1.5pt,
opacity=0.5] (2.29,3.27,10)(2.55,3.045,10.1)
\pstThreeDLine[linecolor=green,linewidth=1.5pt,
opacity=0.5] (2.82,2.82,10)(2.55,3.045,10.1)
\end{pspicture}
\end{document}
UPDATED NOTE:
recently, I've changed my code to this one
\documentclass[class=minimal,border=0pt]{standalone}
\usepackage{pstricks}
\definecolor{light}{rgb}{0.3,0.4,0.6}
\usepackage{pst-3dplot}
\usepackage{pst-solides3d}
\usepackage{fp}
\pagestyle{empty}
\def \planeLocRatio {1.0}
\def \radius {0.4}
\def \height {0.6}
\def \a {0.1}
\FPeval{\zcut}{height-a}
\def\thetaend {45}\def\thetaini {-305}
\def \planeLen {1}
\FPeval{\imgsize}{planeLen+1}
\begin{document}
\begin{pspicture}[solidmemory](-\imgsize,-\imgsize)(\imgsize,\imgsize)
% ================== VIEW ===================
\psset{
viewpoint=10 45 20 rtp2xyz,
lightsrc=viewpoint,
%lightintensity=1.25
}
%===================Elliptical arc=======================
\pstThreeDEllipse[
beginAngle=\thetaini,
endAngle=\thetaend,
linecolor=black,
linewidth=1.5pt,
args=0 2 \a 45,
opacity=0.5
](0,0,\a)(0,2,0)(2,0,0) % can't understand why "2" and not \radius!
%===================Cylinder=================
\psSolid[
object=cylindre,
name=myCylinder,
incolor=yellow,
fillcolor=red,
h=\height,
ngrid=90 50,
grid=false,
hue=0.3 1,
r=\radius,
opacity=0.3,
hollow=true,
% intersectiontype=0,
% intersectionplan=0 0 0 \a,
% intersectioncolor=(black),
action=draw**,
](0,0,0)
%=======================Lines=============================
\pstThreeDLine[
linecolor=black,
linewidth=1.5pt,
opacity=0.5
] (0.282,0.282,\a)(0.282,0.282,0.5) %rcos(45), rsin(45)
\pstThreeDLine[
linecolor=black,
linewidth=1.5pt,
opacity=0.5
] (0.229,0.327,\a)(0.229,0.327,0.5)
\pstThreeDLine[
linecolor=black,
linewidth=1.5pt,
opacity=0.5
] (0.229,0.327,0.5)(0.255,0.3045,0.51)
\pstThreeDLine[
linecolor=black,
linewidth=1.5pt,
opacity=0.5
] (0.282,0.282,0.5)(0.255,0.3045,0.51)
\end{pspicture}
\end{document}
with the outcome which it's elliptical arc is wrong.

Removing the "Elliptical arc" section and drawing the intersection plane has better result, but i can not an arc of this circle.
.
Thus, the remained problem is either I need to draw an intersection arc(which I couldn't find any way), or I need to find the error in the "Elliptical arc" part of the code.
Does anyone have a suggestion?

