Question: Write a prolog program to draw hilbert curves. STEP 1: In the first step, the program should produce a list of x-y coordinates, starting at

Write a prolog program to draw hilbert curves.

STEP 1: In the first step, the program should produce a list of x-y coordinates, starting at (0,0), and progressing through all the line segments until the final segment. To record these coordinates, you will need a list structure that contains the coordinate list as well as the current position on the canvas. For example, at some point in the middle of the program, the list structure may contain:

Board = [[[60,0],[40,0],[40,20],[60,20]],60,0]

Step 2:The second step is to produce two files containing the HTML and Javascript code to display the curves on a Web page. For this, you will need the following I/O predicates and atom concatenation predicate of SWI-Prolog:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!