Proportion calculator
calculate_proportionWork out proportions. Pass ratio (golden, root2 or a-series, root3, any a:b such as 3:2 or 16:9, or a decimal such as 1.414; default golden) and width or height. Optionally orientation (landscape by default, or portrait) and container (length to split; defaults to the long side). Returns the missing side, the split of the container into a major and minor part at that ratio (with CSS fr and px forms), a table of heights at the same width for ten common ratios, and, when you give both width and height as a source image, centered crop sizes and offsets for the target ratio and common alternatives with the share of area kept. Root-2 is the ISO A-series ratio, where folding a sheet in half keeps its shape. Sources: Graphic Design Solutions (golden section); Samara, Making and Breaking the Grid; Müller-Brockmann, Grid Systems in Graphic Design. That any one ratio is more beautiful is a convention, not a finding. Pure arithmetic, nothing stored.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "calculate_proportion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ratio | No | golden, root2, a-series, 3:2, 16:9, 4:5, a decimal like 1.414, or any a:b. Default golden. | |
| width | No | Known width in px (or any unit). | |
| height | No | Known height. Give one of width or height; give both to get crop suggestions. | |
| container | No | Length to split into major and minor parts. | |
| orientation | No | Landscape (default) makes the width the long side. |