2. A Fractal. The symbol is called a tilde. We are going to create a fractal that resembles this picture, so we will cal

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2. A Fractal. The symbol is called a tilde. We are going to create a fractal that resembles this picture, so we will cal

Post by answerhappygod »

2 A Fractal The Symbol Is Called A Tilde We Are Going To Create A Fractal That Resembles This Picture So We Will Cal 1
2 A Fractal The Symbol Is Called A Tilde We Are Going To Create A Fractal That Resembles This Picture So We Will Cal 1 (26.62 KiB) Viewed 25 times
2 A Fractal The Symbol Is Called A Tilde We Are Going To Create A Fractal That Resembles This Picture So We Will Cal 2
2 A Fractal The Symbol Is Called A Tilde We Are Going To Create A Fractal That Resembles This Picture So We Will Cal 2 (39.67 KiB) Viewed 25 times
2. A Fractal. The symbol is called a tilde. We are going to create a fractal that resembles this picture, so we will call it a tilde fractal. To draw a tilde fractal, we need two points that have the same y coordinate. We will call these points (xo.y) and (x,y). (We have labelled these points in blue on the following diagram for your reference. Do not draw labels on your diagrams. Include only the parts that we have drawn in black.) A tilde fractal of depth 0 is simply a line between the two points, like so: A tilde fractal of depth d consists of three vertical lines, and four smaller fractals of depth one smaller, that trace the contour of a tilde. For example, a tilde fractal of depth 1 looks like this: A tilde fractal of depth 2 looks like this: Mr odat
And a tilde fractal of depth 5 looks like this: The middle fractals are shifted over one-quarter of the way from (xo.y) to (x,y), shifted up or down the same amount, and one-quarter as big as the full-size fractal. Exercise Write a function tilde (canvas, x0, x1, y., depth). canvas is an ipycanvas. Canvas object. x0, x1, and y are float values, and depth is an int. The function should draw on canvas a tilde fractal between points (xo.y) and (x₁.y). It is not easy to automatically test this function. Run it with different values of depth, and verify by eye that it looks like the examples shown above. Make sure the left corner is (xo.y), and that the right corner is (x₁, y). This code will help you get started: import ipycanvas def tilde (canvas: ipycanvas. Canvas, x0: float, xl: float, y: float, depth: int) -> None: canvas = ipycanvas.Canvas (size=(320,320)) ## Run your function with different values to verify it works. tilde (canvas, 40.0, 280.0, 160.0, 3) display (canvas) Use nothing from ipycanvas. Canvas except canvas.stroke_line(x1, yl, x2, y2).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply