0

Plenty of times we need to illustrate concepts with some 3-D figure. Basic figures seem easy to do but can MuPAD handle skewed 3-D shapes?

I would like to plot a skewed pyramid in MuPAD. I would like it to have a square base with side length 1. This would sit along the xy plane (centered at (1/2,1/2,0)).

I want the vertex at (0,0,1).

I tried plotting this in MuPAD, but MuPAD rotates the base plane to give me a non-skewed pyramid. Any idea how to create a skewed pyramid in MuPAD?

Here's my current code:

br := 1/2: 
tr := 0:
base1 := [1/2,1/2, 0]:
base2 := [1,1/2,1/2]:
base3 := [1/2,1,1/2]:
top := [0, 0, 1]:
plot(
plot::Pyramid(br, base1, tr, top),
plot::Pyramid(br, base2, tr, top),
plot::Pyramid(br, base3, tr, top)
):

and it's output

pyramid

This isn't what I wanted at all. Rather than a skewed pyramid, I got a rotated pyramid.

horchler
  • 18,384
  • 4
  • 37
  • 73
pefmath
  • 407
  • 2
  • 4
  • 10
  • is there a reason mupad is the only way you want to plot it? – bla Apr 10 '14 at 22:09
  • I suppose Matlab is fine as well, but I'd need the code for that and it may be too much for my students. If you have equivalent matlab code for a skewed pyramid with the vertex and base face given as arguments, please share. – pefmath Apr 11 '14 at 16:45

0 Answers0