# Problem with visibility and compilation for pstricks figure

I have been trying to find the solution to get my code to compile, which has an error message similar to this one.

In his example, he was giving the wrong number of dimensions for one of his objects. However, in my example, the problem is between two almost identical lines of code.

Here is a minimal working example in which commenting the second point object makes the point A appear, and removing the comment makes the image vanish:

\documentclass{article}
\usepackage{pst-solides3d}
\usepackage{fp}

\FPeval{\a}{2}
\FPeval{\b}{2}

\begin{document}
\begin{pspicture}[solidmemory](-4,-4)(10,10)
% ================== POINTS ==================
% Doesn't show unless point B is not included
\psSolid[object=point,args=0 0 \a, name=A, text=A, pos=uc]
% Remove this and the first point appears
\psSolid[object=point,args=0 \b \a, name=A, text=B, pos=uc]
\end{pspicture}
\end{document}


The only difference between these two is \b as the y input.
They are both points with 3 xyz coordinates so it's not a dimension error.

Does anyone know why this would be occuring?

This is the error output:

Error: /typecheck in --mul--
Operand stack:
xObservateur   --nostringval--   0.707107
Execution stack:
%interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1926   1   3   %oparray_pop   1925   1   3   %oparray_pop   1909   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
--dict:1174/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:752/1012(L)--   --dict:203/300(L)--   --dict:752/1012(L)--   --dict:3/6(L)--
Current allocation mode is local
Current file position is 5441
MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1

** WARNING ** Couldn't open font map file "kanjix.map".
** WARNING ** Filtering file via command -->mgs.exe -q -dNOPAUSE -dBATCH -dEPSCrop -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dAutoFilterGrayImages=false -dGrayImageFilter=/FlateEncode -dAutoFilterColorImages=false -dColorImageFilter=/FlateEncode -sOutputFile="C:/Users/Chase/AppData/Local/Temp/mik1044.tmp" "C:/Users/Chase/AppData/Local/Temp/mik1043.tmp" -c quit<-- failed.
** WARNING ** Image format conversion for PSTricks failed.
** WARNING ** Interpreting special command pst: (ps:) failed.
** WARNING ** >> at page="1" position="(262.098, 433.624)" (in PDF)
** WARNING ** >> xxx "pst:  tx@Dict begin STP newpath   1. .setopacityalpha  1 setlin"
)
(see the transcript file for additional information)
Output written on TexSE*-*minimalExample*For*SE.pdf (1 page).
SyncTeX written on TexSE - minimalExample For SE.synctex.gz.
Transcript written on "TexSE - minimalExample For SE.log".


It also mentions this above that:

Overfull \hbox (68.33841pt too wide) in paragraph at lines 15--16
[][]
[1]


I tried looking into hbox overfull errors but none of the workaround people had seemed to work. It seems like there should be a very simple fix if it were an hob overfull error that would force everything to work out and compile onto the page, but I couldn't find it regarding figures.

I have also provided a larger tex here which is hopefully closer to the image I would want to create and insert the text into my master pdflatex file, although I can't tell what it will look like due to the issue stated above. I have asked a question with a the same essential tex here, on a different thread about the higher end goal for this figure here.

This is the same tex given there but without the commented out lines, so this will not give the full desired image:

\documentclass{article}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{pst-solides3d}
\usepackage[nomessages]{fp}

\pagestyle{empty}

\def \planeLocRatio {.7}            % ratio of z location of plane and radius
\def \planeLen {1}              % half of one side of the plane
\FPeval{\contAng}{pi/4}         % angle from z axis to intersection of plane at sphere edge
\FPeval{\a}{radius*cos(contAng)}    % z location at plane intersection
\FPeval{\a2}{a/2}
\FPeval{\b2}{b/2}
\FPeval{\h2}{h/2}
\FPeval{\imgsize}{planeLen+1}  % maybe increasing this helps /hbox errors?

\begin{document}
\begin{center}
\begin{pspicture}[solidmemory](-\imgsize,-\imgsize)(\imgsize,\imgsize)

% ==================  VIEW ===================
\psset{
viewpoint=10 45 20 rtp2xyz,
lightsrc=viewpoint,
%lightintensity=1.25
xunit=0.5cm,
yunit=0.5cm
}

% ================== POINTS ==================
% origin
\psSolid[object=point,args=0 0 0, name=O, text=O, pos=br]
\psSolid[object=point,args=0 0 \a, name=A, text=A, pos=uc]

%%%%%%% Causes hbox problems, comment out everything from here to get working
\psSolid[object=point,args=0 \b \a, name=B, text=B, pos=uc]

% ================== LINES ==================

% origin to center of circle at plane intersection
\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O A, name=OA]
% label the equation to the side of the line midway through the line
\psProjection[object=point,definition=milieu,args=O A,text=$Rcos \theta$,pos=uc]

% line from origin to side of sphere intersected with plane
\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=O B, name=OB]
\psProjection[object=point,definition=milieu,args=O B,text=$Rsin \theta$,pos=uc]

% line from A to B
\psSolid[object=line,linecolor=black!50,linewidth=2pt,args=A B, name=AB]

% ================== SPHERE ==================
\psSolid[
object=sphere,
name=mySphere,
ngrid=30 30,            % number of grid lines across 2 dimensions r
grid=false,         % remove line edges
hue=0 0.5,
opacity=0.4,
hollow=true,
intersectiontype=0,
intersectionplan=0 0 1 \a,
intersectioncolor=(bleu)
](0,0,0)

\psSolid[
object=plan,
name=myPlane,
definition=solidface,
args=mySphere 1,
base=-1 1 -1 1,
action=draw,
](A,,)

% Just some placeholders
% Add different coloring to top surface of sphere
%??
% Add different coloring to circle where plane intersects sphere
%??

% add some labels for each line and surface
\uput[-135](0,0){$R cos \theta$}
%??

\end{pspicture}

\end{center}
\end{document}

-

When the following statement is expanded by TeX

\psSolid[object=point,args=0 \b \a, name=A, text=B, pos=uc]


the args= will be seen in PostScript as

args=0 22


the space after \b is gobbled by TeX. It is the same as in \TeX forever. Use

\psSolid[object=point,args=0 \b\space \a, name=A, text=B, pos=uc]


In your second example The definition args=O A refers to two points on a plane but your O A refer to two points in a 3D.

 \psProjection[object=point,definition=milieu,args=O A,text=$Rsin \theta$,pos=uc]


See page 158 in the documentation of pst-splides3d for an example.

-
Wow that's really strange. So does that mean everytime a variable is used beside another variable I should use a \space, or should I use a \space after every variable to be safe? Or is this just some incredibly rare, lifetime event of having the wrong characters together? –  chase Mar 28 '14 at 15:39
A \space only if another value follows. No \space if it is already the last value in a list. –  Herbert Mar 28 '14 at 15:46