TEK 4010/4014 Vector Graphics terminal DEMO

Post your cool example code here.
ChrisMicro
Posts: 318
Joined: Fri Mar 24, 2017 4:51 pm
Location: Germany

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by ChrisMicro » Tue Jul 25, 2017 6:21 am

Regarding doing fills.
Maybe we can bring Tek to fill out a rectangle if we write a "space" character with the desired color and dimension at the desired coordinate.
Of course, this will only work for horizontally and vertically aligned fills.
You can do "pseudo fills" if the screen resolutions fits.
You can see the result if you just install the GuiPittix-Library and run the LED-example with TEK-output.
I make this library to have universal graphical elements on any display. Probably I will start to make special vector graphics elements to support this type of displays.

User avatar
zoomx
Posts: 567
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by zoomx » Tue Jul 25, 2017 6:34 am

RogerClark wrote:
Mon Jul 24, 2017 10:44 pm
I recall some early video games that also used vector displays.

Perhaps we can have Asteriods ;-)
I recall also Battle Tank and a two player game I don't remember the name. It was a battle between two battleship in a gravitational field.

User avatar
RogerClark
Posts: 7693
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by RogerClark » Tue Jul 25, 2017 7:19 am

https://en.wikipedia.org/wiki/Battlezon ... ideo_game)

was the tank one

I vaguely recall playing something based on Star Trek, with a "Enterprise" and "Kingon" ship (while on a school trip, I think we went to an arcade when we should have been doing something educational! and they had some old game console machines )

Possibly
http://davesclassicarcade.com/startrek/startrek.html

https://en.wikipedia.org/wiki/Star_Trek_(arcade_game)

But the one I remember seemed to predate this, and from what I recall was more like asteroids, in that it was 2D plan view

User avatar
RogerClark
Posts: 7693
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by RogerClark » Tue Jul 25, 2017 7:26 am

I found what appears to be a good list of vector games

http://wikivisually.com/wiki/Category:V ... cade_games

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by Pito » Tue Jul 25, 2017 8:26 am

Regarding fills: you may fill with solid lines - the TT's or Xterm's side is fast enough, the bottleneck is the Serial connectivity to the tek terminal. In order to fill ie. 300x300 box with lines you need to send about 2700 bytes via serial, with current usb speeds of say 200kB/sec it is something like 13msecs. So it is not so "slow". It would be slow when running Tek terminal via 9k6.
Last edited by Pito on Tue Jul 25, 2017 9:14 am, edited 2 times in total.
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by Pito » Tue Jul 25, 2017 8:53 am

For example: the filling a 300x300 box with solid lines

Code: Select all

  uint32_t elapsed = micros();
  for (i=100; i<400; i++){
          tek.Tekline(i,100,i,400);
    }
 elapsed = micros() - elapsed;
takes 2.9ms - 7.7ms with the latest libmaple usb on Black f407ZE..
Tek 300x300 line fill.JPG
Tek 300x300 line fill.JPG (26.19 KiB) Viewed 244 times
.

Btw, why such spread?? (2.897ms - 7.933ms).
Pukao Hats Cleaning Services Ltd.

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by Pito » Tue Jul 25, 2017 9:22 am

While reading the TT's source I can see there some interesting functionality regarding printing the texts.
You can set for example the text orientation, 0, 90, 180, 270 deg. That is great when drawing graphs and charts..
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 2070
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany
Contact:

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by stevestrong » Tue Jul 25, 2017 9:39 am

Pito wrote:
Tue Jul 25, 2017 8:53 am
Btw, why such spread?? (2.897ms - 7.933ms).
I can only think on the host processing speed, the libmaple USB has a 2kB Tx buffer, uses blocking Tx, and if the Tekline() command sends more than 5 bytes, then the buffer gets full and will allow sending of further bytes only if the host is reading some of previously sent ones.
So actually the ~3 ms is the time just to write the data to the Tx buffer.

User avatar
RogerClark
Posts: 7693
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by RogerClark » Tue Jul 25, 2017 9:57 am

I don't think its worthwhile doing fill's with lines

Its better to find a python TEK 4010 client and add a new command for fills

User avatar
Pito
Posts: 1743
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: TEK 4010/4014 Vector Graphics terminal DEMO

Post by Pito » Tue Jul 25, 2017 10:21 am

stevestrong wrote:
Tue Jul 25, 2017 9:39 am
So actually the ~3 ms is the time just to write the data to the Tx buffer.
Ok, the 8ms is the realistic time for filling the 300x300box..
That is not bad provided most of potential users may use the Tek emulator for a visualization of their measurements done with their ..duinos in a form of simple 2D graphs/charts, with the option of having easy copy/paste/saving/printing of their graphs. And without a need to mess with windows programming.
I did not test with Xterm, but sources claim it works as well..

PS: while I messed with the spectrum analyzer POC above, the lesson learned is following: the data acquisition - sampling the ADC data - takes much longer than the processing and plotting them in Tek window. For example with 100kHz sampling rate, you need 10msecs to get 1024 samples in, you need to average the spectra in order to get some nice results, I did with 64 spectra, thus the total time for data sampling was 640ms. The actual fft processing of 64 spectra takes maybe 100 msecs in total (fpu on). So the refresh rate of the spectra on the Tek screen was below 1sec. The plotting the data took maybe 15msecs.
Pukao Hats Cleaning Services Ltd.

Post Reply