PDP-10 / its

Incompatible Timesharing System
Other
868 stars 84 forks source link

Recursive C Curve #1529

Open larsbrinkhoff opened 5 years ago

larsbrinkhoff commented 5 years ago

Recursive C Curve, ~1968 from program by Gosper on 340 display of PDP6

Is seems doubtful we'll ever find the program that drew this. But it shouldn't be too hard to make a new.

recursive-c-curve

Source: http://media.csail.mit.edu/picture.php?/3807/category/173
http://media.csail.mit.edu/picture.php?/3802

larsbrinkhoff commented 5 years ago

How to: http://bjc-nc.github.io/bjc-course/curriculum/07-recursion/labs/04-c-curve

Alexey-Slyusar commented 5 years ago

A LLOGO C curve version rendered on 340:

2019-02-10 19-11-30

And the code in LLOGO:

?rf c
;READING C > DSK ALEXEY
TO C :SIZE :LEVEL
10 IF :LEVEL = 0 THEN FORWARD :SIZE STOP
20 C :SIZE :LEVEL - 1
30 RIGHT 90
40 C :SIZE :LEVEL - 1
50 LEFT 90
END
;C DEFINED

?c 3 14

It is little bit easier to understand than HACKMEM description :-)

Alexey-Slyusar commented 5 years ago

HACKMEM's (MIT AI Memo 239) item 135 (Gosper) provides C curve description. As for Memo 239 itself it is real treasure and it is very exciting that it is possible to see some ideas running. @eswenson1 @larsbrinkhoff could you please take a look at AIM 239. Possibly it will be fun for you too. The document says that unless otherwise stated, all code written in PDP 6/10 assembly language. Is the assembly MIDAS or something else?

larsbrinkhoff commented 5 years ago

Thanks, that's beautiful!

I usually read from the HTML version by MIT hacker Henry Baker:
http://home.pipeline.com/~hbaker1/hakmem/hakmem.html

There's also an OCR'ed memo:
https://w3.pppl.gov/~hammett/work/2009/AIM-239-ocr.pdf

larsbrinkhoff commented 5 years ago

I haven't checked every assembly language snippet, but most look like they would be OK with both MIDAS and MACRO.

I think there's a bug in Item 146. XOR 1,2 should be XOR 2,1.

Alexey-Slyusar commented 5 years ago

Thanks for the links and explanation, Lars! The versions is much more convenient / easy to copy / navigate than version published on MIT DSPACE. As far as I am understand, Baker's version provides in addition comprehensive MIDAS document.

I think there's a bug in Item 146. XOR 1,2 should be XOR 2,1.

I have no idea how to execute the item 146 related code on ITS. Lars, could you please provide with an information how to run this:

        DATAI 2
        ADDB 1,2
        ROTC 2,-22
        XOR 1,2
        JRST .-4
larsbrinkhoff commented 5 years ago

There's a lot missing to make those five lines a useful program. 1 and 2 are PDP-10 accumulators (registers). The program is supposed to plot a point at the coordinates in accumulators 2 and 3.

I made such a program, and it's on my branch called lars/munching. It's still not very useful, but you can see it tries to draw the munching squares.

You can see the PDP-1 version here if you select the right item from the drop down list:
https://www.masswerk.at/minskytron/