Skip to content

Instantly share code, notes, and snippets.

@henrikh
Created August 9, 2010 22:04
Show Gist options
  • Select an option

  • Save henrikh/516215 to your computer and use it in GitHub Desktop.

Select an option

Save henrikh/516215 to your computer and use it in GitHub Desktop.
% Must include pstricks and pst-node
Find $x$.
% Here we add a node, we're going to use it later
Down \rnode{here}{here}
\begin{pspicture}(5,4)
% First we draw the triangle shape (It can probably be done in a much smarter way)
\psline(0,0)(4,0)
\psline(4,0)(4,3)
\psline(0,0)(4,3)
% Now we place the lables.
% These are the corner lables...
\uput[180](0,0){$A$}
\uput[45](4,3){$B$}
\uput[-45](4,0){$C$}
% ...and these are the edge lables
\uput[-90](2,0){4 cm}
% On this lable we have to turn it, so we use rput to rotate it, and then uput
\rput{-90}(4,1.5){\uput[90](0,0){3 cm}}
% Here we give it a node so we can connect it with the other node
\uput[135](2,1.5){\rnode[t]{x}{$x$}}
\end{pspicture}
% We make sure the nodes look slick
\psset{nodesep=5pt}
% Finally we draw the node
\ncarc{->}{here}{x}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment