Message Boards Message Boards

0
|
1445 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

How to shade a parallelogram in a 3D plot

Below we have all we need to produce a parallelogram, one point and two vectors. But it is (necessary for other reasons) a 3D graphic and Parallelogram[ ] will not combine with 3D. Have not found a Filling methodology, either. Perhaps selectively changing the Opacity? Still trying things...

a := 3;
b := -1;
c := 0;
x0 := 1;
y0 := 3;
z0 := 2;
d := {a, b, c} . {x0, y0, z0};
planePlot2 = 
  ParametricPlot3D[{u, (d - a u)/b, v}, {u, 0, 4}, {v, 0, 8}, 
   PlotStyle -> Opacity[0.1], AxesLabel -> {x, y, z}];
vects3D = 
  Graphics3D[{Arrow[{{0, 0, 0}, {1.428, 4.285, 6.285}}], 
    Arrow[{{0, 0, 0}, {2, 6, 2.857}}]}];
Show[planePlot2, vects3D]
POSTED BY: Roger J Brown

Parallelogram is a 2D construct. In 3D you can use Polygon:

v1 = {1.428, 4.285, 6.285};
v2 = {2, 6, 2.857};
Graphics3D[{Red, Opacity[.5],
  Polygon[{{0, 0, 0}, v1, v1 + v2, v2}]}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract