Offtopic > Offtopic

How nice...

<< < (2/2)

ZXDunny:

--- Quote from: B+ on May 14, 2019, 01:41:21 PM ---Anyway, this thing about Basic's needing some kind of Graphics? Library: SDL (which SmallBASIC uses too), GL (which QB64 is using) and I suppose that is what MUSL and XBGI are too for Cybermonkey?, this need for library's has me wodering how JJ and Paul handled this aspect with their respective versions of Basic.

--- End quote ---

For my part, I only need a pointer to a surface to draw on. The rendering is done by OpenGL (and SDL/OpenGL in Linux/MacOS) which literally just renders that surface to the display. All else is my own code running inside SpecBAS, no libs needed. The source is freely available if anyone wants to gaze in horror at what I do to pointers and strings :)

jj2007:

--- Quote from: B+ on May 14, 2019, 01:41:21 PM ---this need for library's has me wodering how JJ and Paul handled this aspect with their respective versions of Basic.
--- End quote ---

I have implemented interfaces e.g. to the Gnu Scientific Library, Cairo, even Python, but I prefer to roll my own if possible. See below - pure Assembly, pardon: MasmBasic ;-)

include \masm32\MasmBasic\Res\MbGui.asm
  ArraySet current() As double=120, 125, 122, 119, 134, 138, 141, 159, 162, 178
  ArraySet voltage() As double=250, 210, 180, 155, 140, 125, 110, 100, 90, 80
  SetAxisX "Электроток", s 0, d 1/5, grid 1   ; s=start value, d=difference between gridlines
  SetAxisY "Voltage", s 0, d 5/5, grid 1
Event Paint
  ArrayPlotValues "%i V", 8, -12        ; format$, dx & dy positions
  ArrayPlot current():voltage(), RgbCol(0, 0, 255), lines=3
  ArrayPlot exit, "繪製科學數據非常容易!"
EndOfCode

Aurel:
Hi JJ

Nice..
but some hings you must explain to me :
something is not normal in your plotting graph

1.what is zlektrok in cyrilic   :o
2.what is that china-letters   :o

3. and most important  part what exactly that graph represent?
I understand voltage trough time should represent electric current ??

and how in your case current jump backward  :o

jj2007:
Hi Aurel,

It's just a demo, so the data are arbitrary, and so is the text. The Chinese means, if you can trust google translate "plotting data is easy". The abscissa should be "electrotok", something like electric current. It's merely to demonstrate that this control uses Unicode.

Aurel:
..he he
back to topic

where is Waldo ?
https://www.debralife.ca/wp-content/uploads/2018/04/clutter-650x366.jpg

Navigation

[0] Message Index

[*] Previous page

Go to full version