Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Open File WIth Associated Application
Bevel Follow Mouse or Sprite-Alphamania
Mac Disk
Copy and Paste inside non-editable fields
Show Me Movies
Move To Top
Macromedia Director 7: Creating Powerful Multimedia
Find all occurances of a string in a Text member
Stop MPEG with MCI commands
Avance de imagenes continuo - Continuous advance of imagenes
MediaMacros Xtras Mall
 

 

 

Behavior Vector Shape - Create Ellipse (Improved)

Added on 9/30/2006

 

Compatibilities:
behavior D8 D8_5 D9 Mac PC Shockwave

This item has not yet been rated

Author: Chunick (website)

This is a more accurate algorithm which will draw an ellipse or circle more accurately. In fact, it's impossible to draw a perfect circle using bezier curves, but we can approximate it very closely using kappa (k). For those interested, info can be found here: http://www.whizkidtech.redprince.net/bezier/circle/

on createEllipse (aWidth, aHeight)
  
  rX = aWidth / 2.0
  if voidP(aHeight) then aHeight = aWidth
  rY = aHeight / 2.0
  pt1 = point(rX*cos(3.92699081698724), rY*sin(3.92699081698724))
  pt2 = point(rX*cos(5.49778714378214), rY*sin(5.49778714378214))
  pt3 = point(rX*cos(0.78539816339745), rY*sin(0.78539816339745))
  pt4 = point(rX*cos(2.35619449019234), rY*sin(2.35619449019234))
  
  k = 0.552284749830794
  
  vertList = [[#vertex: pt1, #handle1: pt1 * point(-k, k), #handle2: pt1 * point(k, -k)], [#vertex: pt2, #handle1: pt2 * point(k, -k), #handle2: pt2 * point(-k, k)], [#vertex: pt3, #handle1: pt3 * point(-k, k), #handle2: pt3 * point(k, -k)], [#vertex: pt4, #handle1: pt4 * point(k, -k), #handle2: pt4 * point(-k, k)]]
  
  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