
CMU CS Regular Poygons and Stars
Presentation
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Maria Cruz Farooqi
Used 2+ times
FREE Resource
7 Slides • 3 Questions
1
CMU CS 1.3.3 Regular Polygons and Stars
2
Regular Polygons
We know how to draw a square -- we use Rect and make the width and height the same. But what about a triangle? Or a pentagon (with 5 sides) or a hexagon (with 6 sides), and so on? These are called regular polygons, and we draw these using
RegularPolygon.
3
We draw a regular polygon similarly to a circle -
- with an (x,y) center and a radius.
We just need one more argument: the number of points (or sides, if you prefer, since there are the same number of points as sides). Here is how we draw a hexagon centered at (200, 100) with a radius of 75:
RegularPolygon( 200, 100, 75, 6 )
4
We can see that this fits just inside a circle:
Circle(200, 100, 75, fill='cyan') RegularPolygon(200, 100, 75, 6)
5
Multiple Choice
What happens if you run the previous code with 100 sides?
It looks like a square.
It looks like a line.
It looks like a circle.
It crashes (you cannot draw a 100-sided regular polygon).
6
Circle(200, 100, 75, fill='cyan')
RegularPolygon(200, 100, 75, 100)
7
Stars
We draw a star in the same way that we draw a RegularPolygon:
Star(200, 100, 75, 5)
​We can see that this, too, fits just inside a circle:
Circle(200, 100, 75, fill='cyan')
Star(200, 100, 75, 5)
8
Roundness
You probably have a clear idea what a 5-sided star should look like -- basically, like it does on any flag. Same goes for a 6-sided star. But a 7-sided star is less obvious.
Which of the following is the right shape for a 7-sided star? 7-sided stars of different roundnesses. We see that there are many different kinds of 7-sided stars, some are more circular or rounder than others. The same is true for all stars. When we create a star, we can set its roundness to any value between 0 and 100. For example:
​Star( 80, 130, 35, 7, roundness=20) Star(160, 130, 35, 7, roundness=40) Star(240, 130, 35, 7, roundness=60) Star(320, 130, 35, 7, roundness=80)
9
Dropdown
Star (
10
Dropdown
Star (
CMU CS 1.3.3 Regular Polygons and Stars
Show answer
Auto Play
Slide 1 / 10
SLIDE
Similar Resources on Wayground
10 questions
Subt. Poly & Bi x Bi Guided
Presentation
•
9th - 12th Grade
8 questions
ESTATÍSTICA
Presentation
•
9th - 12th Grade
10 questions
Matematika Volume Kubus dan Balok
Presentation
•
10th - 11th Grade
7 questions
Banking Vocabulary Practice
Presentation
•
9th - 12th Grade
10 questions
Free Verse Poetry
Presentation
•
9th - 11th Grade
10 questions
Cinco de mayo
Presentation
•
9th - 12th Grade
11 questions
Social Media Marketing
Presentation
•
9th - 12th Grade
4 questions
PRESENT PERFECT VERBS
Presentation
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade
10 questions
Logos
Quiz
•
6th - 9th Grade
10 questions
Test Your Knowledge with 15 Fun Trivia Questions
Interactive video
•
6th - 10th Grade
15 questions
Memorial Day Trivia
Quiz
•
KG - 12th Grade
21 questions
Factoring Trinomials (a=1)
Quiz
•
9th Grade
12 questions
Name that Candy
Quiz
•
KG - 12th Grade
22 questions
Regular Preterite -AR-ER-IR-
Quiz
•
12th Grade