Clinton Freeman

Computer Science, Design

Main menu

Skip to primary content
Skip to secondary content
  • Articles
  • Level Design
    • Wend
    • Dwell
    • Lost at Sea
      • Making of Lost at Sea
    • Putrefactory
    • Simmer
    • Misery
    • Disposed
    • Bricks, Rocks, n’ Stuff
    • Rust in Peace
    • SaintTourney1
    • SaintCTF3
    • SaintCTF2
    • SaintCTF1
  • Software
    • Exact3D
    • PoseDesigner
    • Q3Plan
    • RationalCAD

Tag Archives: orient2d

Computing General Form Line Coefficients From Two Points

Posted on January 25, 2021 by Clinton Freeman

The general form of a line equation is given as ax + by + c=0. Given two points (x_1, y_1) and (x_2, y_2), we can compute coefficients a, b, and c as follows. First, compute the slope as rise over run m = (y_2 - y_1)/(x_2 - x_1). Second, plug this value m and one of the points into the point-slope form, given by y - y_1 = m(x - x_1), and gather all terms on the lefthand side:

Continue reading →

Posted in Math, Programming | Tagged orient2d, orientation predicate | 2 Replies

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Powered by Wordpress

This site’s content and theme are a result of many years of slow accretion. Based on TwentyEleven by the fine folks at WordPress. Tentatively and uncreatively dubbed The FreeMan Theme. Find me on Mastodon.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1 other subscriber