Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rectangle Pyramid

See original GitHub issue

Hi Marco! Is there a way to make the pyramid shape `vedo.shape.Pyramid` with a rectangular form ? It is for making a figure of a field of view for a 3D camera. In advance, thank you!

Issue Analytics

• State:
• Created 2 years ago

1reaction
marcomusycommented, Jun 2, 2021

It’s probably best then if you define the points and extrude the line:

``````from vedo import *
pts = [(-2,-1), (2,-1), (2,1), (-2,1)]
p = Line(pts, closed=True).lw(1)
ep = p.extrude(zshift=3, dR=-2).flat()
ep.rotateY(-90)
ep.show(axes=1)
``````
1reaction
marcomusycommented, Jun 2, 2021

Just change `Polygon` to `Rectangle` or any other 2d shape or line. Also, `ep.orientation()` I guess can be useful in your case.

Top Results From Across the Web

Rectangular Pyramid - Definition, Properties, Types, ...
A rectangular pyramid is a 3-D object with a base shaped like a rectangle and triangle-shaped faces or sides that correspond to each...
Rectangular Pyramid | Math ∞ Blog
Rectangular pyramids have four-sided bases and four triangular sides coming together in an apex, or what we know more simply as the pointy...
Rectangular Pyramid (Definition & Formulas) - Byju's
Pyramids are three-dimensional structures having triangle faces and have an encompassing polygon shape at its base. If the base of a pyramid is...
Rectangular Pyramid - LearnAlberta.ca
A rectangular pyramid is a three-dimensional object with a rectangle for a base and a triangular face coresponding to each side of the...
Rectangular Pyramid Properties & Examples | Study.com
A rectangular pyramid is a three-dimensional shape. It has the base of a rectangle and four triangular faces that come together at the...

Troubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free