# Sierpiński triangle with VEX

## Recommended Posts

Hi guys.

How you would go about creating Sierpiński triangle with VEX? I've tried to do it myself, but failed. I've only started learning VEX, before i was only doing basic stuff with it.

Edited by Zunder

##### Share on other sites

Here is an approach using 3 for loops (the inner can be avoided).

I do not really like this approach, because I'm pretty sure, that there much more elegant solutions out there (even without recursion).

sierpinski_vex.hipnc

• 2

##### Share on other sites
4 minutes ago, Aizatulin said:

Here is an approach using 3 for loops (the inner can be avoided).

I do not really like this approach, because I'm pretty sure, that there much more elegant solutions out there (even without recursion).

This is quite interesting approach, but it's really confusing to be honest. I found this page https://sdm.scad.edu/faculty/mkesson/tech312/wip/winter18/meredith_omalley/sierpinski/index.html , and right now trying to adopt the code for VEX. Do you think it will work out ?

• 1

##### Share on other sites

Here is a modification.

sierpinski_cloud.hipnc

• 2

##### Share on other sites

I haven't tried in VEX but I gave it a go a while back in Python. The scene file is attached.

fractal_v001.zip

• 1

##### Share on other sites
10 hours ago, Aizatulin said:

Here is a modification.

Thank you so much.

##### Share on other sites
7 hours ago, lukeiamyourfather said:

I haven't tried in VEX but I gave it a go a while back in Python. The scene file is attached.

Thank you for sharing)

##### Share on other sites

Here are other examples using the foreach node (with less spaghetti node mess ):

• Sierpinski 3D
• Sierpinski 2D
• Koch Curve

foreach_examples.hipnc

• 2

##### Share on other sites
23 hours ago, Aizatulin said:

Here are other examples using the foreach node (with less spaghetti node mess ):

• Sierpinski 3D
• Sierpinski 2D
• Koch Curve

Cool. I changed the code that you gave me and made this, it's almost the same.

sierpinski.hip

• 2

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account