Re: Vertex List from Points




eclifter wrote:
> 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)

I assume you mean point(a), point(b) etc since identifiers starting
with an uppercase letter are variables in Prolog - if so, then you can
use:

?- findall(P, point(P), ListOfPoints).

For other situations where you need to get things from the database
into a list you can also use setof/3 or bagof/3 but these are slightly
more complicated to understand than findall/3 above.

Regards, Brian.

.



Relevant Pages

  • Vertex List from Points
    ... I am a total newbie to prolog but have some understanding of graphics. ... can't figure out how to get this data INTO list form. ...
    (comp.lang.prolog)
  • Re: lists
    ... This process is not unlike the process of developing a Prolog ... description says and you test that understanding by seeing if it can be ... is never re-prioritized with respect to existing goals as the agent ...
    (comp.lang.prolog)
  • Problem mit pdf und pst-pdf
    ... graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics ... graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics ... Unknown in Prolog section at line 97: ...
    (de.comp.text.tex)
  • Re: Prolog for the AI part of games
    ... I am not aware of Prolog use for large, popular, commercial games such ... with such extreme graphics. ... I have seen Prolog used in games like chess (I even have a Prolog ...
    (comp.lang.prolog)
  • Re: Going to FAIL coursework!
    ... > - it makes sense in English, but when it comes to putting it in ProLog, I ... > the answer to this question - I'm not fundamentally understanding something ... But the Prolog processor has very limited understanding and can't ...
    (comp.lang.prolog)