MINIGRAFIK lineart

Basic and Machine Language

Moderator: Moderators

armypavarmy
Vic 20 Amateur
Posts: 55
Joined: Wed Oct 02, 2013 1:54 am
Location: Italy

Re: MINIGRAFIK lineart

Postby armypavarmy » Sat Feb 03, 2018 12:50 am

New Fractal

The Langton ant walk.
This program draws a particular figure that you get with one
simple mathematical formula. Illustrate as a behavior
apparently casual may, after some time, become perfectly
regular
langton.zip
(5.56 KiB) Downloaded 4 times

User avatar
Mike
Herr VC
Posts: 3116
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: MINIGRAFIK lineart

Postby Mike » Sun Feb 04, 2018 7:04 am

Nice one!

Though, it can be written slightly more compact like thus: :wink:

Code: Select all

1 DIMD(4):D(1)=1:D(3)=-1:X=80:Y=96:@ON:@CLR
2 C=@(X,Y):D=(D+2*C-1)AND3:@1-C,X,Y:X=X+D(D):Y=Y+D(D+1):GOTO2

Cheers,

Michael
Attachments
ant.zip
(212 Bytes) Downloaded 3 times


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest