# Select fourth-order FOT in the parameter space of transversely isotropic FOT


```python
import numpy as np
import sympy as sp
import vofotensors as vot
from vofotensors.abc import alpha1, rho1
import pandas as pd
```


```python
# Create data
alphas = np.linspace(-1.0 / 3.0, 2.0 / 3.0, 10)
rho_top = alphas / 56.0 + 1.0 / 60.0
rho_bottom = alphas * alphas / 8.0 - alphas / 42.0 - 1.0 / 90.0
boundary = np.concatenate(
    [
        np.stack([alphas, rho_top], axis=1),
        np.stack([alphas, rho_bottom], axis=1)[1:-1],
    ],
    axis=0,
)
```


```python
# Cast to dataframe
df = pd.DataFrame(boundary, columns=["alpha1", "rho1"])
```


```python
# Get parameterizations
parameterizations = vot.fabric_tensors.N4s_parametric
parameterization = parameterizations["transv_isotropic"]["alpha1_rho1"]
N4_func = sp.lambdify([alpha1, rho1], parameterization)
```


```python
# Evaluate parameterization for each FOT in dataframe
df["N4"] = df.apply(lambda row: N4_func(alpha1=row["alpha1"], rho1=row["rho1"]), axis=1)
print(df)
```

          alpha1      rho1                                                 N4
    0  -0.333333  0.010714  [[2.7755575615628914e-17, 0.0, 0.0, 0.0, 0.0, ...
    1  -0.222222  0.012698  [[0.11111111111111113, 0.0, 0.0, 0.0, 0.0, 0.0...
    2  -0.111111  0.014683  [[0.22222222222222224, 0.0, 0.0, 0.0, 0.0, 0.0...
    3   0.000000  0.016667  [[0.33333333333333337, 0.0, 0.0, 0.0, 0.0, 0.0...
    4   0.111111  0.018651  [[0.4444444444444444, 0.0, 0.0, 0.0, 0.0, 0.0]...
    5   0.222222  0.020635  [[0.5555555555555556, 0.0, 0.0, 0.0, 0.0, 0.0]...
    6   0.333333  0.022619  [[0.6666666666666667, 0.0, 0.0, 0.0, 0.0, 0.0]...
    7   0.444444  0.024603  [[0.7777777777777777, 1.3877787807814457e-17, ...
    8   0.555556  0.026587  [[0.8888888888888888, -1.3877787807814457e-17,...
    9   0.666667  0.028571  [[1.0, 0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 2.77555...
    10 -0.222222  0.000353  [[0.012345679012345678, 0.04938271604938272, 0...
    11 -0.111111 -0.006922  [[0.04938271604938271, 0.08641975308641975, 0....
    12  0.000000 -0.011111  [[0.11111111111111112, 0.1111111111111111, 0.1...
    13  0.111111 -0.012213  [[0.19753086419753085, 0.12345679012345678, 0....
    14  0.222222 -0.010229  [[0.308641975308642, 0.12345679012345678, 0.12...
    15  0.333333 -0.005159  [[0.4444444444444444, 0.1111111111111111, 0.11...
    16  0.444444  0.002998  [[0.6049382716049381, 0.08641975308641978, 0.0...
    17  0.555556  0.014242  [[0.7901234567901234, 0.04938271604938269, 0.0...


12a133af3a0001fb4deaab5bf43c58728efc7692
ipynb
Jupyter Notebook
docs/source/notebooks/03.ipynb
JulianKarlBauer/fiber_orientation_tensors_2021
d42bafd17c2f1a18b9a3f45952c6f76643b4b86f
MIT
docs/source/notebooks/03.ipynb
JulianKarlBauer/fiber_orientation_tensors_2021
d42bafd17c2f1a18b9a3f45952c6f76643b4b86f
MIT
2021-12-20T21:19:43.000Z
2021-12-20T21:19:43.000Z
docs/source/notebooks/03.ipynb
JulianKarlBauer/fiber_orientation_tensors_2021
d42bafd17c2f1a18b9a3f45952c6f76643b4b86f
MIT
Qwen/Qwen-72B
1. YES
2. YES