dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Outline of line

  1. #1
    Junior Member
    Join Date
    Nov 2008
    Posts
    14

    Outline of line

    I have the polyline. How I can to calculate points that will outstand from this line for some distance?

  2. #2
    Member
    Join Date
    Feb 2010
    Posts
    59
    This is a calculus problem. Calculus helps find the slope of a line for its whole domain

    If you want the points to be perpendicular to the sides, you will need to know the slope of each section (you'd have to get the pixel locations of the start and ends of the sections). Any point perpendicular to a section has the equation whose slope is the opposite of the section's slope.

    i.e if y=2/3x+b

    THen the perpendicular line

    y=-3/2x +b

    You flip the slope and change the sign (2/3 to -3/2)

    'b' is the y-intercept, but you can see it as where the line would cross the left side of the stage.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center