I'm working in MATLAB on a problem involving the motion (translation and rotation) of a superquadric in a 3 dimensional space. I've written a code that computes the position (3 Cartesian coordinates of the superquadric center, referred to the world reference fixed to the ground) and the orientation (roll, pitch and yaw referred to the world reference fixed to the ground) at each sampling instant. The other superquadric parameters, i.e. the length of the axes and the squareness, are left fixed in time.

Everything works fine, but the problem is that I don't really like how MATLAB render the 3D surfaces (I've tried the functions surf, mesh and so on...). Hence, I'm looking for a simple alternative to render a video animation about the motion of my superquadric. Since it is a freeware program, I was wondering if it is possible to use Blender.

My questions are the following:

1. Is it possible to import in Blender from MATLAB the sequence (already computed in MATLAB) of positions, orientations, axes length, squareness and then use Blender (hoping to achieve better results than the one obtained with MATLAB) to create a video animation?

2. If it is possible, is it a difficult procedure for a total newbie like me?

3. If it makes sense to use Blender to animate a superquadric, where can I find some basic tutorials on Blender that allow me to solve my problem?

EDIT According to the suggestions of Duarte and Harry, I provide more "low level" details about my problem.

Each point on the surface of my superquadric are expressed by the following parametrization \begin{aligned} \xi^{\text{b}} & = a_\xi\,\textrm{c}_{\alpha}^{\varepsilon_1}\,\textrm{c}_{\beta}^{\varepsilon_2}\\ \eta^{\text{b}} & = a_\eta \, \textrm{c}_{\alpha}^{\varepsilon_1}\,\textrm{s}_{\beta}^{\varepsilon_2}\\ \zeta^{\text{b}} & = a_\zeta \, \textrm{s}_{\alpha}^{\varepsilon_1} \end{aligned} \qquad \text{with} \qquad \begin{aligned} \textrm{c}_{\gamma}^\varepsilon &\triangleq \textrm{sign}(\cos \gamma)\, |\cos \gamma|^{\varepsilon}\\ \textrm{s}_{\gamma}^\varepsilon &\triangleq \textrm{sign}(\sin \gamma) \, |\sin \gamma|^{\varepsilon} \end{aligned} \tag{1}

here the notation gets the following meaning:

• $$\xi^\text{b},\eta^\text{b}, \zeta^\text{b}$$ are the Cartesian coordinates of the point on the superquadric surface. The superscript means "body reference", in the sense that
1. the position of the superquadric (i.e. its center) is placed in the origin of the world reference;
2. the orientation angles (roll, pitch, yaw) are null.
• $$a_\xi, a_\eta, a_\zeta$$ are the axis length, expressed always in the directions identified by the body reference;
• $$\epsilon_1,\epsilon_2$$ are the squareness of the superquadric;
• $$\alpha,\beta$$ are the latidue and longitude coordinates of the generic $$\xi^\text{b},\eta^\text{b}, \zeta^\text{b}$$ point, and they acts as the degrees of freedom of the parametrization. The entire superquadric surface is obtained by spanning $$\alpha\in[-\pi/2,\pi/2]$$ and $$\beta\in[-\pi,\pi]$$.

Naturally, only a finite subset of the surface point can be represented in the computer implementation. Hence, in MATLAB, I pick from the domains of $$\alpha,\beta$$, i.e. $$[-\pi/2,\pi/2]$$,$$[-\pi,\pi]$$, $$N=100$$ equidistant points $$\{\alpha_i\}_{i=1}^N$$,$$\{\beta_i\}_{i=1}^N$$, obtaining $$N^2$$ 2-dimensional points $$\{(\alpha_i,\beta_j)\}_{i,j=1}^{N}$$ ("domain mesh-grid").

Then, for each point in the domain mesh-grid, I apply the parametrization $$(1)$$, ending up with $$N^2$$ 3-dimensional points $$\{(\xi_i^\text{b},\eta_i^\text{b}, \zeta_i^\text{b})\}_{i=1}^{N^2}$$ ("codomain mesh-grid").

After that, I apply a roto-translation to the codomain mesh-grid, given by the following transformation $$\begin{equation*} \left[\begin{array}{c} \xi \\ \eta \\ \zeta \end{array}\right]=T_\theta\,T_\phi\,T_\psi\,\left[\begin{array}{c} \xi^\text{b} \\ \eta^\text{b} \\ \zeta^\text{b} \end{array}\right]+\left[\begin{array}{c} \xi_\text{c} \\ \eta_\text{c} \\ \zeta_\text{c} \end{array}\right] \qquad \text{with} \end{equation*}$$

$$\begin{equation*} T_\theta \triangleq \left[\begin{array}{ccc} 1 & 0 & 0 \\ 0 & \phantom{-}\cos \theta & -\sin \theta \\ 0 & \phantom{-}\sin \theta & \phantom{-}\cos \theta \end{array}\right] \quad T_\phi \triangleq \left[\begin{array}{ccc} \phantom{-}\cos \phi & 0 & \phantom{-}\sin \phi \\ 0 & 1 & 0 \\ -\sin \phi & 0 & \phantom{-}\cos \phi \end{array}\right] \quad T_\psi\triangleq \left[\begin{array}{ccc} \phantom{-}\cos \psi & -\sin \psi & 0 \\ \phantom{-}\sin \psi & \phantom{-}\cos \psi & 0 \\ 0 & 0 & 1 \end{array}\right] \end{equation*}$$

in order to take into account of the position $$\xi_\text{c}, \eta_\text{c}, \zeta_\text{c}$$ and the orientation $$\theta, \phi, \psi$$ of the superquadric with respect to the world reference.

As a final step, I render the image of the surface by plotting the new codomain mesh-grid $$\{(\xi_i,\eta_i, \zeta_i)\}_{i=1}^{N^2}$$ with the suitable MATLAB commands, such as surf or mesh.

• Hello and welcome. While files, images, and external videos or links may be helpful additions they should not be the only way to obtain information about your issue. Don't make understanding your question rely on downloading a file, watching a video or visiting an external site. Use the builtin tools to upload images or gifs, along with thoroughly explaining the problem in written form so it can be indexed and searched for thus helping future visitors with similar issues. Commented Dec 20, 2022 at 22:02
• If you have the cartesian equations or the parametric equations for your shape you can easily recreate them using geometry nodes and easily animate them. I would go with that route rather then import a sequence since you will have more control over your geometry. Try this one for reference blender.stackexchange.com/questions/270409/…. And please provide more details such as your cartesian or parametric equations. Commented Dec 21, 2022 at 2:58
• @ Duarte: thank you for your reply, next time I will take into account your suggestions. @ Harry: I've added more details about the parametrization that I'm using. The procedure that you are mentioning seems very similar to the one that I'm using in MATLAB. Is there any possibility to pass from MATLAB to Blender the superquadric parameters? Because currently I'm generating the sequence of positions and orientation angle with a particularl motion model and, TBH, I would like to avoid a new Blender implementation of such model. Commented Dec 21, 2022 at 16:36