Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post Posted: January 25th, 2017, 10:21 pm 
 

Joined: January 25th, 2017, 10:05 pm
Posts: 1
Dear Planet Chili users, can someone be that kind to help a Polish Student in need? I have to create a function that will draw a sierpinski carpet with vertexes(i dunno if that is clear, my english isnt perfect, what i mean is points around carpet so we can change them and rotate the carpet or expand it) and to a depth given in func. I have a func. done for the Sierpinski triangle, but I dont know how to do it for the carpet can smn pls help? Here's the code for the triangle:

It draws the triangle to a depth that we want and we can manipulate it so it's exactly what i need to have, but i need to have it for the carpet.



Manipulate[
Graphics[{Nest[
Translate[Scale[#, 1/2, {0, 0}], pts/2] &, {Polygon[pts]},
depth]}, PlotRange -> {{0, 1}, {0, 1}},
PlotRangePadding -> .2], {{pts, {{0, 0}, {1, 0}, {1/2, 1}}},
Locator}, {{depth, 4}, Range[7]}]


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 1 post ] 

Board index » Everything


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron