Tetrahelix modeling and generative rule based automation ?

Is there any simple way to use c4d to create a tetrahelix from tetrahedron objects stacked and with certain changeable rules ? I wish to create some type of shape-grammar that can generate regular tetrahedron constructions. Any hints or pointers would be greatly appreciated!

Hello @user,

Welcome to the Plugin Café forum and the Cinema 4D development community, it is great to have you with us!

Getting Started

Before creating your next postings, we would recommend making yourself accustomed with our Forum and Support Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are:

About your First Question

You posted in the right forum here, as this mostly is an off-topic question. It is also out of scope of support in this extremely broad form. I am also unsure if you actually are looking for a Python/C++ API based solution. Something like this could also be done with Xpresso/Scene Nodes; or in the case of Xpresso an Xpresso/Python combination. But I personally would not really bother with doing that though.

If you want to define a formal language, your shape grammar, I would use one of the common grammar definition and parsing tools, e.g. PLY is a popular library to lex custom grammars. You could of course also go big and use something like ANTLR, or go small and just use the standard library. I would however not recommend the last option.

When you then implemented parsing an expression in your formal grammar into an AST, actually constructing the geometry for that with Python should be fairly easy. I would invite you to then come back and ask a new question for how to do that (given that you did choose to take this path). The complexities of that last step of course depend also on how complex your grammar is, "tetrahelix" can mean a lot.


MAXON SDK Specialist