MINIGRAFIK lineart

Basic and Machine Language

Moderator: Moderators

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

Re: MINIGRAFIK lineart

Post by Mike »

Here's another port of Super Expander lineart to MINIGRAFIK (download); this time,
allenhuffman wrote:'s
Kangaroo duo Lionel and Joey:

Image

As with Garfield earlier in this thread, the drawing is primarily made from circle/ellipse arcs and lines. The MG implementation of CIRCLE as sub-routine in BASIC is somewhat slower than the CIRCLE command of SE, but the port draws everything with finer lines and at the slightly higher resolution of MG, 160x192 pixels vs 160x160 of SE:

Code: Select all

10 DIMB%(255),N(7),S(90):GOTO34
11 :
12 B=W*B:IFD>=ETHENE=E+F
13 IFRTHENI=D:D=R:GOSUB20:U=C:V=S:D=I
14 GOSUB20:GOSUB18:I=X:J=Y
15 D=D+K:IFD>ETHEND=E
16 GOSUB20:GOSUB18:@G,I,JTOX,Y:I=X:J=Y:IFD<ETHEN15
17 RETURN
18 X=S*A:Y=C*B:IFRTHENZ=U*Y-V*X*W:X=U*X+V*Y/W:Y=Z
19 X=M+X+.5:Y=N-Y+.5:RETURN
20 Z=D-F*INT(D/F)
21 IFZ<QTHENS=S(Z):C=S(Q-Z):RETURN
22 IFZ<HTHENS=S(H-Z):C=-S(Z-Q):RETURN
23 IFZ<TTHENS=-S(Z-H):C=-S(T-Z):RETURN
24 S=-S(F-Z):C=S(Z-T):RETURN
25 :
26 IFX<0ORY<0THENRETURN
27 IFT$=""THENRETURN
28 IFX>19THENX=0:Y=Y+1
29 IFY>23THENRETURN
30 A1=4352+192*X+8*Y:A2=AD+8*B%(ASC(T$))
31 FORT=0TO7:POKEA1+T,PEEK(A2+T):NEXT
32 T$=MID$(T$,2):X=X+1:GOTO27
33 :
34 FORT=0TO31:B%(32+T)=32+T:B%(64+T)=T:B%(160+T)=96+T:IFT<>30THENB%(192+T)=64+T
35 NEXT:B%(255)=94
36 FORT=0TO7:READN(T):NEXT
37 Q=90:H=180:T=270:F=360:W=5/3
38 FORZ=0TO90:S(Z)=SIN({PI}*Z/180):NEXT
39 :
40 V=36864:POKEV+14,9:POKEV+15,25:POKE646,6:@ON:@CLR
41 G=1:K=10:R=0:AD=32768
42 M=80:N=140:A=23:B=20:D=180:E=270:GOSUB12
43 M=80:N=140:A=16:B=23:D=288:E=306:GOSUB12
44 @1,73,127TO56,127:@1,56,127TO56,140
45 M=80:N=140:A=16:B=23:D=65:E=126:GOSUB12
46 M=65:N=178:A=16:B=3:D=0:E=360:GOSUB12
47 M=62:N=174:A=16:B=3:D=234:E=36:GOSUB12
48 @1,80,178TO156,178
49 M=156:N=9:A=156:B=101:D=180:E=205:GOSUB12
50 M=80:N=96:A=12:B=11:D=288:E=342:GOSUB12
51 @1,91,98TO91,112
52 @1,76,65TO76,76
53 @1,83,65TO83,76
54 M=80:N=50:A=9:B=9:D=252:E=198:GOSUB12
55 @1,75,48 : M=75:N=48:A=1:B=1:D=0:E=360:GOSUB12
56 @1,82,48 : M=82:N=48:A=1:B=1:D=0:E=360:GOSUB12
57 M=70:N=60:A=11:B=3:D=97:E=360:GOSUB12
58 M=60:N=58:A=1:B=1:D=0:E=360:GOSUB12
59 @1,78,37TO70,18:@1,70,18TO66,28:@1,66,28TO74,37
60 @1,85,37TO93,18:@1,93,18TO97,28:@1,97,28TO88,40
61 @1,83,76TO107,105:@1,107,105TO83,133
62 @1,83,90TO96,105:@1,96,105TO83,121
63 M=83:N=127:A=4:B=3:D=0:E=360:GOSUB12
64 @1,68,90TO60,105:@1,60,105TO71,120
65 @1,67,103TO76,116
66 M=74:N=118:A=3:B=3:D=0:E=360:GOSUB12
67 M=56:N=112:A=4:B=3:D=234:E=180:GOSUB12
68 M=52:N=117:A=5:B=2:D=108:E=360:GOSUB12
69 M=53:N=104:A=2:B=3:D=0:E=360:GOSUB12
70 M=57:N=104:A=2:B=3:D=0:E=360:GOSUB12
71 M=55:N=114:A=0:B=1:D=0:E=360:GOSUB12
72 @1,58,119TO66,128
73 @1,55,119TO57,128
74 M=56:N=128:A=2:B=1:D=0:E=360:GOSUB12
75 M=86:N=154:A=13:B=12:D=198:E=18:GOSUB12
76 @1,80,101:@1,76,96:@1,83,107:@1,86,112:@1,73,90
77 M=62:N=168:A=63:B=56:D=47:E=90:GOSUB12
78 M=62:N=168:A=78:B=68:D=22:E=90:GOSUB12
79 @1,75,76TO0,76
80 @1,0,56TO62,56
81 @1,125,178TO125,191
82 @1,140,178TO140,191
83 @1,0,0TO157,0:@1,157,0TO157,191:@1,157,191TO0,191:@1,0,191TO0,0
84 Y=7.375:X=1:T$="LIONEL":GOSUB26
85 Y=8.375:X=1:T$="& JOEY":GOSUB26
86 P$="EDEDEDC@FEFEFED@EDEDEDC@DFEDC@@GC@"
87 FORT=1TO34:POKEV+11,N(ASC(MID$(P$,T,1))-64):FORS=1TO120:NEXT:NEXT
88 :
89 GETA$:IFA$=""THEN89
90 @RETURN:END
91 :
92 DATA 0,179,187,191,198,204,207,212
Lines 40 to 87 correspond to the original program, the rest is boilerplate (CIRCLE sub-routine at line 12, CHAR sub-routine at line 26, some array initialization in lines 34 to 38). :wink:

