Vertex List from Points
- From: "eclifter" <eclifter@xxxxxxxxx>
- Date: 15 May 2005 16:59:01 -0700
I am a total newbie to prolog but have some understanding of graphics.
I have a set of points which are required to be in the form:
Point(a)
Point(b)
Point(c)
Point(d)
And a set of edges of the form:
edge(a,b)
edge(a,c)
edge(b,d)
I've tried several ways to get this into 'normal' form:
[a,b,c,d]
and
[e(a,b),e(a,c),e(b,d)]
But to no avail. Maybe I'm just frustrated with the problem but I
can't work it out in my head.
Latest thing I tried is:
points(L) :- Point(X), append([],[X],L).
But that just gets them out one at a time:
[a]
[b]
[c]
[d]
and not a whole list. I'm very, very frustrated because I feel I have
started to understand prolog when things are given in list form but
can't figure out how to get this data INTO list form.
Any help would be very, very gratefully received!!!!
TIA
.
- Follow-Ups:
- Re: Vertex List from Points
- From: Brian Hulley
- Re: Vertex List from Points
- Prev by Date: Re: gplc is outputting a lot of errors (problem solved)
- Next by Date: Re: Vertex List from Points
- Previous by thread: gplc is outputting a lot of errors
- Next by thread: Re: Vertex List from Points
- Index(es):
Relevant Pages
|
|