Skip to content

MohamedAhmed7/ComputerGraphicsCLass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ComputerGraphicsCLass

Computer Graphics class work

Weak 01

problem: draw polygons as much as you can

A regular polygon is a polygon that is equiangular and equilateral. This means that all its angles are the same measure and all its sides are the same length. The most basic example of a regular polygon is an equilateral triangle, a triangle with three congruent sides and three congruent angles. Squares are also regular polygons, because all their angles are the same (90∘) and all their sides are the same length. Regular polygons with five or more sides do not have special names. Instead, the word regular is used to describe them. For example, a regular hexagon is a hexagon (6 sided polygon) whose angles are all the same measure and sides are all the same length. All regular polygons have rotation symmetry. This means that a rotation of less than 360∘ will carry the regular polygon onto itself. In fact, a regular n-sided polygon has rotation symmetry for any multiple of 360∘ / n.

equations to get the verteces :

x = (cos((2 * pi*(i / (numOfSides * 1.0))) + (2 * pi*(1 / (numOfSides*1.0))) / 2));

y = (sin((2 * pi*(i / (numOfSides * 1.0))) + (2 * pi*(1 / (numOfSides*1.0))) / 2));

#sample View:

sample

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published