Re: generating maximal structures

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Thu 22 May 2003 05:40:11 PM GMT
Message-ID: <3ECD0B7B.A00F622D@icparc.ic.ac.uk>
You were probably thinking of something like this:

pol(Start) :-
	polygon([Start], RevPol),
	reverse(RevPol, Pol),
	writeln(Pol).

polygon(SoFar, Result) :-
	SoFar = [Last|_],
	line(Last, _, Here),
	line(Next, Here, _),
	nonmember(Next, SoFar),
	polygon([Next|SoFar], Result).
polygon(Result, Result).


-- 
 Joachim Schimpf              /             phone: +44 20 7594 8187
 IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
 Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Thu May 22 18:40:28 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:24 PM GMT GMT