Home Software Tutorial Computer Software How to draw a Sierpinski carpet with geometric sketchpad

How to draw a Sierpinski carpet with geometric sketchpad

Apr 17, 2024 pm 04:22 PM

Have you encountered the problem of drawing a Sierpinski carpet with a geometric sketchpad? PHP editor Yuzai brings you a detailed tutorial to help you solve this problem. This tutorial covers the steps of drawing a Sierpinski rug fractal pattern using Geometric Sketchpad, starting with a basic square and ending up with a complex geometric pattern. Read on to learn how to draw this fascinating fractal artwork and explore the mathematics behind it.

Analysis: Take the square and divide it into 9 equal parts to get 9 small squares. Discard the small square in the center and keep the 8 small squares around it. Then divide each small square into 9 equal parts and discard the central square as well. Continue to subdivide and discard according to this rule until infinity. The limit graphic area of ​​the Sierpinski carpet tends to zero, and the number of small squares and the number of line segments on its sides tends to infinity. It is a line set, and the graph has strict self-similarity.

The specific drawing operations are as follows:

1. Open the geometric sketchpad, draw any line segment AB on the plane, and construct a square ABCD with the line segment AB as the side length.

How to draw a Sierpinski carpet with geometric sketchpad

2. Using point A as the scaling center, scale points B and D to 1/3 to get E and F; using D as the scaling center, scale points A and C to 1 /3 to get G and H. In the same way, points I, J, K, and L are obtained. Connect the dots to divide the square into nine equal parts.

How to draw a Sierpinski carpet with geometric sketchpad

3. Click [Data - New Parameter] to create a new parameter n, and change the value to 2. Click on two points A and B in sequence (note: these two points are the two endpoints of the line segment you first drew) and parameter n, hold down the shift key, click [Transform - Depth Iteration] to open the iteration dialog box, and select G , P two points, click [Structure] - [Add New Mapping], select P and O two points, continue to add new mapping, select O, J; F, M; N, K; A, E; E, L;L,B. (Note: Do not click on the M and N points in the middle) Click [Iterate] to complete the iterative production.

How to draw a Sierpinski carpet with geometric sketchpad

4. Fill the middle square MNOP, measure the area of ​​the MNOP, select the measurement result and the filled square, click [Display] - [Color] - [Parameters], Click [OK] in the pop-up dialog box.

How to draw a Sierpinski carpet with geometric sketchpad

5. Finally, select all points and press Ctrl H to hide unnecessary points.

How to draw a Sierpinski carpet with geometric sketchpad

Tips: Change the size of square ABCD, and the color of square MNOP will change as its area changes. Observe the difference in Sierpinski carpet by changing the value of parameter n.

How to draw a Sierpinski carpet with geometric sketchpad

The above is the detailed content of How to draw a Sierpinski carpet with geometric sketchpad. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to fix: err_response_headers_multiple_access_control_allow_origin error in Google Chrome How to fix: err_response_headers_multiple_access_control_allow_origin error in Google Chrome Mar 21, 2025 pm 06:19 PM

Article discusses fixing "err_response_headers_multiple_access_control_allow_origin" error in Chrome by addressing multiple Access-Control-Allow-Origin headers.

How much does Microsoft PowerToys cost? How much does Microsoft PowerToys cost? Apr 09, 2025 am 12:03 AM

Microsoft PowerToys is free. This collection of tools developed by Microsoft is designed to enhance Windows system functions and improve user productivity. By installing and using features such as FancyZones, users can customize window layouts and optimize workflows.

What is the purpose of PowerToys? What is the purpose of PowerToys? Apr 03, 2025 am 12:10 AM

PowerToys is a free collection of tools launched by Microsoft to enhance productivity and system control for Windows users. It provides features through standalone modules such as FancyZones management window layout and PowerRename batch renaming files, making user workflow smoother.

How to fix: err_incomplete_chunked_encoding error in Google Chrome How to fix: err_incomplete_chunked_encoding error in Google Chrome Mar 21, 2025 pm 06:02 PM

The article discusses the "err_incomplete_chunked_encoding" error in Google Chrome, offering fixes like reloading the page, clearing cache, and disabling extensions. It also explores common causes and preventive measures.

Does PowerToys need to be running? Does PowerToys need to be running? Apr 02, 2025 pm 04:41 PM

PowerToys needs to be run in the background to achieve its full functionality. 1) It relies on system-level hooks and event listening, such as FancyZones monitoring window movement. 2) Reasonable resource usage, usually 50-100MB of memory, and almost zero CPU usage when idle. 3) You can set up power-on and use PowerShell scripts to implement it. 4) When encountering problems, check the log files, disable specific tools, and ensure that they are updated to the latest version. 5) Optimization suggestions include disabling infrequently used tools, adjusting settings, and monitoring resource usage.

How to fix: err_response_headers_multiple_location error in Google Chrome How to fix: err_response_headers_multiple_location error in Google Chrome Mar 21, 2025 pm 06:05 PM

The article discusses the "err_response_headers_multiple_location" error in Google Chrome, caused by servers sending multiple Location headers. It provides solutions like refreshing the page, clearing cache, disabling extensions, and checki

How to fix: err_timed_out error in Google Chrome How to fix: err_timed_out error in Google Chrome Mar 26, 2025 am 11:45 AM

Article discusses fixing "err_timed_out" error in Google Chrome, caused by poor internet, server issues, DNS problems, and more. Offers solutions like checking connection, clearing cache, and resetting settings.

What is the best alternative to PowerToys? What is the best alternative to PowerToys? Apr 08, 2025 am 12:17 AM

ThebestalternativestoPowerToysforWindowsusersareAutoHotkey,WindowGrid,andWinaeroTweaker.1)AutoHotkeyoffersextensivescriptingforautomation.2)WindowGridprovidesintuitivegrid-basedwindowmanagement.3)WinaeroTweakerallowsdeepcustomizationofWindowssettings

See all articles