# Difference between revisions of "For Tutorial 5"

(→Less Regular Polygons) |
(→Less Regular Polygons) |
||

Line 101: | Line 101: | ||

Polygon reg = new Polygon(); | Polygon reg = new Polygon(); | ||

int r; | int r; | ||

− | int n = | + | int n = 16; |

for (int i=0;i<n;i++) | for (int i=0;i<n;i++) | ||

{ | { |

## Latest revision as of 13:53, 8 October 2012

## Regular Polygon

You can find the coordinates of a regular polygon using sin and cosine.

Change n and r so that you get a hexagon that is twice the size.

[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]

## Octagons

[Font]
[Default]
[Show]
[Resize]
[History]
[Profile]