Page 2 of 4

Re: MINIGRAFIK lineart

Posted: Sat Feb 03, 2018 12:50 am
by armypavarmy
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 196 times

Re: MINIGRAFIK lineart

Posted: Sun Feb 04, 2018 7:04 am
by Mike
Nice one!

Though, it can be written slightly more compact like thus (download): :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

Re: MINIGRAFIK lineart

Posted: Mon Mar 05, 2018 2:49 am
by armypavarmy
Hello
Attached .d64 file
List 1.4V4 fractal program
done with Minigrafik
Armando
FRACTALS V4.zip
(5.45 KiB) Downloaded 251 times

Re: MINIGRAFIK lineart

Posted: Mon Mar 05, 2018 2:13 pm
by Mike
Quite an intriguing pattern. :)

Your implementation misses the opportunity though to reveal its recursive nature: the bigger loops are made from ever smaller loops, down to single pixels, to build the whole figure. Here we go (download):

Code: Select all

1 @ON:@CLR:X=48:Y=128:S=64:GOSUB2:FORP=-1TO0:GETA$:P=A$="":NEXT:@RETURN:END
2 IFS=1THEN:@1,X,Y:RETURN
3 S=.25*S
4 GOSUB2:X=X+S:GOSUB2:X=X+S:GOSUB2:X=X+S:GOSUB2:Y=Y-S
5 GOSUB2:X=X+S:GOSUB2:Y=Y-S:GOSUB2:X=X-S:GOSUB2:Y=Y-S
6 GOSUB2:X=X-S:GOSUB2:X=X-S:GOSUB2:X=X-S:GOSUB2:Y=Y+S
7 GOSUB2:X=X-S:GOSUB2:Y=Y+S:GOSUB2:X=X+S:GOSUB2:Y=Y+S
8 S=4*S:RETURN

Re: MINIGRAFIK lineart

Posted: Thu Mar 15, 2018 7:36 am
by armypavarmy
My last work in graphics
Fractal named Hopalong.
Adapted from Amiga to Vic20
Attached two files
Hopalong.d64 and data table for input.
Version for Minigrafik. V3.2 Pal
Armando
hopalong.zip
(5.27 KiB) Downloaded 237 times
HOPALONG-Parameters Table.zip
(11.79 KiB) Downloaded 232 times

Re: MINIGRAFIK lineart

Posted: Fri Apr 13, 2018 2:17 am
by armypavarmy
Minigrafik Lineart. For Vic20 with at least 8K Ram.
Complete program .D64 with Minigrafik and autoboot (Mike)
The program generates a group of random lines
Which are drawn in four different positions
On the screen, to get a whole graph.
After a break at drawing completed
Another is generated in succession.
Armando
plii magic.zip
(5.18 KiB) Downloaded 186 times

Re: MINIGRAFIK lineart

Posted: Wed Jun 10, 2020 1:10 pm
by Mike
Here's a small demo ported over from Super Expander. It produces a line drawing of Garfield (download):

Image

The original program draws Garfield mostly with circle and ellipse arcs. MINIGRAFIK itself doesn't directly feature the CIRCLE command, its function is instead provided by a sub-routine in lines 12..24 of the port. I rescaled the parameters of CIRCLE to the pixel co-ordinate system of MG and put them into DATA lines.

Similarly, I replaced the "missing" PAINT command by a sub-routine in lines 26..39.

Supplying these two commands as sub-routines in BASIC makes this somewhat slower than the original in Super Expander, but the port draws the cat at a slightly higher resolution and with finer lines. I included the original SE version for reference.

Cheers,

Michael

Re: MINIGRAFIK lineart

Posted: Wed Jun 10, 2020 3:32 pm
by chysn
I got MINIGRAFIK along with Snake. Is there consolidated documentation of it somewhere?

Re: MINIGRAFIK lineart

Posted: Wed Jun 10, 2020 3:48 pm
by Mike
chysn wrote:I got MINIGRAFIK along with Snake. Is there consolidated documentation of it somewhere?
There's an own thread dedicated to the use of MG for any type of programmed graphics, see "MINIGRAFIK batch processing suite".

