Frustum¶
The Frustum component visualizes camera frustums in 3D space.
This is ideal for:
Visualizing camera field of view
Debugging camera placements
Displaying camera trajectories
Creating multi-camera visualization setups

Basic Usage¶
A minimal example that creates a camera frustum:
from vuer import Vuer, VuerSession
from vuer.schemas import DefaultScene, Frustum, OrbitControls
n, N = 12, 12**3
app = Vuer()
@app.spawn(start=True)
async def main(sess: VuerSession):
sess.set @ DefaultScene(
*[
Frustum(
key=f"frustum-{i}",
scale=10,
showImagePlane=True,
showFrustum=False,
showFocalPlane=False,
position=[i % n, (i // n) % n, (i // n**2) % n],
rotation=[0.5 * 3.14, 0, 0],
)
for i in range(N)
],
up=[0, 0, 1],
bgChildren=[
OrbitControls(key="OrbitControls")
],
)
await sess.forever()
Key Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
str |
Unique identifier for the frustum |
|
tuple[float, float, float] |
Position of the frustum in 3D space |
|
tuple[float, float, float] |
Rotation of the frustum (Euler angles) |
|
tuple[float, …] |
16-element transformation matrix (overrides position and rotation) |
|
float |
Aspect ratio (width/height) of the camera |
|
float |
Focus distance |
|
float |
Vertical field of view in degrees |
|
float |
Near clipping plane distance |
|
float |
Far clipping plane distance |
|
float |
Scale factor for the frustum visualization |
|
float |
Scale factor for the up direction indicator |
|
float |
Focal length of the camera |
|
bool |
Whether to show the up direction indicator |
|
bool |
Whether to show the frustum wireframe |
|
bool |
Whether to show the focal plane |
|
bool |
Whether to show the image plane |
|
str |
Source image to display on the image plane |
|
ColorRepresentation |
Color of the camera origin marker |
|
ColorRepresentation |
Color of the frustum wireframe |
|
ColorRepresentation |
Color of the cone |
|
ColorRepresentation |
Color of the focal plane |
|
ColorRepresentation |
Color of the up direction indicator |
|
ColorRepresentation |
Color of the target marker |
|
ColorRepresentation |
Color of the cross marker |
Learn More¶
Spline Frustum - Animated camera paths