Greetings,

Michael
allenhuffman
Vic 20 Amateur
Posts: 46
Joined: Fri May 21, 2010 11:50 pm
Website: http://www.subethasoftware.com
Location: Des Moines, Iowa, US
Occupation: Embedded programmer.

Re: MINIGRAFIK lineart

Post by allenhuffman »

I am trying to find why I was quoted here? I don’t see a post?
User avatar
Mike
Herr VC
Posts: 5130
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: MINIGRAFIK lineart

Post by Mike »

allenhuffman wrote:I am trying to find why I was quoted here? I don’t see a post?
That's Denial's way of notifying someone about a post that might be of his or her interest. :mrgreen:
User avatar
MrSterlingBS
Vic 20 Afficionado
Posts: 303
Joined: Tue Jan 31, 2023 2:56 am

Re: MINIGRAFIK lineart

Post by MrSterlingBS »

Good morning,

here is some nice graphic i like to share with you.
- LOXODROME -
Loxodrome.png
Loxodrome.png (3.97 KiB) Viewed 4303 times

Code: Select all

10 @on:@clr
15 b=-1.2:w=.06:d=.6
20 xa=80:xb=80:yb=ya
21 ya=96-96*sin(b)*cos(d)-96*cos(l)*cos(b)*sin(d)
30 l=l+.1:b=b+w*.1*cos(b)
40 x=80+79*sin(l)*cos(b)/1.25
50 y=96-96*sin(b)*cos(d)-96*cos(l)*cos(b)*sin(d)
51 z=sin(b)*sin(d)-cos(l)*cos(b)*cos(d)
60 if z>0 then:@1, xa,ya to x,y:xa=x:ya=y
61 if z<=0 then:@1,((2*x+xa)/3),((2*y+ya)/3) to x,y:xa=x:ya=y
70 if l<80then30
80 geta$:ifa$=""then80
90 @return
armypavarmy
Vic 20 Hobbyist
Posts: 110
Joined: Wed Oct 02, 2013 1:54 am
Location: Italy

Re: MINIGRAFIK lineart Loxodrome

Post by armypavarmy »

Hi
I wrote the listing you entered but it doesn't work.
Problem with line 30 at the beginning.
not possible to insert 1=1+.1
And with letter I=I+.1 it doesn't work either.
Thanks for your help
Best regards....Armando
User avatar
MrSterlingBS
Vic 20 Afficionado
Posts: 303
Joined: Tue Jan 31, 2023 2:56 am

Re: MINIGRAFIK lineart

Post by MrSterlingBS »

Hi Armando,

I will take a look tomorrow…
User avatar
MrSterlingBS
Vic 20 Afficionado
Posts: 303
Joined: Tue Jan 31, 2023 2:56 am

Re: MINIGRAFIK lineart

Post by MrSterlingBS »

Hello,

attached the txt file for the VICE Emulator.
Just copy and paste the text in VICE.
This version should work, i have tested it right now.

BR
Sven
Loxodrome.zip
(402 Bytes) Downloaded 259 times
Vic20-Ian
Vic 20 Scientist
Posts: 1224
Joined: Sun Aug 24, 2008 1:58 pm

Re: MINIGRAFIK lineart Loxodrome

Post by Vic20-Ian »

armypavarmy wrote: Mon Nov 25, 2024 4:39 am Hi
I wrote the listing you entered but it doesn't work.
Problem with line 30 at the beginning.
not possible to insert 1=1+.1
And with letter I=I+.1 it doesn't work either.
Thanks for your help
Best regards....Armando
Looks like a lower case L to me, l, use this in Line 50 and 70 also.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
Post Reply