Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6942001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:57:31+00:00 2026-05-27T12:57:31+00:00

I am developing graph application. In app window there are vertices conneted by edges.

  • 0

I am developing graph application. In app window there are vertices conneted by edges. User is able to move vertex, and as he do it edge also moves. I am having problem to find pattern to draw arrow representing edge direction depending on both vertex positions.

Here’s an example.

Lets say vertex has width/height = 20px; Edge is drawn from center of Vertex1 to center of Vertex2.

Vertex1.position = new Point(0,0);
Vertex2.position = new Point(100,0);
Edge.point1 = new Point(10,10);
Edge.point2 = new Point(110,10);
//Arrow representing direction from Vertex1 to Vertex2
Arrow.point1 = new Point(100,10);
Arrow.point2 = new Point(90,20);
Arrow.point3 = new Point(90,0);

Question is: Knowing position of edge start/end points, how to calculate arrow points?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:57:32+00:00Added an answer on May 27, 2026 at 12:57 pm

    Let’s say edge’s starting point has coordinates (ax, ay), ending point (bx, by), the vertex has radius w, your arrow has the length of its pointer l and the angle between the arrow edges alpha
    Then in pseudocode:

    ex := (bx - ax) 
    ey := (by - ay) 
    ex := ex / sqrt(ex^2 + ey^2)
    ey := ey / sqrt(ex^2 + ey^2)
    

    The first point of the arrow:

    a1x := bx - w * ex
    a1y := by - w * ey
    

    The second point of the arrow:

    a2x := bx - (w + l) * ex + l * tg(alpha/2) * ey
    a2y := by - (w + l) * ey - l * tg(alpha/2) * ex
    

    The third point of the arrow:

    a3x := bx - (w + l) * ex - l * tg(alpha/2) * ey
    a3y := by - (w + l) * ey + l * tg(alpha/2) * ex
    

    Sorry for such poor formatting, I don’t know how to use mathematical markup here. And I hope I didn’t make any errors in the calculations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing a .NET WinForms application: how can I check if the window is in
I'm developing a facebook app. The tab removes correctly, but is there a way
I am developing an Android app that connects to the Facebook Open Graph via
I am developing a iPhone application which get facebook album with this URL https://graph.facebook.com/me/albums?access_token=2227470867|2.ZJr73vaEvFeN4fI_A70RFw__.3600.1297090800-100000566543036|WmgxdwULBgKXl8J7ksGIA1tyGik
I'm developing a Facebook application using their Graph API. I have previously developed an
We are developing a web app ( http://beta.dammela.it ) which use both FB Graph
I'm developing application using Graph API . It reads page's photo albums , but
I am developing an IPhone app. The user can post to his wall and
I'm developing a graph control in WPF. I have previously developed it using GDI
I'm developing a graph control in WPF. I need to place a Canvas on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.