findintersection.lisp

findintersection.lisp - A\UMN\AI\findintersection.lisp...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
A:\UMN\AI\findintersection.lisp Wednesday, November 09, 2011 3:21 AM ; Balaji, FNU ; Student ID: 4287938 ; Extra Credit Assignment 4 ; The algorithm tries to find if 2 given lines represented by ax+by+c = 0 ; intersect or not. It also tries to talk about the parallelity and perpendicularity ; For extra credits, I have written a very generic function that returns if ; a line is degenerate, i.e. if it is a point and I have also found out the points of ; intersection and other properties of the line defined and if it is parallel to X axis or Y axis ; Thus, this function returns ; a. If the lines are degenerate ; b. If they are parallel or coincidental ; c. If they are perpendicular and where are they intersecting ; d. If they are not perpendicular and where are they intersecting ( defun findintersection ( a1 b1 c1 a2 b2 c2 ) ( if ( and ( = a1 0 ) ( = b1 0 )) ; If line 1 is degenerate ( and ( princ "Line 1 is a point or is invalid; Quitting the program. ..." ) nil ) ( if ( and ( = a2 0 ) ( = b2 0 )) ; If line 2 is degenrate
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/21/2011 for the course ECON 229 taught by Professor John during the Spring '11 term at Globe.

Page1 / 2

findintersection.lisp - A\UMN\AI\findintersection.lisp...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online