5.0

5.0 | 2 ratings Rate this file 10 Downloads (last 30 days) File Size: 1.75 KB File ID: #16608
image thumbnail

Regular Polygons

by

 

26 Sep 2007 (Updated )

Plots the regular polygon {N/d} with vertices on a circle of radius 'rad'.

| Watch this File

File Information
Description

Let d < N be a positive integer and define p = N/d. Let y_{1} be a point on the unit circle. Let R be clockwise rotation by the angle t = 2*pi/p. The generalized regular polygon {p} is given by the points y_{i+1} = R * y_{i}, and edges between points i and i+1.

Example:
polygon(9, 4, 1);

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
18 Feb 2011 laleh  
28 Apr 2008 Sam Pitroda  

Contact us