Here's the direct link to the manual (download). The manual mainly concerns MINIPAINT as flagship application of MINIGRAFIK, but the BASIC extension itself is covered in Appendix B.

Re: MINIGRAFIK lineart

Posted: Wed Jun 10, 2020 8:10 pm
by chysn
Thanks!

Re: MINIGRAFIK lineart Spiralizer

Posted: Thu Nov 05, 2020 8:42 am
by armypavarmy
Very Nice "Spiralizer" graphics program
Version for Minigrarfik.
Thanks to the decisive help of Mike from Denial
which followed the conversion.
Adapted from original version for "Super Expander"
Program and attached document.
Spiralizer-UK-Minigrafik-8k.zip
(129.51 KiB) Downloaded 67 times
1-7-50-9-D.jpg

Re: MINIGRAFIK lineart

Posted: Sun Dec 13, 2020 5:30 am
by Mike
You can't escape Alfred E. Neuman even on the VIC-20! :mrgreen:

Image

I ported the infamous MAD Computer Program over to the VIC-20 +16K, using MINIGRAFIK of course. The part up to line 250 is specific for the VIC-20 and does the drawing from the common DATA lines beginning at line 500. I retained the original Copyright notice.

Here's the download: https://dateipfa.de/.Public/denial/minigrafik/mad.zip

Lines 10..30, 120, and 200..250 replace the CHAR command "missing" in MINIGRAFIK to put the caption "WHAT, ME WORRY?" into the screen bitmap. It's the text print routine from the MG batch suite, slightly improved. The rest of the drawing routine closely follows the Apple ][ version. In line 40, the assignment S=(75-PEEK(60900))/105 computes a scaling factor for the x-axis that automatically adapts for PAL or NTSC.

Code: Select all

10 Z$="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[{POUND}]^{<-} !"+CHR$(34)+"#$%&'()*+,-./0123456789:;"
20 Z$=Z$+"<=>?{SHIFT-*,SHIFT-A,SHIFT-B,SHIFT-C,SHIFT-D,SHIFT-E,SHIFT-F,SHIFT-G,SHIFT-H}
   {SHIFT-I,SHIFT-J,SHIFT-K,SHIFT-L,SHIFT-M,SHIFT-N,SHIFT-O,SHIFT-P,SHIFT-Q,SHIFT-R}
   {SHIFT-S,SHIFT-T,SHIFT-U,SHIFT-V,SHIFT-W,SHIFT-X,SHIFT-Y,SHIFT-Z,SHIFT-+,C=--}
   {SHIFT--,PI,C=-*,SHIFT-SPACE,C=-K,C=-I,C=-T,C=-@,C=-G,C=-+,C=-M,C=-POUND,SHIFT-POUND}
   {C=-N,C=-Q,C=-D,C=-Z,C=-S,C=-P,C=-A,C=-E,C=-R,C=-W,C=-H,C=-J,C=-L,C=-Y,C=-U,C=-O}
   {SHIFT-@,C=-F,C=-C,C=-X,C=-V,C=-B}"
30 DIMB%(255):FORT=0TO255:B%(T)=-1:NEXT:FORT=0TO127:B%(ASC(Z$))=8*T:Z$=MID$(Z$,2):NEXT
40 S=(75-PEEK(60900))/105:XC=80:YC=96
50 POKE36879,93:POKE646,0:@ON:@CLR
60 READ X,Y,X1,Y1
70 IF X=999 THEN 120
80 FX=X*S+XC:FY=192-(Y+YC)
90 LX=X1*S+XC:LY=192-(Y1+YC)
100 @1,FX,FYTOLX,LY
110 GOTO 60
120 AD=32768:X=2:Y=22:T$="WHAT, ME WORRY ?":GOSUB200
130 GETA$:IFA$=""THEN130
140 @RETURN
150 PRINT
160 PRINT"{4 SPACE}COPYRIGHT 1985"
170 PRINT
180 PRINT"{2 SPACE}E.C.{2 SPACE}PUBLICATIONS"
190 END
200 IFT$=""THENRETURN
210 IFX<0ORY<0THENRETURN
220 IFX>19THENX=0:Y=Y+1
230 IFY>23THENRETURN
240 A1=4352+192*X+8*Y:A2=AD+B%(ASC(T$)):FORT=0TO7:POKEA1+T,PEEK(A2+T):NEXT
250 T$=MID$(T$,2):X=X+1:GOTO200
Cheers,

Michael

Re: MINIGRAFIK lineart

Posted: Thu Nov 04, 2021 6:59 am
by Mike
Just a small teaser after the successful commissioning of a polygon fill routine, a.k.a. 'rasterizer' (download):

Image

The demo program simply churns out the vertical line segments that were extracted from the rasterizing algorithm in a post-processing step:

Code: Select all

10 @ON:@CLR:FORT=1TO337:READX,Y0,Y1:@1,X,Y0TOX,Y1:NEXT
11 GETA$:ON-(A$="")GOTO11:@RETURN:END
12 :
13 DATA 16,77,78,17,71,79,18,64,79,19,58,79,20,51,80,21,45,80,22,38,80,23,32,80,24,25
14 DATA 80,25,19,70,26,16,60,27,16,50,28,16,41,29,16,31,30,17,35,31,18,40,32,22,45,33
15 DATA 26,50,34,30,56,35,34,59,36,38,59,37,42,59,38,46,59,39,47,59,40,43,59,41,39,59
16 DATA 42,34,58,43,30,56,44,26,52,45,21,48,46,17,44,47,14,39,48,14,35,49,14,31,50,13
17 DATA 45,51,13,62,52,13,78,53,19,79,54,27,79,55,35,79,56,43,79,57,52,78,58,60,78,59
18 DATA 68,78,60,76,78,66,13,17,67,12,37,68,12,56,69,12,75,70,12,77,71,11,77,72,11,77
19 DATA 73,11,78,74,10,78,75,29,78,76,67,78,86,48,77,87,9,77,88,9,77,89,9,78,90,9,78,91
20 DATA 9,78,92,10,78,93,10,30,94,10,27,95,10,31,96,13,35,97,17,40,98,21,44,99,25,48
21 DATA 100,29,52,101,33,57,102,37,61,103,41,65,104,45,70,105,49,74,106,53,78,107,57,80
22 DATA 108,61,80,109,65,80,110,69,80,111,63,80,112,46,81,113,29,81,114,13,81,115,11,81
23 DATA 116,11,81,117,12,72,118,12,59,119,12,46,120,12,33,121,12,20,127,77,84,128,65,85
24 DATA 129,54,85,130,42,85,131,30,85,132,19,86,133,15,86,134,15,85,135,16,75,136,16,65
25 DATA 137,16,54,138,16,44,139,17,34,140,17,23,2,125,163,3,116,166,4,114,168,5,112,171
26 DATA 6,110,135,6,148,173,7,109,127,7,159,175,8,107,120,8,166,177,9,106,115,9,166,177
27 DATA 10,106,114,10,167,177,11,106,114,11,167,177,12,106,114,12,145,151,12,168,177,13
28 DATA 106,114,13,145,151,13,168,177,14,106,113,14,145,151,14,168,177,15,106,113,15
29 DATA 145,151,15,169,176,16,106,113,16,145,151,16,166,175,17,106,113,17,145,151,17
30 DATA 161,174,18,106,114,18,145,151,18,157,172,19,106,116,19,146,151,19,153,171,20
31 DATA 108,118,20,146,166,21,109,119,21,146,161,22,111,121,22,146,176,23,113,120,23
32 DATA 146,176,24,114,118,24,146,176,25,116,116,25,149,176,31,104,104,31,105,167,32
33 DATA 104,106,32,107,174,33,104,107,33,108,173,34,103,109,34,110,173,35,103,111,35
34 DATA 112,173,36,103,111,36,132,150,36,166,173,37,103,110,37,132,153,38,103,110,38
35 DATA 132,156,39,103,110,39,132,139,39,142,159,40,103,110,40,132,139,40,145,162,41
36 DATA 103,110,41,132,139,41,149,165,42,103,110,42,131,139,42,152,168,43,103,112,43
37 DATA 130,139,43,155,171,44,103,113,44,129,139,44,158,173,45,104,123,45,127,137,45
38 DATA 162,172,46,106,136,46,165,172,47,107,134,47,168,172,48,109,133,48,172,172,49
39 DATA 111,132,52,170,172,53,165,172,54,161,172,55,156,172,56,152,172,57,147,172,58
40 DATA 143,169,59,138,164,60,134,159,61,129,154,62,125,149,63,120,144,64,116,144,65
41 DATA 111,135,65,137,145,66,107,130,66,137,145,67,102,125,67,138,145,68,101,109,68
42 DATA 109,121,68,138,145,69,101,120,69,138,145,70,101,129,70,138,145,71,101,145,72
43 DATA 101,148,73,105,157,74,114,166,75,123,174,76,132,174,77,141,174,78,150,174,79
44 DATA 159,174,80,167,174,86,152,174,87,106,174,88,102,175,89,102,175,90,102,175,91
45 DATA 102,175,92,102,175,93,102,175,94,102,141,95,102,111,95,132,141,96,103,111,96
46 DATA 132,141,97,103,111,97,132,141,98,103,111,98,132,142,99,103,111,99,132,142,100
47 DATA 103,112,100,132,142,101,103,112,101,133,142,102,103,112,102,133,142,103,103,112
48 DATA 103,133,142,104,103,112,104,133,142,105,104,112,105,133,143,106,104,112,107,104
49 DATA 112,108,104,112,109,104,113,110,104,113,111,104,113,112,104,113,115,169,176,116
50 DATA 143,176,117,118,176,118,105,176,119,105,177,120,105,177,121,105,177,122,105,174
51 DATA 123,106,149,124,106,123,127,173,178,128,150,179,129,128,179,130,107,179,131,107
52 DATA 179,132,108,180,133,108,172,134,108,151,135,108,135,135,138,153,136,108,113,136
53 DATA 136,154,137,135,156,138,133,158,139,131,145,139,146,160,140,130,143,140,148,162
54 DATA 141,128,142,141,149,164,142,126,140,142,151,166,143,125,139,143,153,168,144,123
55 DATA 138,144,154,170,145,122,136,145,156,172,146,120,135,146,158,174,147,118,133,147
56 DATA 159,176,148,117,132,148,161,178,149,115,131,149,163,180,150,113,129,150,164,182
57 DATA 151,112,128,151,166,182,152,110,126,152,168,182,153,110,125,153,169,182,154,110
58 DATA 124,154,171,182,155,111,122,155,173,183,156,111,121,157,111,119
59 :
60 REM ** MG POLYGON FILL WRITTEN 2021-11-04 BY MICHAEL KIRCHER
... more to follow in the main thread about MG in the next days ... :mrgreen:

