# General-relativistic coordinates transformation support

**URL:** https://discourse.julialang.org/t/general-relativistic-coordinates-transformation-support/135196
**Category:** General Usage
**Tags:** coordinate-transform
**Created:** [January 22, 2026, 1:08am UTC](https://discourse.julialang.org/t/general-relativistic-coordinates-transformation-support/135196 "2026-01-22T01:08:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![raman\_kumar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raman_kumar/32/26782_2.png) [@raman\_kumar](https://discourse.julialang.org/u/raman_kumar)
#### Post date: [January 22, 2026, 1:08am UTC](https://discourse.julialang.org/t/general-relativistic-coordinates-transformation-support/135196/1 "2026-01-22T01:08:43Z")

</div>

I am looking for package that supports general-relativistic coordinates transformation to [Cartesian](https://en.wikipedia.org/wiki/Four-dimensional_space) etc. I would like to transform the following coordinates to Cartesian and vice versa. What will be the code if i have to do it manually?

- [Minkowski](https://en.wikipedia.org/wiki/Minkowski_space#Minkowski_metric)
- [Schwarzschild](https://en.wikipedia.org/wiki/Schwarzschild_coordinates#A_metric_Ansatz)
- [Kerr-Schild](https://en.wikipedia.org/wiki/Kerr_metric#Kerr%E2%80%93Schild_coordinates)

For [Kerr-Schild to Cartesian](https://physics.stackexchange.com/questions/568767/kerr-metric-in-cartesian-coordinates) transformation i have following code:

```julia-auto
function kerr2cart(spin,r,θ,ϕ)
    sθ, cθ = sincos(th)
    sϕ, cϕ = sincos(ph)
    X = (r*cϕ + spin*sϕ) * sθ
    Y = (r*sϕ - spin*cϕ) * sθ
    Z = r * cθ
    return X, Y, Z
end

```

Here `spin` is the rotational spin of the object(Black Hole etc.) that distorts geometry.
