# Field of View & Frustum Calculator AI Agent Connect

> Calculate precise frustum geometry, object visibility, and LOD recommendations for 3D engines.

## Overview
- **Category:** mathematics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_UTml7ow8Du4BsarhuexeOR0sDahNxB2vUAyYwXz9/ai-agent-connect
- **Tags:** 3d, frustum, fov, culling, lod, optimization

## Description

This MCP server provides deterministic mathematical tools for 3D game engine optimization. It allows AI agents to calculate precise frustum dimensions, determine if objects are within the camera's view using `test_object_visibility`, and generate optimized Level of Detail (LOD) strategies via `calculate_lod_recommendations`. Use `calculate_frustum_geometry` to derive horizontal FOV and plane dimensions, or `calculate_culling_efficiency` to measure rendering performance by analyzing culled object counts.

## Tools

### calculate_frustum_geometry
Calculates the fundamental angular and dimensional properties of the camera's view frustum

### calculate_culling_efficiency
Provides a metric to evaluate how effectively the engine is skipping non-visible objects

### calculate_lod_recommendations
Suggests which Level of Detail (LOD) model should be used based on an object's distance and screen presence

### test_object_visibility
Determines if a specific object is within the visible volume of the camera frustum

## Prompt Examples

**Prompt:** 
```
Calculate the frustum geometry for a camera with a 60 degree vertical FOV and a 16:9 aspect ratio.
```

**Response:** 
```
The horizontal FOV is 87.5 degrees. At 10m, the frustum width is 11.55m and height is 6.50m. At 50m, the width is 57.73m and height is 32.47m.
```

**Prompt:** 
```
Is an object at position {x: 10, y: 5, z: 20} visible if the camera is at {x: 0, y: 0, z: 0} facing {x: 0, y: 0, z: 1} with a 90 degree vertical FOV and 1.77 aspect ratio?
```

**Response:** 
```
Yes, the object is within the visible frustum at a distance of 22.91 units.
```

**Prompt:** 
```
What is the culling efficiency if there are 1000 total objects and 450 are outside the frustum?
```

**Response:** 
```
The culling efficiency is 0.45, with 450 objects successfully culled.
```

## Frequently Asked Questions

**How can I check if a specific 3D object is visible to the camera?**
You can use the `test_object_visibility` tool. Provide the camera position, direction, object position, and frustum parameters to receive a boolean visibility result.

**Can this tool help with LOD optimization?**
Yes, the `calculate_lod_recommendations` tool calculates the estimated screen percentage of an object to suggest the most efficient LOD level.

**What kind of geometry data can I retrieve?**
The `calculate_frustum_geometry` tool provides the horizontal FOV, dimensions (width and height) at specific distances, and the visible surface area at those distances.
