Kukan Kogei -空間工芸-

Notes about my 3d printing artcrafts

Four-Dimensional Rotation with Blender add-ons

f:id:asahidari:20200526103349p:plain

Updated (Nov. 6, 2020)

Four-D rotation script for Animation nodes has been uploaded in my gist.

https://gist.github.com/asahidari/b4714563570e7ce1c27b1bb61b9a727d

Image below is how to use the script.

f:id:asahidari:20201106142032p:plain

OverView

In my previous writing*1 about the Riemann's minimal surface, I refered to the mobius transformation. Though I do not know much about it, the function is related to stereographic projection with the Riemann sphere, and the projection can describe four dimensional rotation. There is a movie that describes the transformation.

 

I wonder if someone carried out the 4D rotation in Blender(opensource 3d software). Though I  found an article*2 to realize it with adding some lines to the app's source code, but it looks hard to learn about quaternions quickly and rebuild the app from scratch. However, now (May 2020) Blender has already some useful addons, and some of them seems to achieve the transformation. In this article, to achieve the rotation, I use sverchok addon and animation nodes.

An article  about performing the 4D rotation in Rhino

After some more research, I found an article*3, in Daniel Picker's blog, about realizing the 4d rotation in Rhinoceros Grashopper. In the comment field within the writing (comment number 24), the author wrote down about the transformation of xyz values. I found the function can also be used in other environments. To get the details, please visit the blog and read the comment.

 

Implementing the rotation with sverchok addon

This is the connection of nodes to achieve the rotation using sverchok.

 

f:id:asahidari:20200526110815p:plain

You can change the output mesh, changing the 't' value linked to the rotation.

f:id:asahidari:20200526110938g:plain

Exported json is here:

https://gist.github.com/asahidari/0f3809f287b40c6c83105633aa3f5ce5

 And simple node tree with script node written by portnov@portnov9 is here.

https://gist.github.com/portnov/93bed8a595668c37cbfb240eab76e173

Implementing the rotation with animation nodes addon

 When using animation nodes, this noding achieve the rotation. (I use 'math node' instead of 'expression node' to implement the equation, because math.sin and math.cos in expression node seems to recognize only integer part changes (not recognize after the decimal point) of 't' value).

 

f:id:asahidari:20200526141445p:plain

f:id:asahidari:20200526141512p:plain

This noding can achieve the rotation.

 

f:id:asahidari:20200526142321g:plain

 Environments

* Blender 2.8.2

* Sverchok add-on 0.6.0.0

* Animation nodes add-on 2.1.7

 

References