您能帮我画一个环绕圆柱体的右旋/左旋螺旋吗?下面提供了我的 pstricks 代码,但在我看来,它太大太复杂了。我的目标是使用 pstricks 编写一个精美的 3D 绘图,如附件所示。提前谢谢您。
\documentclass[12pt]{article}
\usepackage{amssymb,amsmath}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{pst-plot,pstricks-add,pst-solides3d,pst-3dplot}
\begin{document}
\psset{xunit=0.05\textwidth, yunit=0.05\textwidth}
\begin{center}
%\begin{pspicture*}[showgrid=bottom,griddots=60](-10,-1)(10,4)
\begin{pspicture*}(-10,-1)(10,4)
%\rput(0,3.75){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{($\textcolor{red!40!black}{i}$)}}}}
%\rput(0,1.25){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{($\textcolor{red!40!black}{ii}$)}}}}
\rput(-2,2.5){
%\psclip{\psellipse*[linecolor=red,rot=-12.606](5,1)(3,4)}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-5,0.5)(9,0.5)
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](9,0)(0.25,0.5){90}{-90}
\psline[linecolor=black, linewidth=0.001\textwidth](9,-0.5)(-5,-0.5)
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){-90}{90}
}
\psline[linecolor=black, linewidth=0.001\textwidth](-5,0.5)(9,0.5)
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](9,0)(0.25,0.5){90}{-90}
\psline[linecolor=black, linewidth=0.001\textwidth](9,-0.5)(-5,-0.5)
\pscustom[fillstyle=solid,fillcolor=gray!2.5,linestyle=none]{
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){0}{360}
}
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){0}{360}
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-3.67,0.5)(-3.40,0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-4.6,-0.5)(-4.33,-0.5)
\rput(4,0){
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-3.67,0.5)(-3.40,0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-4.6,-0.5)(-4.33,-0.5)
}
\rput(8,0){
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-3.67,0.5)(-3.40,0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-4.6,-0.5)(-4.33,-0.5)
}
\rput(12,0){
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-3.67,0.5)(-3.40,0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-4.6,-0.5)(-4.33,-0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!5,linestyle=none]{
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-5}{-4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-4}{-2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-2}{0}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{0}{2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{2}{4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{4}{6}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{6}{8}{0.72*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{8}{9}{0.78*sin(3.141592*x/2)-0.1}
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](9,0.75)(0.04,0.08){-90}{90}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{9}{8}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{8}{6}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{6}{4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{4}{2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{2}{0}{0.72*sin(3.141592*x/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{0}{-2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-2}{-4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-4}{-5}{0.78*sin(3.141592*(x)/2)+0.1}
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-5}{-4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-4}{-2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-2}{0}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{0}{2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{2}{4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{4}{6}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{6}{8}{0.72*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{8}{9}{0.78*sin(3.141592*x/2)-0.1}
\psellipticarc[linewidth=0.0015\textwidth,linecolor=black](9,0.75)(0.04,0.08){-90}{90}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{9}{8}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{8}{6}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{6}{4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{4}{2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{2}{0}{0.72*sin(3.141592*x/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{0}{-2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-2}{-4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-4}{-5}{0.78*sin(3.141592*(x)/2)+0.1}
\pscustom[fillstyle=solid,fillcolor=gray!0,linestyle=none]{
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
}
\psellipticarc[linewidth=0.0015\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-2,-0.5)(-2,-0.55)(-1,-0.55)(-1,0.5)(-1,0.5)(-2,0.5)(-2,0.55)(-3,0.55)(-3,-0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)(-1,0.5)(-3,0.5)(-3,-0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-1,0.5)(-3,0.5)
\rput(4,0){
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-2,-0.5)(-2,-0.55)(-1,-0.55)(-1,0.5)(-1,0.5)(-2,0.5)(-2,0.55)(-3,0.55)(-3,-0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)(-1,0.5)(-3,0.5)(-3,-0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-1,0.5)(-3,0.5)
}
\rput(8,0){
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-2,-0.5)(-2,-0.55)(-1,-0.55)(-1,0.5)(-1,0.5)(-2,0.5)(-2,0.55)(-3,0.55)(-3,-0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)(-1,0.5)(-3,0.5)(-3,-0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-3,-0.5)(-1,-0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-1,0.5)(-3,0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth,arrowscale=1.5, arrowinset=0]{->}(-6.0,-0.75)(-5.125,-0.75)
\psline[linecolor=black, linewidth=0.001\textwidth,arrowscale=1.5, arrowinset=0]{->}(9.125,0.75)(10.0,0.75)
\rput(9.75,0){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{$\mathrm{S}$}}}}
\rput(-5.75,0){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{$\mathrm{N}$}}}}
}
\rput(-2,0){
%\psclip{\psellipse*[linecolor=red,rot=-12.606](5,1)(3,4)}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-5,0.5)(9,0.5)
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](9,0)(0.25,0.5){90}{-90}
\psline[linecolor=black, linewidth=0.001\textwidth](9,-0.5)(-5,-0.5)
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){-90}{90}
}
\psline[linecolor=black, linewidth=0.001\textwidth](-5,0.5)(9,0.5)
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](9,0)(0.25,0.5){90}{-90}
\psline[linecolor=black, linewidth=0.001\textwidth](9,-0.5)(-5,-0.5)
\pscustom[fillstyle=solid,fillcolor=gray!2.5,linestyle=none]{
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){0}{360}
}
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,0)(0.25,0.5){0}{360}
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-1.67,-0.5)(-1.40,-0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-2.6,0.5)(-2.33,0.5)
\rput(4,0)
{
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-1.67,-0.5)(-1.40,-0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-2.6,0.5)(-2.33,0.5)
}
\rput(8,0)
{
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-1.67,-0.5)(-1.40,-0.5)
\psline[linecolor=gray!10, linewidth=0.001\textwidth](-2.6,0.5)(-2.33,0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!5,linestyle=none]{
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-5}{-4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-4}{-2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-2}{0}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{0}{2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{2}{4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{4}{6}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{6}{8}{0.72*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{8}{9}{0.78*sin(3.141592*x/2)-0.1}
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](9,0.75)(0.04,0.08){-90}{90}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{9}{8}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{8}{6}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{6}{4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{4}{2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{2}{0}{0.72*sin(3.141592*x/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{0}{-2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-2}{-4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.001\textwidth]{-4}{-5}{0.78*sin(3.141592*(x)/2)+0.1}
\psellipticarcn[linewidth=0.001\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-5}{-4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-4}{-2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-2}{0}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{0}{2}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{2}{4}{0.72*sin(3.141592*(x)/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{4}{6}{0.78*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{6}{8}{0.72*sin(3.141592*x/2)-0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{8}{9}{0.78*sin(3.141592*x/2)-0.1}
\psellipticarc[linewidth=0.0015\textwidth,linecolor=black](9,0.75)(0.04,0.08){-90}{90}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{9}{8}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{8}{6}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{6}{4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{4}{2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{2}{0}{0.72*sin(3.141592*x/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{0}{-2}{0.78*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-2}{-4}{0.72*sin(3.141592*(x)/2)+0.1}
\psplot[algebraic,plotpoints=500,linecolor=black,linewidth=0.0015\textwidth]{-4}{-5}{0.78*sin(3.141592*(x)/2)+0.1}
\pscustom[fillstyle=solid,fillcolor=gray!0,linestyle=none]{
\psellipticarc[linewidth=0.001\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
}
\psellipticarc[linewidth=0.0015\textwidth,linecolor=black](-5,-0.75)(0.04,0.08){0}{360}
\psline[linecolor=black, linewidth=0.001\textwidth,arrowscale=1.5, arrowinset=0]{->}(-6.0,-0.75)(-5.125,-0.75)
\psline[linecolor=black, linewidth=0.001\textwidth,arrowscale=1.5, arrowinset=0]{->}(9.125,0.75)(10.0,0.75)
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.75,0.5)(-3.75,0.55)(-3.25,0.55)(-3.25,-0.5)(-4.25,-0.5)(-4.25,-0.55)(-4.7,-0.55)(-4.7,0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)(-3.25,-0.5)(-4.7,-0.5)(-4.7,0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-3.25,-0.5)(-4.7,-0.5)
\rput(4,0)
{
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.75,0.5)(-3.75,0.55)(-3.25,0.55)(-3.25,-0.5)(-4.25,-0.5)(-4.25,-0.55)(-4.7,-0.55)(-4.7,0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)(-3.25,-0.5)(-4.7,-0.5)(-4.7,0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-3.25,-0.5)(-4.7,-0.5)
}
\rput(8,0)
{
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.75,0.5)(-3.75,0.55)(-3.25,0.55)(-3.25,-0.5)(-4.25,-0.5)(-4.25,-0.55)(-4.7,-0.55)(-4.7,0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)(-3.25,-0.5)(-4.7,-0.5)(-4.7,0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-3.25,-0.5)(-4.7,-0.5)
}
\rput(12,0)
{
\pscustom[fillstyle=solid,fillcolor=white,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.75,0.5)(-3.75,0.55)(-3.25,0.55)(-3.25,-0.5)(-4.25,-0.5)(-4.25,-0.55)(-4.7,-0.55)(-4.7,0.5)
}
\pscustom[fillstyle=solid,fillcolor=gray!10,linestyle=none]{
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)(-3.25,-0.5)(-4.7,-0.5)(-4.7,0.5)
}
\psline[linecolor=black, linewidth=0.001\textwidth](-4.7,0.5)(-3.25,0.5)
\psline[linecolor=black, linewidth=0.001\textwidth](-3.25,-0.5)(-4.7,-0.5)
}
\rput(9.75,0){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{$\mathrm{N}$}}}}
\rput(-5.75,0){{\psscalebox{1}{\psframebox[framesep=0.005\textwidth,linestyle=none]{$\mathrm{S}$}}}}
}
\end{pspicture*}
\end{center}
\end{document}
答案1
对象“cylindrecreux”是无用的,您可以直接使用对象“cylindre”。这是一个略微改进的版本。
\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-7,-5)(7,5)
\psset{viewpoint=100 60 20 rtp2xyz,Decran=100,lightsrc=viewpoint,solidmemory}
\psframe(-7,-5)(7,5)
% helix R
\codejps{/a 1 def}% radius
\defFunction[algebraic]{HR}(t)
{a*cos(2*t)}
{2*t}
{-a*sin(2*t)}
% function derivatives (optional)
\defFunction[algebraic]{HR'}(t)
{-2*a*sin(2*t)}
{2}
{-2*a*cos(2*t)}
\psSolid[object=cylindre,
h=20,r=0.5,RotX=90,
fillcolor=gray,action=none,
name=C1,fcol=1 (cyan),
ngrid=36 36](0,10,0)
\psSolid[object=courbe,
range=-5 5,% radians
ngrid=72 12,
function=HR,
fillcolor=red,
fcol=1 (yellow),
action=none,name=H1,
r=0.2]%
\psSolid[object=fusion,grid,base=H1 C1]
\psSolid[object=plan,definition=normalpoint,
args={0 10 0 [0 1 0]},name=P,action=none]
\psProjection[object=cercle,
plan=P,
args= 0 0 0.5,
range=0 360]
\psSolid[object=plan,action=none,
definition=solidface,args=H1 1,name=p1]
\psProjection[object=cercle,
plan=p1,
args= 0 0 0.2,
range=0 360]
\end{pspicture}
\begin{pspicture}(-7,-5)(7,5)
\psset{viewpoint=100 60 20 rtp2xyz,Decran=100,lightsrc=viewpoint,solidmemory}
\psframe(-7,-5)(7,5)
% helix
\codejps{/a 1 def}% radius
\defFunction[algebraic]{HL}(t)
{a*cos(2*t)}
{2*t}
{a*sin(2*t)}
% function derivatives (optional)
\defFunction[algebraic]{HL'}(t)
{-2*a*sin(2*t)}
{2}
{2*a*cos(2*t)}
\psSolid[object=cylindre,
h=20,r=0.5,RotX=90,
fillcolor=gray,action=none,
name=C1,fcol=1 (cyan),
ngrid=36 36](0,10,0)
\psSolid[object=courbe,
range=-5 5,% radians
ngrid=72 12,
function=HL,
fillcolor=red,
fcol=1 (yellow),
action=none,name=H1,
r=0.2]%
\psSolid[object=fusion,grid,base=H1 C1]
\psSolid[object=plan,definition=normalpoint,
args={0 10 0 [0 1 0]},name=P,action=none]
\psProjection[object=cercle,
plan=P,
args= 0 0 0.5,
range=0 360]
\psSolid[object=plan,action=none,
definition=solidface,args=H1 1,name=p1]
\psProjection[object=cercle,
plan=p1,
args= 0 0 0.2,
range=0 360]
\end{pspicture}
\end{document}
答案2
以下是使用 PSTricks 绘制示例的方法
\documentclass[pstricks]{standalone}
\usepackage{pst-solides3d}
\begin{document}
\begin{pspicture}(-7,-5)(7,5)
\psset{viewpoint=100 60 20 rtp2xyz,Decran=100,lightsrc=viewpoint,solidmemory}
\psframe(-7,-5)(7,5)
% helix R
\codejps{/a 1 def}% radius
\defFunction[algebraic]{HR}(t)
{a*cos(2*t)}
{2*t}
{-a*sin(2*t)}
% function derivatives (optional)
\defFunction[algebraic]{HR'}(t)
{-2*a*sin(2*t)}
{2}
{-2*a*cos(2*t)}
\psSolid[object=cylindrecreux,
h=20,r=0.5,RotX=90,
fillcolor=gray,action=none,
name=C1,
ngrid=36 36](0,10,0)
\psSolid[object=courbe,
range=-5 5,% radians
ngrid=72 12,
function=HR,
fillcolor=red,
action=none,name=H1,
r=0.2]%
\psSolid[object=fusion,grid,base=H1 C1]
\composeSolid
\end{pspicture}
\begin{pspicture}(-7,-5)(7,5)
\psset{viewpoint=100 60 20 rtp2xyz,Decran=100,lightsrc=viewpoint,solidmemory}
\psframe(-7,-5)(7,5)
% helix
\codejps{/a 1 def}% radius
\defFunction[algebraic]{HL}(t)
{a*cos(2*t)}
{2*t}
{a*sin(2*t)}
% function derivatives (optional)
\defFunction[algebraic]{HL'}(t)
{-a*sin(2*t)}
{2}
{a*cos(2*t)}
\psSolid[object=cylindrecreux,
h=20,r=0.5,RotX=90,
fillcolor=gray,action=none,
name=C1,
ngrid=36 36](0,10,0)
\psSolid[object=courbe,
range=-5 5, % radians
ngrid=72 12,
function=HL,
fillcolor=red,
action=none,name=H1,
r=0.2]%
\psSolid[object=fusion,grid,base=H1 C1]
\composeSolid
\end{pspicture}
\end{document}