A bit of art
Re: A bit of art
Original and very nice Cristian Mondrian might not be too pleased that you found him out
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
Re: A bit of art
Hi Cristian,
You have a very creative mind, have I told you so?
I wonder what his paintings were selling at, as he died very recently, some 1944 (as my lexicon on history of art says) ?
Picaso would be difficult one to tackle on QL screen.
Another challenge for you
Delaunay's 'half circles'.
Tomas
You have a very creative mind, have I told you so?
I wonder what his paintings were selling at, as he died very recently, some 1944 (as my lexicon on history of art says) ?
Picaso would be difficult one to tackle on QL screen.
Another challenge for you
Delaunay's 'half circles'.
Tomas
Re: A bit of art
Pjw, Tomas,
thanks for your benevolent appreciations.
I've already some ideas about Delaunay's 'half circles'
...maybe if I find some time...
thanks for your benevolent appreciations.
I've already some ideas about Delaunay's 'half circles'
...maybe if I find some time...
Last edited by Cristian on Mon Jan 09, 2017 7:35 pm, edited 1 time in total.
Re: A bit of art
Here is an improved code by Pjw. It can run on any screen size, and could now be used as a module under Cuedark, one of the "standard" QL screen saver utilities. Larger screens are not for QDOS, of course, so this needs SMSQ/E. Enjoy!
Code: Select all
100 REMark *************************************
110 REMark ** **
120 REMark ** MONDRIAN SIMULATOR **
130 REMark ** 1.0 - CRX 2017 **
140 REMark ** 1.1 Fits all screen sizes **
150 REMark ** **
160 REMark *************************************
170 :
180 RANDOMISE DATE
190 ch = FOPEN(#0; "con_")
200 xsz% = SCR_XLIM(#ch): ysz% = SCR_YLIM(#ch): rem Get screen dimensions
210 WINDOW#ch; xsz%, ysz%, 0, 0: PAPER#ch; 7
220 MODE 4
230 l=150: l2=330: a=222: a2=88
240 PAINT 210,224,250,7
250 :
260 BORDER#ch; 9, 0: BORDER#ch; 7, 7, 0, 3: BORDER#ch; 0
270 draw 375,129
280 OVER#ch; 1: CSIZE#ch; 2,1
290 INK#ch; 0: CURSOR#ch; PCX%(257),PCY%(113): PRINT#ch; 'M o n d r i a n'
300 CURSOR#ch; PCX%(256),PCY%(112): PRINT#ch; 'M o n d r i a n'
310 draw 423,157
320 INK#ch; 2: CURSOR#ch; PCX%(290),PCY%(140): PRINT#ch; 's i m u l a t o r'
330 INK#ch; 0: CURSOR#ch; PCX%(291),PCY%(141): PRINT#ch; 's i m u l a t o r'
340 OVER#ch; 0: PAUSE#ch; 90
350 CSIZE#ch; 0,0: CURSOR#ch; PCX%(363),PCY%(229): PRINT#ch; 'v 1.1 CRX 2O17'
360 PAUSE#ch; 200
370 MODE 8
380 :
390 REPeat composition
400 random
410 IF l2>(l-25) AND l2<l: l2=l2-RND(30 TO 40)
420 IF l2>=l AND l2<(l+25): l2=l2+RND(35 TO 45)
430 IF a2>(a-20) AND a2<=a: a2=a2-RND(40 TO 60)
440 :
450 COLOR
460 PAINT col1,col2,col3,col4
470 IF CODE(INKEY$(#ch; 400)) = 27: QUIT
480 END REPeat composition
490 :
500 DEFine PROCedure draw (max,y)
510 FOR x=150 TO max STEP 2
520 BLOCK#ch; 2,1,PCX%(x),PCY%(y),0
530 PAUSE#ch; 1
540 END FOR x
550 END DEFine draw
560 :
570 DEFine PROCedure random
580 l=RND(60 TO 440): l2=RND(60 TO 440)
590 a=RND(40 TO 220): a2=RND(50 TO 220)
600 case=RND(1 TO 4)
610 END DEFine random
620 :
630 DEFine PROCedure COLOR
640 SELect ON case
650 ON case=1: col1=1: col2=7: col3=6: col4=2
660 ON case=2: col1=6: col2=1: col3=2: col4=7
670 ON case=3: col1=2: col2=6: col3=7: col4=1
680 ON case=4: col1=7: col2=2: col3=1: col4=6
690 END SELect
700 END DEFine COLOR
710 :
720 DEFine PROCedure PAINT(c1,c2,c3,c4)
730 CLS#ch
740 BLOCK#ch; PCX%(l),PCY%(a),0,0,0
750 BLOCK#ch; PCX%(l)-6,PCY%(a)-5,0,0,c1
760 BLOCK#ch; xsz%-PCX%(l)+6,PCY%(a2),PCX%(l)-6,0,0
770 BLOCK#ch; xsz%-PCX%(l),PCY%(a2)-5,PCX%(l),0,c2
780 BLOCK#ch; PCX%(l2)+6,ysz%-PCY%(a)+5,0,PCY%(a)-5,0
790 BLOCK#ch; PCX%(l2),ysz%-PCY%(a),0,PCY%(a),c3
800 BLOCK#ch; xsz%-PCX%(l2)+6,ysz%-PCY%(a)+5,PCX%(l2)-6,PCY%(a)-5,0
810 BLOCK#ch; xsz%-PCX%(l2),ysz%-PCY%(a),PCX%(l2),PCY%(a),c4
820 BORDER#ch; 2,0: BORDER#ch; 0
830 END DEFine PAINT
840 :
850 DEFine FuNction PCX%(x%)
860 RETurn INT(x% * xsz% / 512)
870 END DEFine PCX%
880 :
890 DEFine FuNction PCY%(y%)
900 RETurn INT(y% * ysz% / 256)
910 END DEFine PCY%
920 :
Re: A bit of art
[quote="Cristian"]Larger screens are not for QDOS, of course, so this needs SMSQ/E.
Nice program.
And a small correction: Larger screens are also possible using Minerva on uQLx, so don't necessarily need SMSQ/E.
Tobias
Nice program.
And a small correction: Larger screens are also possible using Minerva on uQLx, so don't necessarily need SMSQ/E.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: A bit of art
My fault, not Cristian's. How about the keywords SCR_XLIM/YLIM. Are they available for uQLx?tofro wrote:Cristian wrote:Larger screens are not for QDOS, of course, so this needs SMSQ/E.
Nice program.
And a small correction: Larger screens are also possible using Minerva on uQLx, so don't necessarily need SMSQ/E.
Tobias
Per
dont be happy. worry
- ?
dont be happy. worry
- ?
Re: A bit of art
Yep, they are.pjw wrote: My fault, not Cristian's. How about the keywords SCR_XLIM/YLIM. Are they available for uQLx?
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: A bit of art
Is there a way to test if a program is running on uQLx variants? It would be useful for BASIC programmers to do something like:tofro wrote:Yep, they are.pjw wrote: My fault, not Cristian's. How about the keywords SCR_XLIM/YLIM. Are they available for uQLx?
Tobias
Code: Select all
wide% = 512 : high% = 256
IF VER$ = 'HBA' OR {test for uqlx} THEN
wide% = SCR_XLIM : high% = SCR_YLIM
END IF
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html
Re: A bit of art
Dilwyn,
determining whether a program runs on uqlx is not exactly easy because uqlx uses standard QL ROMs. So VER$ would return whatever that ROM returns on a standard QL (in the case that high(er)-res might be supported, that would be "JSL1" for Minerva).
One way to check for uqlx is determining the presence of a pty_ device driver which is unique to uqlx (you can, however, compile uqlx without pty_ support).
Another way would be searching the name table for some uqlx-specific SuperBASIC commands like UQLX_RELEASE$ (returning the uqlx version). That is, however, a bit more complicated than the above.
Yet another way to check for uqlx is using the file system and exploiting the fact that uqlx supports a ".." directory entry - Create a file in some directory, DDOWN into a sub-directory, and check whether ".._file ends up with the same file.
Tobias
determining whether a program runs on uqlx is not exactly easy because uqlx uses standard QL ROMs. So VER$ would return whatever that ROM returns on a standard QL (in the case that high(er)-res might be supported, that would be "JSL1" for Minerva).
One way to check for uqlx is determining the presence of a pty_ device driver which is unique to uqlx (you can, however, compile uqlx without pty_ support).
Another way would be searching the name table for some uqlx-specific SuperBASIC commands like UQLX_RELEASE$ (returning the uqlx version). That is, however, a bit more complicated than the above.
Yet another way to check for uqlx is using the file system and exploiting the fact that uqlx supports a ".." directory entry - Create a file in some directory, DDOWN into a sub-directory, and check whether ".._file ends up with the same file.
Tobias
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO