Coder Social home page Coder Social logo

haskell-line-intersect's Introduction

haskell-line-intersect

Intersection parameter and point for two parameterized 2D point-vector lines

This is a Haskell For Mac project that supports and explores the computation of the intersection, in 2D, of two parameterised lines. The focus on parameterized lines is especially useful for the problem of trying to detect a possible intersection of a line with a line segment. By expressing the line segment, P0 to P1 as a parameterized line, P = P0 + t * (P1 - P0), and solving got the point of intersection in terms of t, then the line intersects the segment if t is 0 <= t <= 1, and otherwise not. For two segments PA0 PA1 and PB0 PB1, the intersection computation can be used first for one segment parameter, t, and (by reversing the roles of the two segments) for the second segment parameter, u. The two segments intersect, then, when 0 <= t <= 1 and 0 <= u <= 1, otherwise not.

See http://haskellformac.com/ for details on Framework. Note that this exercise contains an illustration that depends on Hakell for Mac, however, the underlying Haskell code can be easily seperated and used in other graphics frameworks (e.g. gloss - https://hackage.haskell.org/package/gloss).

haskell-line-intersect's People

Contributors

terry-weymouth avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.