Graphics, Figures & Tablespst-solides3d | Drawing a Pyramid

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

pst-solides3d | Drawing a Pyramid

Post by svend_tveskaeg »

Hi all.

Consider the pst-solides3d manual. I would like to draw the square pyramid in the top left corner of page 127 with just the lowest (blue) intersecting plane.

I simply cannot get the example to work.

If one would be so kind as to show my the complete LaTeX code that produces the pyramid mentioned, I would be most grateful.

Thank you in advance!
Last edited by svend_tveskaeg on Fri Apr 27, 2012 5:23 pm, edited 1 time in total.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

pst-solides3d | Drawing a Pyramid

Post by localghost »

svend_tveskaeg wrote:[…] I simply cannot get the example to work. […]
What does that exactly mean? Warnings or even error messages? Be more precise in your problem description. Make sure that the version of the manual where you got this code from corresponds to the installed version of the package on your TeX system.


Thorsten
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: pst-solides3d | Drawing a Pyramid

Post by svend_tveskaeg »

Errors. My problem is that I do not know what to copy from the manual and how to assemble the code parts I collect.

I have an updated TeX Live installtion.

I hope this explanation suffices.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: pst-solides3d | Drawing a Pyramid

Post by localghost »

Since I never used this package, I'd need to read up on it. At the moment I haven't got that time. Perhaps somebody else can help.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

pst-solides3d | Drawing a Pyramid

Post by Stefan Kottwitz »

Here is a compilable example for you to start:

Code: Select all

\documentclass{article}
\usepackage{pst-solides3d}
\begin{document}
\psset{viewpoint=50 20 20 rtp2xyz, Decran=50}
\begin{pspicture*}(-5,-4)(6,9)
\psSolid[object=new,
  sommets=
    0 -2 0 %% 0
    -2 0 0 %% 1
    0 4 0 %% 2
    4 0 0 %% 3
    0 0 5, %% 4
  faces={
    [3 2 1 0]
    [4 0 3]
    [4 3 2]
    [4 2 1]
    [4 1 0]},
  intersectiontype=0,
  intersectionplan={[0 0 1 -1] [0 0 1 -2]},
  intersectionlinewidth=1 2,
  intersectioncolor=(bleu) (rouge),
  plansepare={[0 0 1 -2]},
  name=firstSlice,
  action=draw]
\end{pspicture*}
\end{document}
Output:
pyramid.png
pyramid.png (5.63 KiB) Viewed 4775 times
Stefan
LaTeX.org admin
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: pst-solides3d | Drawing a Pyramid

Post by svend_tveskaeg »

Hi Stefan.

Thanks for your help.

If I can get you to show me the code for the entire drawing except the red intersecting plan, I will much appreciate that.

Thank you in advance!

P.S. I know I should be able to modify your example in order to get it myself, but I still cannot figure out what code to copy from the manual. :oops:
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply