Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Binary IO
3D Model
Memory Info
SceneList
Flash Paper in Director Article
Audio Xtra
Semi-Random Bezier Animatior
Opening Local HTML pages
Universal serial port behavior
EndFramesScript
MediaMacros Xtras Mall
 

 

 

Behavior Vector Shape - Create Polygon

Added on 2/7/2006

 

Compatibilities:
D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

Pass the width, height and number of sides to create polygon shapes such as stop signs, pentagons, etc.

  
  vertList = []
  
  sides = integer(sides)
  
  a = max(width, height) / 2.0
  b = min(width, height) / 2.0
  
  rad = (360 / float(sides)) * (pi / 180)
  radOffset = rad + (90 * (pi / 180))
  
  repeat with i = 1 to sides
    t = (i * rad) - radOffset
    x = a * cos(t)
    y = b * sin(t)
    vertList.add([#vertex: point(x, y)])
  end repeat
  
  return vertList
  
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail