MINIGRAFIK lineart

Basic and Machine Language

Moderator: Moderators

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

MINIGRAFIK lineart

Postby armypavarmy » Sat Oct 07, 2017 3:07 am

Hello to all.........
The included .zip file contains
four graphics programs for Minigrafik
The original listings were taken from Plus / 4
and ZX Spectrum and adapted to me by Minigrafik.
Load and run Minigrafik before
then load and run the program you chose.
at the end of the chart
Press a key to return to the basic
Armando ...................
minigr-p.zip
(1.38 KiB) Downloaded 7 times

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

Re: MG lineart - Halloween

Postby armypavarmy » Sun Oct 22, 2017 6:12 am

Hello to all
halloween lantern
for maxi maxigrafik and mini minigrafik
For minigrafik sound and lightning effect.
Drawn and adapted from Super Expander program
Good halloween .............. Armando

halloween.prg.zip
(1.59 KiB) Downloaded 9 times

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

Re: MG lineart - Castles

Postby armypavarmy » Thu Nov 09, 2017 11:54 am

Hi.........

collection of five castles
drawn by me with minigrafik
to go to the next one, press a key
castles.prg.zip
(6.04 KiB) Downloaded 12 times


--------------Armando

User avatar
ral-clan
plays wooden flutes
Posts: 3520
Joined: Thu Jan 26, 2006 2:01 pm
Location: Canada

Re: Re: MG lineart - Castles

Postby ral-clan » Thu Nov 09, 2017 6:32 pm

How do I view these?

I loaded them into VIC both expanded RAM and non expanded and after RUN nothing happened.
Image Music I've made with 1980s electronics, synths and other retro-instruments: http://theovoids.bandcamp.com

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

Re: Re: MG lineart - Castles

Postby armypavarmy » Fri Nov 10, 2017 1:20 am

First load and run Minigrafik program
secon load and run Castle program
.....................Armando

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

Re: Re: MG lineart - Castles

Postby Mike » Fri Nov 10, 2017 12:55 pm

For exactly those scenarios: either a member of the audience possibly doesn't know about MINIGRAFIK at all or does not know what it is supposed to do and how to use it, or a client program is working and the programmer wants to automatise the 'start-up procedure' of MG for a release, I have provided MAKEBOOT with the MG batch suite.

As an example, I have prepended 'castles.prg' with exactly that boot loader, and put the three files: BOOT, MINIGRAFIK and CASTLES in a *.zip-ped *.d64. See the attachment:

castles.zip
(8.03 KiB) Downloaded 9 times

The graphics demo needs at least a +16K RAM expansion, and as MINIGRAFIK works with both NTSC and PAL, so does this demo.

Any questions?

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

Re: MG lineart - Lighthouse

Postby armypavarmy » Tue Nov 14, 2017 6:04 am

Hello to all
My last design with Minigrafik
Attached d64 files with autoboot.

Question.
you can sketch a diagonal line
for points using only the plot command?
Not with plot To ........ for line draw.
Greeting.....
Thank Mike for help.
.............Armando
lighthouse.d64.zip
(9.64 KiB) Downloaded 7 times

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

Re: MG lineart - Lighthouse

Postby Mike » Tue Nov 14, 2017 8:31 am

Hi, Armando.

I merged all your threads with MINIGRAFIK lineart into one thread. The chances are higher to keep up a coherent discussion if you don't open a new thread for each new example. There's an all-compassing topic title, which fits: "MINIGRAFIK lineart".

armypavarmy wrote:Attached d64 files with autoboot.

O.K. - please try for yourself to create a new BOOT file with MAKEBOOT to suit the application name. Just reusing the boot loader from the castles demo (where *I* did the work to show you how it's done properly) obviously didn't have the intended learning effect if you go and "just" rename the client application instead! Saying "It was the easiest thing to do" is no excuse here. MAKEBOOT is able to address any conceivable name for the client application.

[...][can you] sketch a diagonal line for points using only the plot command?

Of course you can. Just use the algebraic line equation y=m*x+b. Or Bresenham. Of course it will be slower than the built-in line command (which, incidentally, uses the Bresenham algorithm). What would you want to use it for?

P.S. Given the Lighthouse demo, I have an idea how you might have wanted to use it - but I want that use case confirmed by you. And in that case, your 'problem' could also be solved by an equation system with two unknown variables.

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

Re: MINIGRAFIK lineart

Postby armypavarmy » Wed Nov 15, 2017 5:55 am

Mike wrote:

[...][can you] sketch a diagonal line for points using only the plot command?

Of course you can. Just use the algebraic line equation y=m*x+b. Or Bresenham. Of course it will be slower than the built-in line command (which, incidentally, uses the Bresenham algorithm). What would you want to use it for?


Armando wrote:

I want to use for very long diagonal
like those used for the lighthouse.
a diagonal example with formula values
I would be useful to understand the value of
variables m and b..
Diagonal data: X 90 to100 : Y 85 to 190
XX 140 to 150 : YY 85 to 190
Greeting…..Armando

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

Re: MINIGRAFIK lineart

Postby Mike » Wed Nov 15, 2017 9:27 am

Mike wrote:What would you want to use it for?

armypavarmy wrote:I want to use for very long diagonal like those used for the lighthouse. [...]

Diagonal data: X 90 to100 : Y 85 to 190
XX 140 to 150 : YY 85 to 190

The built-in line drawing command obviously can put those on screen perfectly well with @1,90,85TO100,190 and @1,140,85TO150,190. So that's not the real problem you're up to.

a diagonal example with formula values
I would be useful to understand the value of
variables m and b..

See here: Retta nel piano cartesiano. Especially the section "Retta passante per due punti".

For lines with a slope |m|>1 you'd actually invert the formula and step over y values with other values of "m" and "b", i.e. x = m' * y + b' ... however, it's of no use to revert to a pixel-wise plot to draw lines - when there's a built-in, faster line routine available - unless you have another compelling reason, which you didn't disclose thus far.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests