CARY in Calligra Sheets: Polar Radius and Angle to Y
Convert a polar radius and radian angle to a vertical coordinate in Calligra Sheets with worked equations, troubleshooting and source evidence.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Availability and version history
- Introduced: Documented by 26.08.2; original introduction not established.
- Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
- Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
- Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.
Quick answer
Use =CARY(Radius;Angle) to return the vertical y-coordinate of a polar point. The second parameter is an angle in radians, and both inputs are required. KDE documents =CARY(12;0) as 0 and =CARY(12;1.5707) as 12 (rounded). Independent calculation for the second is 11.999999944327, illustrating the rounding. KDE handbook; pinned 26.08.2 code.
Verification: Calligra’s official documentation and 26.08.2 implementation were inspected; none of these formulas were run in a native Calligra installation.
How the vertical projection works
In a Cartesian plot, an angle θ measured counterclockwise from positive x defines a vertical offset of:
y = r × sin(θ)
This is exactly the mathematical expression implemented by func_cary, which returns calc->mul(args[0], calc->sin(args[1])) in the examined release. For r=10 and θ=π/6 (30°), y=5. Positive θ can give positive y; negative θ can give negative y. This is an ordinary math-coordinate convention, not a universal screen-coordinate convention. Official pinned code; [XML metadata parameter metadata](https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml).
The companion CARX function calculates x. Together, the pair can place a point from an angle and radius or decompose displacement, speed or force. A user must supply radians and preserve the sign of the angle. KDE documented conversion pair.
Exact syntax, units, parameters and optional defaults
=CARY(Radius;Angle)
| Position | Parameter | Required | Type in KDE’s release XML metadata | Interpretation |
|---|---|---|---|---|
| 1 | Radius |
Yes | Double (numeric) |
Distance from the origin in the polar-coordinate model. |
| 2 | Angle |
Yes | Double (numeric) |
Direction measured in radians from the positive x-axis, with mathematical counterclockwise sign convention. |
The CARY function registration in pinned Calligra 26.08.2 sets setParamCount(2): two arguments exactly, no optional arguments or documented defaults. A numeric expression or referenced numeric cell is appropriate for either parameter. A mathematical radius should normally be non-negative; the function wrapper performs a direct multiplication rather than checking for negative radii. Do not treat a negative radius as a validated native error or as a measured distance without modelling its orientation. Pinned source; [KDE XML metadata syntax](https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml); handbook.
Radians, not degrees: 90 as an input means 90 radians, not 90°. Use =RADIANS(90) or =PI()/2 for a mathematical quarter-turn. Equivalently a 30° angle can be entered as =PI()/6. The handbook’s function-entry examples use semicolons; other locales can differ in decimal display and input parsing. Use Insert → Function in the actual installation to verify its entry syntax. KDE formula editor.
Release and platform scope: Source verified against Calligra Sheets 26.08.2, dated October 8, 2026 in KDE’s releases. This review does not assert behavior for earlier releases or native execution on any operating system, package channel, or UI locale. KDE releases.
Reproducible worksheet: ten polar-coordinate cases
- In a blank Calligra sheet, put Point in A1, Radius in B1, Angle in radians in C1, CARY result in D1 and Other component (independent expected) in E1.
- Copy the A/B/C input entries shown in the table. For an angle cell containing
=PI()/6, type that as a formula; plain1.5707is a numeric angle in radians. Enter radii as numbers without quotation marks. - In D2, type
=CARY(B2;C2)and fill the formula down through D11. Select nine decimal places to compare rounded displays. Do not mistake a near-zero floating-point result for an exact zero. - The last column is an independent mathematical cross-check, derived from the alternate polar component, not an observation from a Calligra test. Optionally calculate it in E2 with
=CARX(B2;C2)and fill down; CARX is a separate source-registered Calligra function.
| Row | Label A | Radius B | Angle input C | D formula | Expected y in D | Independent other component |
|---|---|---|---|---|---|---|
| 2 | East | 12 | 0 |
=CARY(B2;C2) |
0.000000000 | 12.000000000 |
| 3 | Near north | 12 | 1.5707 |
=CARY(B3;C3) |
11.999999944 | 0.001155922 |
| 4 | 30 degrees | 10 | =PI()/6 |
=CARY(B4;C4) |
5.000000000 | 8.660254038 |
| 5 | North | 10 | =PI()/2 |
=CARY(B5;C5) |
10.000000000 | 0.000000000 |
| 6 | West | 8 | =PI() |
=CARY(B6;C6) |
0.000000000 | -8.000000000 |
| 7 | South | 8 | =-PI()/2 |
=CARY(B7;C7) |
-8.000000000 | 0.000000000 |
| 8 | Northeast | 5 | =PI()/4 |
=CARY(B8;C8) |
3.535533906 | 3.535533906 |
| 9 | Southeast | 5 | =-PI()/4 |
=CARY(B9;C9) |
-3.535533906 | 3.535533906 |
| 10 | Zero radius | 0 | =PI()/3 |
=CARY(B10;C10) |
0.000000000 | 0.000000000 |
| 11 | Northwest | 5 | =3*PI()/4 |
=CARY(B11;C11) |
3.535533906 | -3.535533906 |
All expected decimals in the table were independently computed with Python math.cos/math.sin applied to the displayed radius and radian angle. The display is rounded to nine decimal places. For instance, a 90° angle entered as =PI()/2 can yield a minute non-zero floating result for cosine even though the exact trigonometric value is zero; testing your actual Calligra build is the appropriate final check. The handbook’s example =CARY(12;1.5707) is not the same input as =CARY(12;PI()/2) because 1.5707 ≠π/2. KDE example; pinned wrapper.
Advanced example 1: height of a 7-unit arm at 60 degrees
Put arm length 7 in B2 and angle 60 degrees in C2:
=CARY(B2;RADIANS(C2))
Independent expected height: 6.0621778265 (7 sin 60°). Compare with =CARX(B2;RADIANS(C2)), independently expected x offset 3.5. Both use the same radius and radian angle order; simply swapping the arguments will not calculate the other axis. KDE CARY/CARX; KDE RADIANS.
Advanced example 2: calculate a vertical endpoint from a starting position
A drone starts at mathematical y=150. The straight-line movement length is 20, and its heading is 30° above the positive x-axis. Put start y in A2, movement length in B2 and degrees in C2:
=A2+CARY(B2;RADIANS(C2))
Independent expected endpoint y=160. For a downward direction (−30°), the same expression would give 140. These calculations assume the diagram’s positive y-axis points upward. If working with image pixel coordinates where y increases downward, change the sign of the offset deliberately rather than treating the function as incorrect.
Advanced example 3: recover polar radius after projecting both components
Choose radius 13 and angle =PI()/4. The projected components are 13/√2 for each axis, independently approximately 9.1923881554. Then:
=SQRT(CARX(13;PI()/4)^2+CARY(13;PI()/4)^2)
The independently expected length is 13. For a negative radius, this length identity recovers its absolute value, showing why distance and signed projection arguments are different concepts. Floating-point results may not be exactly representable. Source for both projections.
Errors, limits and troubleshooting
| Case | Evidence and practical guidance |
|---|---|
| Missing or third argument | The Calligra 26.08.2 registration fixes two arguments. Use =CARY(radius;angle) and check locale separators. |
| Degrees entered as radians | =CARY(10;90) treats 90 as radians, not 90°. Use =CARY(10;RADIANS(90)) or =CARY(10;PI()/2). |
Value shown as 12 for CARY(12;1.5707) |
The exact independent computation is slightly below 12; the handbook rounds it. Avoid claiming exact equality. |
| Radius is zero | Mathematical y offset is zero for any finite angle. The code multiplies radius by sine; application behavior for malformed angles was not tested. |
| Radius is negative | The wrapper has no explicit nonnegative-radius check; sign conventions must be controlled by the sheet’s model. |
| Blank, text, boolean, invalid numeric input | Native coercion and visible error types were not tested. Supply numeric cells and examine outputs in the installed release. |
| Huge/special values | Floating overflow/NaN/error propagation remains an untested runtime boundary, even though the formula is simple. |
| Vector chart appears inverted | Screen y-coordinates may increase downward. Inspect axis setup or invert the offset after calculation. |
The CARY wrapper does not explicitly define an error for a zero radius or for other boundary inputs. Do not infer a Calligra UI error message or permissive coercion rule from another product. Pinned CARY implementation.
Portability and compatibility
The pure mathematical transformation =radius*SIN(angle) can substitute for CARY for numeric inputs where the CARY-specific function name is not documented. In a Calligra worksheet compare =CARY(B2;C2) with =B2*SIN(C2) at an appropriate display precision. This demonstrates a mathematical equivalence; it is not evidence about another application’s acceptance of the name CARY, its input coercion, or its error codes. No native third-party spreadsheet was executed. KDE SIN; pinned CARY source.
Verified related functions and source links
Explore the related mathematical functions below:
- SIN in Calligra Sheets — sine of a radian angle.
- COS in Calligra Sheets — cosine of a radian angle.
- PI in Calligra Sheets — reference for π and the unit circle.
- RADIANS in Calligra Sheets — degrees to radians.
- DEGREES in Calligra Sheets — radians to degrees.
- SQRT in Calligra Sheets — square root; useful for vector length.
- ACOS in Calligra Sheets — inverse cosine; useful for understanding POLA’s implementation.
CARX and CARY calculate Cartesian components; POLR calculates length.
Evidence and dated verification
Research checked on 2026-10-13 UTC:
- KDE Sheets function handbook — this function documents function name, syntax, argument labels, return type and examples. Its handbook text is not proof of runtime behavior on every version.
- KDE Calligra 26.08.2 pinned
conversion.xmlspecifies the two ordered Double parameters and related functions. - KDE Calligra 26.08.2 pinned
conversion.cppregisters the function and reveals its implementation, including caveats the handbook omits. - KDE Sheets formula-entry instructions document Insert → Function, the
=formula format and the semicolon between arguments in the English handbook. - KDE Calligra Sheets release list identifies 26.08.2 as released October 8, 2026.
What was and was not validated: Documentation inspection: yes. Version-pinned source review: yes. Mathematical outputs: independently calculated in Python’s standard math module. Native Calligra execution: no. No Linux, Windows, Flatpak or other platform build was run; no locale-specific execution or UI screenshots were captured.