Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>At this moment, i can only answer your second question. Just do a <strong>point-line intersection test</strong>, provided that you have stored the points which define your triangle. You can find many relative algorithms in computer graphics books.</p> <p><strong>Edit</strong>: I thought a methodology to solve your basic problem (find the 3 points which define the equilateral triangle with cx, cy and radius as given data). It relies on the property that the sum of the 3 angles of any triangle is 180 degrees. I need some time to do a further check to ensure it's correct. Then, i will edit my answer to post it.</p> <p><strong>Edit-Full Answer</strong>: Implementation of this algorithmic sketch is relying on the programming language and graphics API of your choice:</p> <ul> <li>Translate the center of the 2D coordinate system (assume it's clockwise) to the center of the centroid circle. </li> <li>Store the 2 points which defines 2 straight line segments, along with the center of the circle. The union of these segments may give you the diameter of the circle. Both segments have the center of the circle as their 1 defining point. The other 2 defining points (which you need to store) are on the circumference of the circle (use the radius length of the circle to find them).</li> <li>Rotate the 2 points onto circumference by 60 degrees, one of them clockwise and the other counterclockwise. Store their new coordinates. Draw the line that connects them. You have the 2 of the 3 triangle vertices.</li> <li>Do inverse translation of the coordinate system's center.</li> <li>The remaining vertex of the triangle is the intersection point of a circle radius and the two line segments, each of them starts from its respective known triangle vertex. </li> <li>At last, store the vertices and draw the triangle.</li> </ul> <p>Hope that helps. I will try to add some drawings to clarify a bit more the steps of this methodology. Also, I will program and test these steps to ensure that solve your problem correctly.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload