# 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

##### 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 ?

##### Share on other sites

Here is a modification.

sierpinski_cloud.hipnc

##### 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

##### 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

##### 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

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×