English
Experimente

Plotgrid and ABC-Plot: characters define on 5x7-Gitter; Texts as Linienzug plotten

 

p.specht

Program ´Plotgrid´
=================
sometimes would like one old Plotter again in pursued take. then need one too Beschriftungen. from Nostalgie-Found have I two rudimentäre programs built. the first is Plotgrid and allows it, by mouse in a 5x7-Zeichengitter through Liniensegmenten Own characters To define, and the entstehenden Punktcode in the Clipboard to take off. the Result You can then in the second Program "ABC-Plot" at suitable Zeichencode install and so Own Symbols, characters and letters plotten.

operating:
The 1. Click becomes grasped, but yet no line visible. ex the 2. Click becomes to gerasterten Mausposition a (in the example red) line geplottet. eachone further Click draw one further Liniensegment. wants one whom Linienzug interrupting and elsewhere new set: rights Mouse button. then geht´s How at 1. Click moreover.
Fehlerhafte characters delete and new begin happens with the ESC-Button. through Programmwechsel can whom in the Clipboard stehenden code then into ABC-Plot-Program below install.

Window Title "Plotgrid"
Window Style 24
Window 0,0-%maxx,%maxy
var xr&=width(%hwnd)/16
var yr&=height(%hwnd)/9
var lastx&=0:var lasty&=0
var drw&=0
var mou&=0
clearclip
rept:
cls
font 2
drw&=0
locate 2,2
usepen 0,1,0

whileloop 1,5

    line xr&*&Loop,yr& - xr&*&Loop,yr&*7

endwhile

whileloop 1,7

    line xr&,yr&*&Loop - xr&*5,yr&*&Loop

endwhile

repeat

    waitinput 333
    mou&=%mousekey

    if mou&=1

        lastx&=int(%mousex/xr&+.5):lasty&=int(%mousey/yr&+.5)
        print lastx&;lasty&;" ";
        putclip st$(lastx&)+st$(lasty&)
        usepen 0,5,rgb(255,0,0)

        if drw&=1

            lineto xr&*int(%mousex/xr&+.5),yr&*int(%mousey/yr& +.5)

        else

            moveto xr&*int(%mousex/xr&+.5),yr&*int(%mousey/yr& +.5)
            drw&=1

        endif

    elseif mou&=2

        locate %csrlin,%pos-1
        print "|";
        putclip "  "
        drw&=0

    endif

until %key=27

clearclip
goto "rept"

Program ABC-PLOT (Early beta-Version) moreover:

One characters-Plotprogramm quasi "zu Fuß" to program, and thereby not windows-Schriften zurückzugreifen, is none so simply. Sonderzeichen must z.B. ausgefiltert go, Verbundzeichen How (C) or (R) must recognized and supplant go etc. etc. One first attempt, yet without Farb- or Größenänderungen and one mere rudimentären Zeichensatz, standing here for Own Experimente available. Weiterentwicklungen are Welcome.


screen delete happens through input of CLS. further such Sonderfunktionen wären desirable.
Window Title "ABC-PLOT"
'(CL) Copyleft 2019-11 by P.woodpecker, Vienna/EU
Window Style 24:Window 0,0-%maxx,%maxy-40:font 2
Goto "INIT"
BACK:
' Plotinfo-Integrität testing:
pl$[]=explode(plt$,"\n")
case sizeof(pl$[])<>256:print "Error: Zeichenzahl <> 256"

whileloop 0,255

    if left$(pl$[&Loop],1)<>chr $(&loop)

        print "Error with characters ";&Loop,pl$[&Loop]
        waitinput

    endif

endwhile

GOTO "WEITER"
'<<<
INIT:
Declare plt$,pl$[]
plt$=chr $(0)+":\n"+chr $(1)+":\n"+chr $(2)+":\n"+chr $(3)+":\n"+chr $(4)+":\n"+\
chr $(5)+":\n"+chr $(6)+":\n"+chr $(7)+":\n"+chr $(8)+":\n"+chr $(9)+":\n"+\
chr $(10)+":\n"+chr $(11)+":\n"+chr $(12)+":\n"+chr $(13)+":\n"+chr $(14)+":\n"+\
chr $(15)+":\n"+chr $(16)+":\n"+chr $(17)+":\n"+chr $(18)+":\n"+chr $(19)+":\n"+\
chr $(20)+":\n"+chr $(21)+":\n"+chr $(22)+":\n"+chr $(23)+":\n"+chr $(24)+":\n"+\
chr $(25)+":\n"+chr $(26)+":\n"+chr $(27)+":\n"+chr $(28)+":\n"+chr $(29)+":\n"+\
chr $(30)+":\n"+chr $(31)+":\n"+\
" :\n"+\
"!:363747463647  3746  454131354531  4135\n"+\
chr $(34)+":21221221  41423241\n"+\
"#:3235  4245  2353  2454\n"+\
"$:53423223344455463625  3137  4741\n"+\
"%:5117  1131331311  3537575535\n"+\
"&:56242232434453  4434252637475655\n"+\
"':31413231\n"+\
"(:4131243747\n"+\
"):2131443727\n"+\
"*:5612  1652  1454  3236\n"+\
"+:3236  1454\n"+\
",:34444537273634453637  3545  4435\n"+\
"-:2454\n"+\
".:363747463647  4637\n"+\
"/:5117\n"+\
"0:22314152564737262256\n"+\
"1:224147  3757\n"+\
"2:22314152534434252757\n"+\
"3:2231415253445556473726\n"+\
"4:412555  4447\n"+\
"5:512124334354564727\n"+\
"6:5241312226374756553324\n"+\
"7:22215127  3444\n"+\
"8:34445352413122233425263747565544\n"+\
"9:263747565241312223344453\n"+\
chr $(58)+":463635454635  3645  443433434433  3443\n"+\
";:344443333443  3344  454637273635453637  364635\n"+\
"<:421446\n"+\
"=:5323  2555\n"+\
">:124416\n"+\
"?:232231415253443435  36374736\n"+\
"@:5647271612214152544535242332424435\n"+\
"A:171221415257  5414\n"+\
"B:17114152534414  4455564717\n"+\
"C:5647271612214152\n"+\
"D:17114152564717\n"+\
"E:57171151  1444\n"+\
"F:171151  1444\n"+\
"G:52412112162747565434\n"+\
"H:1711  5157  5414\n"+\
"I:2141  3137  2747\n"+\
"J:1527475551\n"+\
"K:1117  5115  3357\n"+\
"L:111757\n"+\
"M:1711355157\n"+\
"N:17115751\n"+\
"O:161221415256472716\n"+\
"P:17114152534414\n"+\
"Q:3557  564727161221415256\n"+\
"R:17114152534414  3457\n"+\
"S:524121121324445556472716\n"+\
"T:1151  3137\n"+\
"U:111627475651\n"+\
"V:113751\n"+\
"W:1117345751\n"+\
"X:1157  5117\n"+\
"Y:113451  3437\n"+\
"Z:11511757  2444\n"+\
"[:41212747\n"+\
"\:1157\n"+\
"]:21414727\n"+\
"^:233143\n"+\
"_:1858\n"+\
"':31433331\n"+\
"a:171221415257  5414\n"+\
"b:17114152534414  4455564717\n"+\
"c:5647271612214152\n"+\
"d:17114152564717\n"+\
"e:57171151  1444\n"+\
"f:171151  1444\n"+\
"g:52412112162747565434\n"+\
"h:1711  5157  5414\n"+\
"i:2141  3137  2747\n"+\
"j:1527475551\n"+\
"k:1117  5115  3357\n"+\
"l:111757\n"+\
"m:1711355157\n"+\
"n:17115751\n"+\
"o:161221415256472716\n"+\
"p:17114152534414\n"+\
"q:3557  564727161221415256\n"+\
"r:17114152534414  3457\n"+\
"s:524121121324445556472716\n"+\
"t:1151  3137\n"+\
"u:111627475651\n"+\
"v:113751\n"+\
"w:1117345751\n"+\
"x:1157  5117\n"+\
"y:113451  3437\n"+\
"z:11511757  2444\n"+\
"{:514132332435364757\n"+\
"|:3137\n"+\
"}:172736354433322111\n"+\
"~:1423334453  1524354554\n"+\
":\n"+\
"€:5241312226374756  4313  1444\n"+\
":\n"+\
"‚:\n"+\
"ƒ:\n"+\
"„:\n"+\
"…:\n"+\
":\n"+\
"	:\n"+\
"ˆ:\n"+\
"‰:\n"+\
":\n"+\
"‹:\n"+\
"Œ:\n"+\
" :\n"+\
"Ž:\n"+\
" :\n"+\
" :\n"+\
"‘:\n"+\
"’:\n"+\
"“:\n"+\
"”:\n"+\
"•:\n"+\
"–:\n"+\
"—:\n"+\
"˜:\n"+\
"™:\n"+\
"	:\n"+\
"›:\n"+\
"œ:\n"+\
" :\n"+\
"ž:\n"+\
"Ÿ:\n"+\
" :\n"+\
"	:\n"+\
"¢:\n"+\
"£:\n"+\
"¤:\n"+\
"¥:\n"+\
"¦:3137\n"+\
"§:5241312233435445352433  4556473726\n"+\
chr $(168)+":21221221  41423241\n"+\
"©:312112153747565231  433223253645\n"+\
"ª:\n"+\
"«:\n"+\
"¬:\n"+\
"­:\n"+\
"®:262232433424  3446  564727151221415356\n"+\
"¯:\n"+\
"°:4121234341\n"+\
"±:2224  1333  5117  3555\n"+\
"²:\n"+\
"³:\n"+\
"´:41334341\n"+\
"µ:271612  1526364442  4446\n"+\
"¶:\n"+\
"·:\n"+\
"¸:\n"+\
"¹:\n"+\
"º:\n"+\
"»:\n"+\
"¼:\n"+\
"½:\n"+\
"¾:\n"+\
"¿:\n"+\
"À:\n"+\
"Á:\n"+\
"Â:\n"+\
"Ã:\n"+\
"Ä:1713315357  5515  12211112  41525141\n"+\
"Å:\n"+\
"Æ:\n"+\
"Ç:\n"+\
"È:\n"+\
"É:\n"+\
"Ê:\n"+\
"Ë:\n"+\
"Ì:\n"+\
"Í:\n"+\
"Î:\n"+\
"Ï:\n"+\
"Ð:\n"+\
"Ñ:\n"+\
"Ò:\n"+\
"Ó:\n"+\
"Ô:\n"+\
"Õ:\n"+\
"Ö:21111221  41525141  224253564727161322\n"+\
"×:\n"+\
"Ø:\n"+\
"Ù:\n"+\
"Ú:\n"+\
"Û:\n"+\
"Ü:515647271611  21223221  31424131\n"+\
"Ý:\n"+\
"Þ:\n"+\
"ß:171221415243545647\n"+\
":\n"+\
"	:\n"+\
"â:\n"+\
"ã:\n"+\
"ä:1713315357  5515  12211112  41525141\n"+\
"å:\n"+\
"æ:\n"+\
"ç:\n"+\
"è:\n"+\
"é:\n"+\
"ê:\n"+\
"ë:\n"+\
"ì:\n"+\
"í:\n"+\
"î:\n"+\
"ï:\n"+\
"ð:\n"+\
"ñ:\n"+\
"ò:\n"+\
"ó:\n"+\
"ô:\n"+\
"õ:\n"+\
"ö:21111221  41525141  224253564727161322\n"+\
"÷:\n"+\
"ø:\n"+\
"ù:\n"+\
"ú:\n"+\
"û:\n"+\
"ü:515647271611  21223221  31424131\n"+\
"ý:\n"+\
"þ:\n"+\
"ÿ:1117575111"
GOTO "BACK"'<< row 256 for Zl-Nr. = ASCII
WEITER:
Declare s$,z$,o&,tmp$,both$,xx&,yy&,drw&,dd&
CLS:xx&=20:yy&=50'Default-Startpixel the Textes
NOCHMAL:
locate 2,1:Print " To plottender Text: "+\
"                                                                          "
locate 2,22:input s$
case instr("(C)",s$):s$=left$(s$,instr("(C)",s$)-1)+chr $(169)+mid$(s$,instr("(C)",s$)+3,len(s$)-2-instr("(C)",s$))
case instr("(R)",s$):s$=left$(s$,instr("(R)",s$)-1)+chr $(174)+mid$(s$,instr("(R)",s$)+3,len(s$)-2-instr("(R)",s$))
case instr("+/-",s$):s$=left$(s$,instr("+/-",s$)-1)+chr $(177)+mid$(s$,instr("+/-",s$)+3,len(s$)-2-instr("+/-",s$))
:if s$="cls":cls:xx&=20:yy&=50:goto "NOCHMAL":endif
drw&=0'peg take off
xx&=20'CR
yy&=yy&+2*15'LF
dd&=1'Plotterstiftdicke
':::CLS
':::locate 10,1

Whileloop len(s$)

    z$=mid$(s$,&Loop,1)
    o&=ord(z$)
    tmp$=pl$[o&]
    both$=left$(tmp$,2)
    'Gridcodes the Zeichens loading:
    tmp$=substr$(tmp$,2,":")
    PLOT tmp$,xx&,yy&,dd&
    xx&=xx&+2*6'Schreibposition+2*Step

endwhile

GOTO "NOCHMAL"

Proc PLOT :parameters k$, xx&,yy&,dd&

    declare x&,y&
    ':::print k$
    drw&=0
    usepen 0,dd&,rgb(255,0,0)

    whileloop 1,len(k$),2

        'Gridcode xy fetch:
        x&=val(mid$(k$,&Loop,1))
        y&=val(mid$(k$,&Loop+1,1))
        'Doppelnull ignore (Moveto-characters)

        if ((x&=0) and (y&=0))

            drw&=0
            continue

        endif

        ' Plotten

        if drw&=0

            moveto xx&+2*x&,yy&+2*y&
            drw&=1

        else

            lineto xx&+2*x&,yy&+2*y&

        endif

    endwhile

endproc

END
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
05/30/21  
 



Zum Experiment


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.024 Views

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie