How to draw a Sierpinski carpet with geometric sketchpad
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.
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.
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.
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.
5. Finally, select all points and press Ctrl H to hide unnecessary points.
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.
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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



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

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.

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.

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.

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.

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

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.

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