Contents
What is the use of Sierpinski triangle?
The Sierpinski triangle activity illustrates the fundamental principles of fractals – how a pattern can repeat again and again at different scales and how this complex shape can be formed by simple repetition. Each students makes his/her own fractal triangle composed of smaller and smaller triangles.
How do you find the height in a triangle?
How to find the height of a triangle – formulas
- area = b * h / 2 , where b is a base, h – height.
- so h = 2 * area / b.
How do you make a turtle Python triangle?
How to Draw a Triangle in Python Turtle
- Draw a line with pen – forward() command.
- Move without drawing – penup(), pendown() commands.
- Turn the pen to an angle – left(), right() commands.
What is the code for a triangle?
Shortcuts for Triangle Symbols
| Triangle Symbol | Symbol Name | Alt + X (Hex Code) |
|---|---|---|
| ◁ | White Left-Pointing Triangle | 25C1 |
| ◂ | Black Left-Pointing Small Triangle | 25C2 |
| ◃ | White Left-Pointing Small Triangle | 25C3 |
| ◄ | Black Left Pointing Triangle | 25C4 |
Can You Help Me with draw Sierpinski triangle?
Can anyone help me? I don’t think you should be creating the turtle or window object inside the function. Since draw_sierpinski gets called four times if you originally call it with depth 1, then you’ll create four separate windows with four separate turtles, each one drawing only a single triangle.
How many turtle do you need for draw Sierpinski?
Instead, I think you should have only one window and one turtle. These results look pretty good for a depth 1 triangle, but what about when we call draw_sierpinski (100,2)?
How to draw a Sierpinski tree in Python?
I am trying to write a program that draws a sierpinski tree with python using turtle. Here is my idea: The program does not reach the 2nd line after the else statement and I don’t know why. Can anyone help me? I don’t think you should be creating the turtle or window object inside the function.
Why does the turtle end up halfway up the slope?
This occurs because the function should draw the shape, and then return the turtle to its original starting position and angle. But as is evident from the depth 1 image, the turtle doesn’t return to its starting position; it ends up halfway up the left slope. You need some additional logic to send it back home.