Re: MINIGRAFIK lineart

Posted: Wed Aug 23, 2023 8:15 am
by Mike
MrSterlingBS wrote: Wed Aug 23, 2023 7:18 am Okay, sorry for posting some source code again as text.
This version includes the faster sqr routine from WIMOS.
The graphic demo is from the FORUM64.

Code: Select all

0 sa=828
10 forn=0to57
20 read a%:pokesa+n,a%:next
30 data 32,43,220,240,52,16,3,76
40 data 72,210,32,199,219,165,97,56
50 data 233,129,8,74,24,105,1,40
60 data 144,2,105,127,133,97,169,4
70 data 133,103,32,202,219,169,92,160
80 data 0,32,15,219,169,87,160,0
90 data 32,103,216,198,97,198,103,208
100 data 233,96
105 @on:@clr
110 poke1,60:poke2,03
115 x1=80:x2=79:y1=96:y2=95
117 ti$="000000"
120 forx=1to80:fory=-96to95
125 w=atn(y/x):r=usr(x*x+y*y)
130 h=.5+sin(w+w+log(r)*10)/2
135 ifh<rnd(1)then145
140 @1,x1-x,y1+y:@1,x2+x,y2-y
145 next:next
150 te=ti
155 geta$
160 ifa$=""then155
165 @return
170 print"zeit: "te
Nice!

Here's the graphic result of one run. The display is point-symmetric (see line 140):

Image

For completeness, here's also milkiway.prg itself. As always, start up MINIGRAFIK before. :)

Re: MINIGRAFIK lineart

Posted: Wed Aug 23, 2023 8:57 am
by Wilson
Very nice! 8)